Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/harness.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ code=^(emit|lib)/|^[^/]+\.(lua|c)$
api=^lib/
host=\.lua$
repos=luainkernel/lunatik
budget=3647
budget=4962
19 changes: 19 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading