8000 fix(gates): the "latest block is not from <role>" block says how to append from a worktree (run 25) by adeelahmad · Pull Request #42 · adeelahmad/aloop · GitHub
[go: up one dir, main page]

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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ tag in lockstep. Tag releases as `vMAJOR.MINOR.PATCH`.
- The planner's stop gate (`gate-stage2-complete` on SubagentStop) now logs its verdicts to `gates.jsonl` and the event stream like every other gate, and the stuck release covers the planner: the same block three times in a row releases its stop unverified with a `state/stuck/plan-sprintN.<agent>` marker the supervisor acts on (a re-dispatch is a new agent id and starts over). A direct call (the supervisor's own check, `selfcheck`) is logged as a self-check and never releases. Reason: live e2e run 19's re-planning planner was blocked 9 times on one unchanged reason, none counted. Test: `scripts/test/planner-stuck.test.py`.

### Fixed
- The comms gate's "latest output.md block is not from '<role>'" block now says how to append the
report from a worktree (`cat >> … <<'EOF'`), like the missing-block one (live run 25: a GREEN worker
refused by the Write tool stopped three times on it and hit the stuck release). Conformance case.
- `gate-stage2-complete` and `gate-dispatch` refuse a sprint (or a `STORY_DIR`) inside the run-data dir (`.aladdin/`, `.agentic/`) and name `docs/agents/sprintN/`; with no argument the stage-2 gate looks in `docs/agents/` first. Reason: live run 24 (a haiku-supervisor experiment) planned and built the whole sprint under `.aladdin/sprint1/`, which is git-ignored and never committed, and every gate passed it. Tests: `scripts/test/planner-stuck.test.py`, `scripts/test/dispatch.test.py`.
- Final-gate persona: the suppression check is the gate's (`#[ignore]`, `.skip(`, `xit(`,
`#[cfg(not(test))]`, run by `selfcheck final-gate`), not an open-ended list; an `#[allow(dead_code)]`
Expand Down
2 changes: 1 addition & 1 deletion docs/OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The model can ignore a skill; it cannot ignore an exit code.
- The full planning → execution loop on Claude Code; Codex and OpenCode via generated
agents and the same gates.
- CI on every PR: Rust fmt/clippy/tests for both backends, shellcheck on every gate, the
ROADMAP §6 conformance fixtures (real gates on a fixture crate, 60 checks), the host tests
ROADMAP §6 conformance fixtures (real gates on a fixture crate, 62 checks), the host tests
(budget/worktree, Codex hooks emulation, supervisor scope, hook matchers, dispatch,
ensure-tools, fail-closed: 73 checks; OpenCode end-to-end: 20), `claude plugin validate
--strict`, eval-suite and version-lockstep checks,
Expand Down
2 changes: 1 addition & 1 deletion docs/ROADMAP.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/evidence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ the cost cell reads — and the intent cell names the host. What each run found
| run 22 | wordfreq | v0.12.0 + #37 (361f8d7) | 13/13 | 16m18s | $1.14 | 2 | 0 | 3 | `make e2e-live YES=1 INTENT=wordfreq` |
| run 23 | wordfreq | v0.12.0 + #33 (7417bb9) | 13/13 | 10m58s | $0.76 | 4 | 1 | 0 | `make e2e-live YES=1 INTENT=wordfreq` |
| run 24 | wordfreq, haiku supervisor | v0.12.0 + #39 (9826566) | 10/13 | 19m09s | $0.66 | 4 | 1 | 6 | `make e2e-live YES=1 INTENT=wordfreq MODEL=haiku` |
| run 25 | wordfreq | v0.12.0 + #40 (9c6a16c) | 13/13 | 16m13s | $0.98 | 3 | 0 | 5 | `make e2e-live YES=1 INTENT=wordfreq` |

Columns: *checks* are the e2e script's own assertions (12 for `semver`, 13 for `wordfreq` since
the commit-trace check); *wakes* are supervisor turns that ended and resumed (each re-reads
Expand Down
2 changes: 1 addition & 1 deletion plugin/bin/_gatelib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ validate_comms() {
local block; block="$(awk -v s="$last" 'NR>=s' "$out")"
if [ -n "${AGENT_ROLE:-}" ]; then
printf '%s\n' "$block" | head -1 | grep -q "$AGENT_ROLE" \
|| fail "the latest output.md block is not from '$AGENT_ROLE' — append YOUR report block for this dispatch (one block per attempt, append-only)."
|| fail "the latest output.md block is not from '$AGENT_ROLE' — append YOUR report block for this dispatch (one block per attempt, append-only). How: $how"
fi
printf '%s\n' "$block" | grep -qE '^###[[:space:]]*Summary' || fail "latest output.md block missing '### Summary'"
printf '%s\n' "$block" | grep -qE '^###[[:space:]]*Result' || fail "latest output.md block missing '### Result'"
Expand Down
9 changes: 9 additions & 0 deletions scripts/conformance/claude-code.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,15 @@ def green(lib=GREEN_LIB, test=GREEN_TEST, scope="src/*.rs"):
case(5, "GREEN that adds #[ignore] is rejected", "gate-green-verify", wt, 2, "suppression")
wt = green(lib=GREEN_LIB + "\n#[cfg(not(test))]\npub fn hidden() {}\n")
case(5, "GREEN that adds #[cfg(not(test))] is rejected", "gate-green-verify", wt, 2, "suppression")
# A GREEN worker whose report is not the latest block (RED's is) is told HOW to append it: live
# e2e run 25's haiku GREEN tried the Write tool on the main tree's output.md, was refused by
# worktree isolation, and stopped 3 times on a block that named no way out (stuck release).
wt = green()
report("red-worker", [("tests/sub.rs::sub_works", "FAIL")])
case(5, "GREEN whose report block is missing is told to append it with a shell heredoc", "gate-green-verify", wt, 2,
"not from 'green-worker'")
case(5, "...and the block names the heredoc way out", "gate-green-verify", wt, 2, "cat >>")
report("green-worker", [("tests/sub.rs::sub_works", "PASS")])

# A worker's `selfcheck <role>` with no AGENT_ROLE in its env must run the gate, not crash it
# (live e2e run: `AGENT_ROLE: unbound variable` made the self-check fail closed on good work).
Expand Down
Loading
0