From 7acf82c7c6f2811436170c38b2f736d4b9321161 Mon Sep 17 00:00:00 2001 From: Lourival Vieira Neto Date: Sun, 29 Nov 2026 16:23:01 -0300 Subject: [PATCH] harness: the host cycle's rules move into this AGENTS.md The mount moves from e38c118 to f11ea4b. luainkernel/harness#102 took the rules of the shared host out of the shared AGENTS.md, which every project that mounts the harness loads: the lock on lunatik operations, the mixed install under /lib/modules/lua, disk.sh before every cycle, an edit built, installed and run in one step, and a script a cycle reruns kept under scratch/. They bind this project, so they enter its Build, install, test as the shared file had them, and the budget key grows by their 1315 bytes. luainkernel/harness#105 has an implement-issue run launched with build false open its pull request once its review is ready. Co-Authored-By: Claude Opus 5.5 --- .agents/harness.conf | 2 +- AGENTS.md | 19 +++++++++++++++++++ harness | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) 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