Tool-call relief: wait-on.sh, python, brief lessons, Life reads the mind #7

Merged
eureka merged 9 commits from hands/toolcall-relief into main 2026-10-08 13:25:51 +00:00
Owner

Evidence: Eyes pass over 211 Hands/Soul runs (25,784 calls). 11% of calls were waiting: 1,181 ygg-verify.sh wait, 974 idle true/echo calls, 324 sleeps (49 refused), 287 process checks, 83 Monitor; 198 wait calls timed out. 65 python calls hit the Windows Store stub.

Deliverables:

  1. a886d45 tools/wait-on.sh (pid, log, file forms; ygg-verify.sh wait contract; Windows PIDs via tasklist) + fixtures in tools/test-tools.sh + INDEX row.
  2. 18b160c briefs.md: every non-Yggdrasil wait goes through wait-on.sh with the 280000 ms timeout rule; bare true/echo/sleep polling forbidden; ygg-verify.sh wait line untouched.
  3. 18b160c briefs.md: py -3 named for Hands and Soul with the Store-stub scar.
  4. Brief lessons 1-4 and 6 in 18b160c (own scratchpad subdirectory, wait protocol verbatim, Stryker character offsets, Aetheria DOCKER_ARGS mounts, rulings quote only the operator); lesson 5 in ebc746e (SKILL.md semantic-merge scar).
  5. c28d928 agents/life.md: read-only whoami, view, query. No admit.
  6. df590aa references/changelog.md entry.

test-tools.sh: 70 ok, 7 FAIL on this run. All 7 FAILs are mutation-harness lines (A-build-baseline, B, B-label-forge, D2-jest, E-live-rows, E2, E2-killed) that time out under load; the unmodified base run on the same machine earlier gave 63 ok and 1 FAIL (E-live-rows), and my run overlapped a leftover earlier suite. All 11 new wait-on fixtures pass (pid finishes, pid still running, killed pid, log gains done line, log never matches, vanished pid 98, completion logged after death, log missing, file appears, empty file, bad usage).

Not merged: wait-on.sh is a script verdicts will depend on, so it needs a Soul pass first.

🤖 Generated with Claude Code

Soul pass 1 fixes

  • F1 (stale done line in a reused log): resolved by deletion. A WAIT_FROM offset was tried (30e199c) and removed (d9e45c8, 6ab91ea) in favour of the rule that every job gets a fresh log path and a waiter is never pointed at a previous job's log. Soul pass 2 evidence: a truncating rerun (>, Unity -logFile) writes its done line at or below the old size, so the offset skipped it (same-size rewrite and truncate-then-regrow both hung at exit 99).
  • F2 (pid form cannot report a crash): pid form prints GONE (no completion evidence); briefs say prefer log <log> <regex> with WAIT_PID, bare pid only without completion evidence. 30e199c, de35a72.
  • F3 (mount path): lesson replaced with the exact DOCKER_ARGS text. de35a72.
  • F4 (invalid ERE): validated once at startup; usage error on stderr, exit 3 (documented in the header; the canonical block says fix the regex, do not retry). 30e199c, 6ab91ea.
  • F8 (templates): Imagination and Eyes templates name wait-on.sh, <scratchpad>/<agent>/ and py -3; all examples use <scratchpad>/<agent>/; one canonical wait block in the Hands section, the Soul section points to it. de35a72.
  • Invocation: executable bit set in git for tools/wait-on.sh (100755). The other tools/ scripts are still 100644 and share the issue; briefs call only wait-on.sh and the stopgap by path. 30e199c.
  • Fixtures in tools/test-tools.sh: pid GONE, invalid regex exit 3.
  • test-tools: 76 ok, 1 FAIL (mutation E-live-rows, fails on main too: MT_WALL=8 timing on Windows). A first run on the loaded box also failed mutation B-nonce; it passed on rerun.

Known limitations (script header): F5 a launcher pid that exits while its child keeps writing gives a false 98 (pass the writer's pid or none); F6 file form is done at the first byte (write the file last); F7 the log form greps the whole log every 2 s.

Evidence: Eyes pass over 211 Hands/Soul runs (25,784 calls). 11% of calls were waiting: 1,181 ygg-verify.sh wait, 974 idle true/echo calls, 324 sleeps (49 refused), 287 process checks, 83 Monitor; 198 wait calls timed out. 65 python calls hit the Windows Store stub. Deliverables: 1. a886d45 tools/wait-on.sh (pid, log, file forms; ygg-verify.sh wait contract; Windows PIDs via tasklist) + fixtures in tools/test-tools.sh + INDEX row. 2. 18b160c briefs.md: every non-Yggdrasil wait goes through wait-on.sh with the 280000 ms timeout rule; bare true/echo/sleep polling forbidden; ygg-verify.sh wait line untouched. 3. 18b160c briefs.md: py -3 named for Hands and Soul with the Store-stub scar. 4. Brief lessons 1-4 and 6 in 18b160c (own scratchpad subdirectory, wait protocol verbatim, Stryker character offsets, Aetheria DOCKER_ARGS mounts, rulings quote only the operator); lesson 5 in ebc746e (SKILL.md semantic-merge scar). 5. c28d928 agents/life.md: read-only whoami, view, query. No admit. 6. df590aa references/changelog.md entry. test-tools.sh: 70 ok, 7 FAIL on this run. All 7 FAILs are mutation-harness lines (A-build-baseline, B, B-label-forge, D2-jest, E-live-rows, E2, E2-killed) that time out under load; the unmodified base run on the same machine earlier gave 63 ok and 1 FAIL (E-live-rows), and my run overlapped a leftover earlier suite. All 11 new wait-on fixtures pass (pid finishes, pid still running, killed pid, log gains done line, log never matches, vanished pid 98, completion logged after death, log missing, file appears, empty file, bad usage). Not merged: wait-on.sh is a script verdicts will depend on, so it needs a Soul pass first. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ## Soul pass 1 fixes - F1 (stale done line in a reused log): resolved by deletion. A `WAIT_FROM` offset was tried (30e199c) and removed (d9e45c8, 6ab91ea) in favour of the rule that every job gets a fresh log path and a waiter is never pointed at a previous job's log. Soul pass 2 evidence: a truncating rerun (`>`, Unity `-logFile`) writes its done line at or below the old size, so the offset skipped it (same-size rewrite and truncate-then-regrow both hung at exit 99). - F2 (pid form cannot report a crash): pid form prints `GONE (no completion evidence)`; briefs say prefer `log <log> <regex>` with `WAIT_PID`, bare pid only without completion evidence. 30e199c, de35a72. - F3 (mount path): lesson replaced with the exact `DOCKER_ARGS` text. de35a72. - F4 (invalid ERE): validated once at startup; usage error on stderr, exit 3 (documented in the header; the canonical block says fix the regex, do not retry). 30e199c, 6ab91ea. - F8 (templates): Imagination and Eyes templates name `wait-on.sh`, `<scratchpad>/<agent>/` and `py -3`; all examples use `<scratchpad>/<agent>/`; one canonical wait block in the Hands section, the Soul section points to it. de35a72. - Invocation: executable bit set in git for `tools/wait-on.sh` (100755). The other `tools/` scripts are still 100644 and share the issue; briefs call only `wait-on.sh` and the stopgap by path. 30e199c. - Fixtures in `tools/test-tools.sh`: pid GONE, invalid regex exit 3. - test-tools: 76 ok, 1 FAIL (`mutation E-live-rows`, fails on main too: MT_WALL=8 timing on Windows). A first run on the loaded box also failed `mutation B-nonce`; it passed on rerun. Known limitations (script header): F5 a launcher pid that exits while its child keeps writing gives a false 98 (pass the writer's pid or none); F6 `file` form is done at the first byte (write the file last); F7 the log form greps the whole log every 2 s.
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>
Hands and Soul long jobs name tools/wait-on.sh for every non-Yggdrasil wait and
forbid bare true/echo/sleep polling (974 idle calls, 324 sleeps). py -3 is the
Python that works from Git Bash and PowerShell (65 Store-stub hits). Lessons:
own scratchpad subdirectory, wait protocol pasted verbatim, Stryker character
offsets from LF content, Aetheria DOCKER_ARGS mounts, rulings quote only the
operator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
whoami, view and query; no admit. Follow-up eureka-substrate:follow_up:gap-life-has-no-mind-tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
F1: log form searches only bytes after WAIT_FROM, so a stale done line in a
reused log is ignored (also makes the per-check cost independent of log size).
F2: pid form prints GONE (no completion evidence). F4: invalid ERE is exit 3.
Mode 100755 recorded for wait-on.sh; other tools/ scripts are still 100644.
F5, F6, F7 recorded as known limitations in the header. Fixtures added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
F1/F2: Hands block says prefer log+WAIT_PID, pid form means gone not succeeded,
fresh log per job or WAIT_FROM at launch. F3: exact Aetheria DOCKER_ARGS mounts.
F8: Soul points at the Hands block instead of rewording it; Imagination and
Eyes templates name wait-on.sh, <scratchpad>/<agent>/ and py -3; all examples
use <scratchpad>/<agent>/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Truncating writers (`>`, Unity -logFile) rewrite below any offset, so an offset
turned a stale success into a silent hang. The option, the scan branch, its docs
and its fixtures are gone; the header states the fresh-log-path rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eureka merged commit 761c65f731 into main 2026-10-08 13:25:51 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Eureka!7
No description provided.