diff --git a/.agents/harness.conf b/.agents/harness.conf index 86dba87..e31d1ef 100644 --- a/.agents/harness.conf +++ b/.agents/harness.conf @@ -7,4 +7,4 @@ code=^(emit|lib)/|^[^/]+\.(lua|c)$ api=^lib/ host=\.lua$ repos=luainkernel/lunatik -budget=3647 +budget=4962 diff --git a/AGENTS.md b/AGENTS.md index aa82219..08529be 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -41,6 +41,25 @@ The compiler reads what Lunatik installs, the `linux.*` tables under `/lib/modul kernel scripts a program calls read too, and `lunatik.config`: a constant the compiler needs enters Lunatik's `autogen/specs.lua` through a pull request of Lunatik. +Never run two `lunatik` operations at once. Concurrent operations wedge `/dev/lunatik` and leave +processes in D state. `ps` answers for the instant it ran, which is no help when another session +starts a second later, so a build-install-run cycle takes the lock instead: + + bash harness/tools/lunatik-host sudo lunatik test + bash harness/tools/lunatik-host bash harness/tools/watchdog.sh examples/systrack/device + +It runs the command with the lock held, names the holder while it waits, and releases on exit +however the command ends, and runs `harness/tools/checks/disk.sh` as a warning before every cycle. +The installed tree under `/lib/modules/lua` is shared too: a suite run whose totals do not match the +tests in your own worktree is a mixed install, one session's modules against another's scripts, and +it measures neither. + +What a worktree holds built and not run is code nobody ran: a cycle run in a worktree not your own +installs its author's untested edit, and an edit left built while its author waits on a question is +a crash any session can trigger. An edit is built, installed and run in one step, or reverted before +the session pauses. A script a cycle reruns lives under `scratch/`, since the reboot such a crash +forces clears `/tmp`; `harness/tools/lunatik-host` names one it runs from `/tmp`. + ### Checks luaebpf has no checks of its own: the shared ones run from `harness/tools/checks/`, reading this tree diff --git a/harness b/harness index e38c118..f11ea4b 160000 --- a/harness +++ b/harness @@ -1 +1 @@ -Subproject commit e38c1186be1fcbff762c732599ca971c68a6b393 +Subproject commit f11ea4b80d496de4a77754f61974e09eebe9afcd