Repository navigation
Agent scaffolding from the d119-step3 battery rounds: battery --survey, multi-target build driver, census --diff, stack_status, with-battery skill - #2375
Merged
Conversation
added 6 commits
October 12, 2026 17:24
…ill, census --diff, two iterate-tier rules - .agents/skills/with-battery: the operational checklist for stack work (worktree discipline, persistent battery monitor, phase timings, red triage, promote cycle, reseed), distilled from AGENTS.md and PR #2364's five battery rounds. Validated (muse skills validate). - tools/ceremony_census.w --diff REV: lexical ceremony counts of the files changed vs REV, worktree against REV, so a new ceremony is caught at the iterate tier instead of 13 minutes into a battery gate (run 5: one redundant move, 847 -> 848). Verified both ways: clean diff passes, an injected move fails. - AGENTS.md/CLAUDE.md (identical copies): absolute paths in staging worktrees (relative tool paths resolve to the main checkout), and after a migrator spelling change sweep every expectation of the old spelling plus run :c-migrator-basic-tests before the battery (a head-truncated grep hid flat_pairs and cost run 3).
…itself awake The phase barrier (a red gate stops the battery) made independent failures serialize across batteries ~35 minutes apart: on d119-step3 the Emit-C collector bug sat in battery-checks invisible behind two gate failures. --survey keeps phase order and the final verdict rules (RED if any phase was red) but runs UAT (when the gate left a release compiler; otherwise the skip is recorded) and battery-checks (whose own survey skips dependents of failed build targets) after a red phase, so one battery reports independent reds across phases. The battery also caffeinates itself for its whole run (caffeinate -i -s -w <own pid> on macOS): callers no longer wrap the invocation or hold a keep-awake lease, and a forgotten wrapper can no longer leave the driver asleep between phases. The per-phase child holds remain.
driver_build_target_arg returned the first :target and the rest were silently discarded, so `build :zlib-promote :pcre2-promote :c-algorithms-promote :tommyds-promote` promoted zlib, said nothing, and exited 0 — carried as a one-promote-per-invocation ritual in the handoff instead of a driver bug. Now every selector is a root: DriverOptions collects selected_targets in order (duplicates dropped, selected_target remains the first for pseudo-target dispatch and labels), BuildGraphModel selects the union closure (build_graph_filter_targets; build_graph_filter_single_targets for --no-deps), and an undeclared name is a loud error. The install-user fast path and the effects pseudo-target still require a lone selector. Verified: --dry-run selects both roots, and one invocation ran both :lexer-tests (7 files) and :parser-tests (9 files) to green.
Prints what git, gh, and the battery already know about the current stack — branch and HEAD, commits ahead of origin/main, tracked dirtiness, the branch's PR, the battery status file, the newest run log's verdict line — fresh at read time instead of copied by hand into a handoff that goes stale within hours (the d119-step3 handoff described a promote chain and a main that had already moved). Judgment (what to do next, which reds are pre-existing) stays the human-written part of a handoff; this replaces only its facts.
…r wakefulness The --survey commit added a spawn_os caffeinate -w self-hold on top of the per-phase holds the battery already had. ceremony_census --diff flagged its let _ = spawn as new ceremony, and on inspection the hold was redundant: every phase runs under caffeinate and the driver between phases only merges times and writes status for seconds. What remains is the documented rule in both places: no caller-side caffeinate wrapper or keep-awake lease — the ritual, not a missing hold, was the defect.
…remony-census ref-at-ref-param 1852 -> 1856 in the survey battery's gate; the parameters are references, so the places auto-ref)
Contributor
Author
|
Battery GREEN on 74eb560 (seed-driven, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the retrospective list from the d119-step3 session (2026-10-12), one commit per item:
:targetselector names a root. Previously the first was taken and the rest silently discarded, so a four-promote invocation promoted one corpus and exited 0 (carried as a one-promote-per-invocation ritual). Verified: one invocation ran :lexer-tests and :parser-tests to green; unknown targets fail loudly.Outside this PR: verdict.w --detail fixed in ~/.claude/hooks (collapses [compile] lines, reaches the first error); AGENTS.md tiering proposed in #2374 (editorial call, not performed here).
Verification so far: with check src/main.w ok; census --diff origin/main clean; skill validates; multi-target build green. Battery (this PR, in --survey mode): pending, posted here when terminal.