Eureka/tools/INDEX.md
Eureka a886d4524a Add tools/wait-on.sh: one waiter for pids, logs and files
Same contract as ygg-verify.sh wait (270 s cap, bounded tail, RUNNING exit 99,
exit 98 for a thing gone with no completion evidence). Windows PIDs are found
through tasklist, since kill -0 only knows Git Bash's own. Fixtures in
tools/test-tools.sh; INDEX row added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 14:15:45 +02:00

3.4 KiB

Shared tools

One line per script. Briefs name the exact script they want; agents do not browse. A line whose consuming brief no longer names the script is dead and is deleted. Contributions come by branch and Forgejo pull request (this repo lives on Yggdrasil's Forgejo), never a push to main. A script that verdicts depend on gets a Soul pass before merge.

script purpose consumer named by
tools/stopgap/ygg-verify.sh Pushes an exact revision to a mirror on Yggdrasil and runs one command in a capped, niced container (RUN_ON_HOST=1: run a host-side command in the same slot, clone and watchdog instead; the watchdog kills every container carrying the job label). SUMMARY=<log> keeps the full log and prints a bounded summary (verdict, counts, ZERO TESTS RAN, failing tests); wait <log> blocks at most 270 s and returns the summary once; call it with a Bash tool timeout of at least 280000 ms. Dies with the stopgap when Idunn's verify transaction lands. Hands, Soul, Imagination probes references/briefs.md (Hands long jobs and verification, Soul long jobs), SKILL.md (Yggdrasil)
tools/wait-on.sh One general waiter for anything that is not a Yggdrasil job: pid <pid> [<log>], log <log> <done-regex> (with WAIT_PID=<pid> a dead process with no match is exit 98), file <path>. Same contract as ygg-verify.sh wait: blocks at most 270 s, exit 0 done with a tail of at most 60 log lines, RUNNING <n>s exit 99, exit 98 gone with no completion evidence; call it with a Bash tool timeout of at least 280000 ms. Replaces hand-rolled poll loops and idle true/echo/sleep calls. Hands, Soul, Imagination probes references/briefs.md (Hands long jobs, Soul long jobs, detached scripts)
tools/mutation-table.sh One verify job that runs a list of hand mutants (file, before, after, test) against a revision and returns a kill table: CAUGHT with the killing test, SURVIVED, UNVIABLE, TIMEOUT, NOAPPLY, ERROR. Refuses a red or zero-test baseline and a red BUILD; rows print live. Isolation is Docker's: the baselines run once in a container that holds the revision, that container is committed to a throwaway image, and every mutant runs in a fresh --rm container from it, so nothing a run writes (tracked, untracked or ignored, such as target/) reaches the next mutant; the image is removed when the job ends, killed or not. The shared registry and sccache volumes and the network are not isolated. A file-level load failure (vitest FAIL <file> [ <file> ], jest FAIL <file> plus Test suite failed to run) reads UNVIABLE. Replaces per-agent runmut/mutrun/strykrun scripts. Soul, Hands (scoped run) references/briefs.md (Hands verification, Soul reruns)
tools/testparse.sh Sourced library: failing test names and pass/fail/skip counts from cargo, dotnet, vitest, jest and pytest logs, and test files that failed to load (LOADFAIL). Shared by the summary and the kill table. the two scripts above not named by a brief; it lives and dies with them
tools/test-tools.sh Local fixture check of the parsers and the summary over tools/fixtures/logs (real cargo and mutation logs, plus hand-written dotnet, vitest, jest, pytest, exit-0-but-failed and no-verdict logs), and of the mutation runner's host driver and container half under a mock docker. Run it before merging a change to the scripts above. whoever changes those scripts SKILL.md (Shared tools)