Skip to content

Post-merge follow-ups from PR #74: gated exit-77 accounting + junk transition ref refusal - #75

Merged
SSFSKIM merged 4 commits into
mainfrom
runner-exit77-skip
Aug 19, 2026
Merged

SSFSKIM merged 4 commits into
mainfrom
runner-exit77-skip

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Aug 19, 2026

Copy link
Copy Markdown
Owner

What this is

The two follow-up ticket candidates recorded in PR #74's review trail, executed. Releases as v7.57.1.

The changes

  • Runner counts a gated tier's exit 77 as a skip (tests/claude-code/run-skill-tests.sh + test-harness-smoke.sh). drill-lib.sh adopted the producer side of the skip contract (77 = prerequisite missing) but the counter never learned it: seven integration suites tallied as FAIL on any machine without ARKHO_DIR, and the smoke test still gated with exit 0 — a phantom green pass. Both sides now speak the contract; the 77→SKIP branch is scoped to board-api/integration/* only, so a stray 77 from any other suite stays a failure; the gate's SKIP reason lines surface in captured mode. Spec Revision Note resolution appended.
  • A junk transition ref dies as a caller mistake, not a ValueError (skills/issue-tracker/scripts/board-transition.sh). The --plan gate validated argv through A.ref while the plain path handed the raw string to A.transition's int() — the last argv ref in the API tier not validated at the edge (six sibling verbs already do). Drill pair added beside the register verb's.

Review trail

  • Every runner branch exercised live in both output modes: gated 77 → SKIP (reason surfaced), stray 77 → FAIL, timeout 124 → FAIL, generic 1 → FAIL with output dump, clean pass → PASS.
  • Junk-ref drills mutation-proven: with the fix reverted in a disposable copy, exactly the two new asserts fail (the nt on the Traceback the old path raised).
  • 2 codex whole-branch rounds (gpt-5.6-sol, base 57421db): round 1 found the unscoped-77 P2 (verified live, fixed in 0740153); round 2 clean.
  • 13/13 board-api unit suites green; lint-shell.sh clean on all four touched shell files.

🤖 Generated with Claude Code

https://claude.ai/code/session_01R8uGu8nAKgDauJcD3CM6PK

… failure

drill-lib.sh adopted the producer side of the skip contract (exit 77 =
prerequisite missing, with its rationale in-line) but the counter never
learned it: run-skill-tests.sh tallied the seven gated integration suites
as FAIL on any machine without ARKHO_DIR, and test-harness-smoke.sh still
gated with exit 0 — a phantom green pass, the exact failure mode
drill-lib's own comment warns against.

Both sides now speak the contract: the runner counts 77 as [SKIP] in both
verbose and captured modes (surfacing the gate's SKIP reason lines), and
the smoke test propagates 77. The PASS-branch grep that compensated for
exit-0 skips is retired with the convention. All branches exercised:
77/124/1 exits and a clean pass, in both output modes; lint-shell clean.
…ueError

board-transition's --plan gate validated argv through A.ref while the
plain path handed the raw string to A.transition, whose int() raised an
uncaught ValueError traceback — the last argv ref in the API tier not
validated at the edge (six sibling verbs already do). The drills'
discrimination is mutation-proven: with the fix reverted, exactly the two
new asserts fail (the nt on the Traceback the old path raised).
…a skip

The 77-means-SKIP branch added in 5731274 keyed off the exit code alone, so
any suite that exited 77 for its own reasons — a `set -e` file propagating some
child's stray 77, say — was tallied as a skip instead of a failure. That left
`failed=0` and the runner printing `STATUS: PASSED` over a suite that never
passed.

Only the board-api integration drills define 77 as "prerequisite missing" (the
contract in integration/drill-lib.sh). Gate the skip on the test's path
matching that tier and nothing else; a 77 from anywhere else falls through to
the ordinary [FAIL] handling, output dump included. The predicate is computed
once per test and applied identically in the verbose and non-verbose branches,
and the path is the only signal — the output is not parsed for SKIP markers.
@SSFSKIM
SSFSKIM merged commit 78fc9be into main Aug 19, 2026
@SSFSKIM
SSFSKIM deleted the runner-exit77-skip branch August 19, 2026 12:45
SSFSKIM added a commit that referenced this pull request Sep 24, 2026
…, R1-F3); pre-existing dead-session slot gap filed as #75
SSFSKIM added a commit that referenced this pull request Sep 24, 2026
Report the BOARD_GH_TIMEOUT decimal normalization, the 300s caps on the
GitHub read bound and the renewal interval, and the budget-long drill's
resizing, with the aggregate test evidence as it happened. State the
tree-quiet gate as a best-effort proxy and the dead-seat cleanup as the
pre-existing #75 gap, matching the re-pinned Decision Log.
SSFSKIM added a commit that referenced this pull request Sep 24, 2026
…viewed head (#182)

* spec(#74): the API tick's finalize pass — a merged PR at the reviewed head closes its ticket

* spec(#74): second revision after the adversarial review — order ahead of review-recover, re-read before the write, sync the seat, bump the version

* sweep(api): a finalize pass closes a ticket whose PR merged at the reviewed head

* tests: the api finalize pass, hermetic

* qa-loop: the trail names the reviewed head; the API finalize pass beside gh's FINALIZE

* spec(#74): record full-tier verification

* spec(#74): record the PR and handback constraint

* sweep(api): finalize treats a dead owner as not mid-turn

A session that died mid-turn leaves status=working in its registry record;
finalize read that field without _liveness's verdict and stalled the merged
ticket behind an owner no agent will ever speak for. A dead seat now skips the
mid-turn check and the close is written as its run, as the spec's step 3d
intends.

* sweep(api): finalize writes nothing when the registry scan fails

_metas_for_ticket runs through a process substitution, which hides a dead
scan; finalize read the empty result as no owner and fell to the automation
write, whose override passes the local fence and whose principal skips the
server's by-this-run trail gate. The pass now checks _scan_ok like every other
scan consumer and skips the ticket, and reads the scan to its end so the
status is written before it is checked.

* sweep(api): finalize renews live leases on a clock across its scan

The pass reads GitHub and the board serially for every in-review ticket, and
that scan can fill the tick budget, which is the lease's own length, after the
tick's one renewal. Every live run is now renewed again ahead of a candidate
once the last renewal pass began BOARD_FINALIZE_RENEW_SEC (default 300) ago.
On a clock rather than per item as relay and resume do, because a per-candidate
renewal would cost runs x candidates calls every tick.

* spec(#74): re-pin — finalize leaves a live owner whose QA child still reviews (R2-F1)

* sweep(api): finalize leaves a live owner whose transcript tree is still active

An idle live owner may still have its QA child reviewing under subagents/;
any done ends the run out from under it. Apply review-recover's whole-tree
quiet gate against REVIEW_STALL_MIN before writing; no transcript is no
signal, and a dead owner bypasses the gate.

Fixture ticket 91 is now the pinned live+idle owner with a fresh tree; the
dead-owner coverage moves to ticket 92 (fresh file, still closes as run).

* sweep(api): finalize holds a ticket whose owner carries an unresolved fork

_liveness reads status=error + pending_short as forked: not dead, but its
record is not working/blocked either, so finalize wrote done as the run
while the fork may still be live on it (and the tree gate only sees the
superseded turn's transcript). Hold and surface it on stderr, as relay and
resume already do. Fixture ticket 93 (forked owner, stale old transcript,
accepting by-id row and transition) proves no write.

* sweep(api): finalize takes its list round-robin past the last ticket a tick took

A budget spent mid-list re-read the list from its head every tick, so the
same first candidates took the budget each time and a merged ticket behind
them was never examined. The last ticket taken is kept in a per-binding
store and the next tick starts past it, wrapping at the end.

* qa-loop: the reviewed-head trail line is a PR review's; a scale trail names its ranges

Every PR trail carries the head the latest engine round reviewed, the trail
so far before a hand-up included. A scale run has no PR and no merge, and may
have no aggregate head, so its trail names the ranges it reviewed instead.

* sweep(api): finalize bounds its GitHub read under the tick lock

A stalled gh pr view held the per-board lock with no renewal until GitHub
answered: the budget is checked before the read and renewal runs between
candidates, so neither can end a read in flight. _gh_read_bounded runs gh
in its own process group under BOARD_GH_TIMEOUT (60s, clamped >=5) and kills
the group on expiry; the existing could-not-read log and continue stand.

Test: a PR read hanging 147s in a grandchild ends at the 5s bound, 80 is
logged and skipped, 88 still closes, runs renew after it, the helper is
dead and the lock released. Red on the unbounded call (took 72s at a 47s
hang, 80 closed off the late answer) and on a child-only kill (helper left).

* spec(#74): the retrospective reflects the review loop's changes and the open park

Outcomes & Retrospective predated every QA wave. It now names the live-tree
gate, dead owner, unresolved-fork hold, failed-scan hold, clocked renewal,
round-robin fairness, the bounded GitHub read and the PR-only head line, and
states the remote-owner automation fallback as the open human park with no
merge. A living-plan retrospective only: no re-pin, no pinned-section edit.

Checks: test-sweep-finalize.sh PASS (drills 91-93, scan, renew, rotate, hung
read) and test-qa-loop-agent.sh all passed at this head.

* spec(#74): re-pin — automation close only for a null owner_run; a non-null remote owner_run is left for its home host (R3-F2, human's second re-pin)

* sweep(api): finalize closes as automation only for a null owner_run; a remote owner run is left for its home host

A non-null owner_run with no seat in this registry is a lease-live owner
elsewhere, whose QA child this host cannot see; a done from here would end
that run under it. Skip it with the 'another registry' line; the automation
override reason now names the only case that reaches it. Ticket 94 drills
the skip.

* sweep(api): under `all`, finalize takes a share of the tick, not all of it

Slow GitHub reads across the in-review list could spend the whole tick
budget on every `all` tick, starving review-recover, relay, resume and
dispatch indefinitely. The `all` arm now gives finalize half of what the
tick has left: a later candidate is taken only if a read run to its bound
still ends inside the share, and the first candidate's read is cut at the
share's end, so even a budget-long read cannot outlast it. The whole-tick
_budget_left ceiling, the cursor rotation, and a standalone `finalize`
(no share) are unchanged.

Drills: two slow-read `all` ticks (20s budget, 3s reads) stop finalize at
its share, keep the rotation, and reach dispatch's claims; two `all` ticks
whose first read is as long as the budget (8s/8s) cut that read and still
reach dispatch.

* spec(#74): re-pin — a dead local owner is left for the reclaim, not closed as its run (R3-F1: dead-run close leaks the seat slot)

* sweep(api): finalize leaves a dead local owner for the reclaim instead of closing as its run

A done written as a dead run ends it server-side, but a dead session is never
renewed, so no 409 strips the run from its meta and the seat keeps its run and
dispatch slot. The dead owner is now skipped with the spec's dead-session line;
its lease lapses, the reclaim clears owner_run, and a later tick closes as
automation. Ticket 92's drill is inverted in place (R3-F1).

* spec(#74): re-cut — finalize leaves any lingering-predecessor-seat ticket to the recovery lifecycle (R5-F1: automation close leaked the reclaimed dead seat)

* fix(api): leave reclaimed tickets with lingering owner seats for recovery

* spec(#74): re-pin — state finalize's liveness/cleanup honestly (R1-F2, R1-F3); pre-existing dead-session slot gap filed as #75

* fix(api): read BOARD_GH_TIMEOUT as decimal before finalize's share arithmetic (W1-1)

* test(api): size the budget-long first-read ticks for the phases behind finalize (W2-1)

An 8s budget handed review-recover, relay and resume roughly half of it
after finalize's cut read; those phases take ~2s here on their own, so
dispatch's budget gate raced them (observed: dispatch started at ~8.2s
of an 8s tick). A 30s budget with a 30s read keeps the proof (an uncut
read would spend the whole tick) and leaves the phases ~13s.

* fix(api): cap finalize's GitHub read bound below the run lease (W2-2)

BOARD_GH_TIMEOUT clamped only from below, so an override of 901 let a
standalone finalize read wait past the 15-minute lease with no renewal
while the tick held the lock. Capped at 300: a read on top of a renewal
interval and a candidate's 30s board calls still ends inside the lease.

* fix(api): cap finalize's renewal interval below the run lease (W2-3)

BOARD_FINALIZE_RENEW_SEC accepted any integer, so an interval of 1000
let a standalone scan of slow PRs go past the 15-minute lease between
renewals with the lock held. Capped at 300 alongside the read bound.

The tests that held renewal off with an over-lease interval now let it
run: the scan-fail stub dies only after GitHub is read, and u-90's
native wake lands only after its PR is read, so finalize's own sync is
still the one pinned.

* spec(#74): refresh Outcomes after the QA fix waves (WC-1)

Report the BOARD_GH_TIMEOUT decimal normalization, the 300s caps on the
GitHub read bound and the renewal interval, and the budget-long drill's
resizing, with the aggregate test evidence as it happened. State the
tree-quiet gate as a best-effort proxy and the dead-seat cleanup as the
pre-existing #75 gap, matching the re-pinned Decision Log.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant