Skip to content

issue-tracker: the gh sweep bounds a dependency wait — a stranded ticket is reported (arkho #61) - #155

Merged
SSFSKIM merged 7 commits into
mainfrom
arkho-61-gh-stall
Sep 15, 2026
Merged

SSFSKIM merged 7 commits into
mainfrom
arkho-61-gh-stall

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Board ticket: arkho #61 — https://arkho-board-service.onrender.com/tickets/61
(the gh half of arkho #56; registered on the arkho board because a run
cannot register into another repository's board, while the change lives here).

No Closes #61 line, deliberately. This repo's #61 is an unrelated
merged PR, and the board ticket is not a GitHub issue in this repository —
a same-repo close keyword would shut the wrong thing. The ticket is closed
on the arkho board. (#146, the other half of this pair, has the same shape
and resolved it the same way.)

Why

B.eligible refuses to draw a ticket for exactly as long as a blocker is
unfinished. That refusal is correct, and it is the whole of what the gh board
does about the wait — nothing ages it, nothing asks whether the blocker is
still moving, and nothing tells a human when it is not. A ticket whose blocker
never lands (a park nobody answered, a deferred shelf, a wontfix close, a
worker reclaimed and never resumed, a ring of blockers) sits in its queue
forever, owned by nobody and reported to nobody. #146 lets a worker put its own
ticket into that state autonomously, so the state is now reachable without a
human ever having looked at it.

The API board's reconciler grew a pass for this in arkho #56. The contract
there is binding-neutral doctrine; the implementation is API-only, because on
that board the server owns liveness and the api-mode sweep client holds no
transition authority. The gh board has no server: its liveness owner is
board-sweep.sh, whose RECOVER pass already parks needs-human with an
orientation note when a worker dies past its recovery cap. So the gh half is a
pass beside that one.

What changed

skills/issue-tracker/scripts/board-sweep.sh — a STALL pass, ordered
after IMPACT and before SURFACE/DISPATCH. It runs after RECOVER on purpose,
and it reads RECOVER's own ladder (below).

The API board has a ledger, an owner_run column and a server. gh has none of
the three, so every predicate is translated to a signal this script already
reads:

#56 predicate gh signal
activity(B) — newest ledger event over B's subtree newest updatedAt over B's subtree. GitHub bumps it on every comment, label, body edit and state change; the IMPACT pass already trusts it as a per-child scan cursor
being worked — in-flight with owner_run a registry binding for this board on B or anything under it, still on RECOVER's recovery ladder
chain link — a waiting leaf, or a ticket already reported same, and the "already reported" half is read from the park note, which the snapshot carries for free
reported — a reconciler event newer than activity(B) the pass's own marker comment, carrying the blocker activity it reported (marker: stall #42@<iso>)
stall threshold DEPENDENCY_STALL_MS (48h) SWEEP_STALL_DEPENDENCY_MINUTES (2880 — the same 48h)

Two deliberate divergences from the spec, both because the gh queue is not
the API queue:

  1. wontfix is an unfinished blocker here. codex-companion: reap leaked broker/app-server processes — idle timeout or session-end equivalent #56 defines unfinished as "not
    done and not wontfix". But B.eligible draws a ticket only when every
    blocker is done, so on this board a wontfixed blocker — and a blocker not
    on this board at all — strands its waiter permanently. It is the most
    durable gh stall there is; reading TERMINAL here would make it the one
    case the pass cannot see. (This follows issue-tracker: a worker records a dependency itself — blocked-by add, then the yield edge (arkho #49) #146's own not-blocked guard,
    which kept the same asymmetry deliberately.)

  2. A dispatch-eligible blocker is never a stall root (dispatch_pending,
    no counterpart in codex-companion: reap leaked broker/app-server processes — idle timeout or session-end equivalent #56). There, claimNext draws an eligible ticket within
    seconds. Here a lane is cap-bounded and a ticket can sit in
    ready-for-implementer for days purely because the slots are full — the
    ordinary "do A before B" edge with A still queued. Without this clause every
    ticket behind a lane backlog is parked once the backlog is two days old: a
    report about dispatch capacity dressed up as a dependency failure. With it,
    this and the chain-link rule read as one sentence — a blocker sitting in a
    lane queue is never a stall root, because it waits either on its own blocker
    (somebody else's report) or on a dispatch slot (somebody else's pass).

"Being worked" is scoped to this board, and reads the recovery ladder.
$DAEMON_HOME is machine-global while a board is not, so a neighbouring
checkout's worker on ITS #42 must not silence this board's report about OUR
#42 — every meta is filtered through _board_api.meta_is_mine against
gh:$BOARD_REPO. And RECOVER backgrounds sminos resume and returns inside
the same tick, so a binding it is actively recovering still reads idle when
this pass runs: idle/error therefore counts as worked while the ladder has
a rung left. An exhausted ladder stops counting on purpose — RECOVER's own
answer to exhaustion is to park the blocker needs-human, and a dead binding
must never suppress a report forever. B.live_bound_tickets() itself is
untouched; its other callers stay tech-debt row 13.

A ring that cannot be parked is still judged. The cycle branch parks or
falls through to the temporal rule — it never skips the ticket. #56 is
explicit that a ring member in flight, unowned and silent past the threshold
is a stalled root, and that the STALL rule is how a never-resumed member is
caught at all. Nothing doubles up: a ring member sitting in a lane queue is a
waiting leaf, and a parked representative carries a [dependency- note, so
the chain-link rule already reads both as somebody else's report.

Dedupe is the marker's payload, not a clock. #56 compares a report's event
timestamp against activity(B). Here the marker records the blocker activity
it reported, so "not again until the situation changes" is a string comparison
— and it is the only dedupe available for a ring, which has no timestamp to
compare at all. It is read from the COMMENT trail rather than the note, because
a human who re-queues the ticket by hand overwrites the note, and losing the
dedupe there would re-park the ticket the moment they put it back.

references/implement-worker-protocol.md — one sentence in the
dependency-yield paragraph, binding-neutral: the wait is bounded, and what
comes back if the blocker dies.

SKILL.md — the yield paragraph's "the board re-surfaces the ticket when
its blockers land … which no park state does" now also says what happens when
they never land. The same edit re-joins the phrase which no park state does
onto one line — see the note on main being red, below.

references/sweep-setup.md — the knob row and the tick summary.

docs/doperpowers/TECH-DEBT.md — rows 18, 19, 20 (see Follow-ups).

Version 7.90.0, bumped in the same commit per the marketplace rule.

Validation Evidence

Claim Evidence
The pass fires on a blocker that has stopped moving, names it and the chain, and does not fire twice bash tests/issue-tracker/test-board-sweep.sh — 199 passed / 0 failed, 0 bytes on stderr, 64 of them new. Fixtures are seeded in the new section only, so every tick above them still runs against a board with no blocked-by edge at all
...and it is the PASS doing it, not the fixtures the same suite with only the pass_stall invocation removed: exit 1, 35 [FAIL], every one a positive assertion. The negative drills stay green without the pass, which is what they should do
...and each review fix bites on its own the suite against the pre-fix pass source with the post-fix drills: exit 1, 8 [FAIL] — 3 for the cycle fall-through, 2 for the fabricated ring edge, 3 for the board-scoped / ladder-aware worker signal. Run independently of the fix author
Criterion 1 — park + [board] comment carrying the marker; a second tick does nothing drills: a waiting ticket whose blocker is shelved and silent is parked · the park comment is board-authored and carries the marker · a second tick parks nothing further
Criterion 2 — a blocker being worked, or a chain link, never triggers it drills: a blocker with a live bound worker is a normal wait, however old · an epic blocker with an active child is being worked, though its own row is silent · a ticket waiting on an already-reported link stays put · a blocker that is merely queued for dispatch is never a stall root · a ring whose in-flight member has a live worker is left alone · RECOVER backgrounds a resume … so its blocker is still being worked
Criterion 3 — a ring with no member in flight parks exactly one member per situation; cutting an edge ends it drills under dependency cycles: one park, the other two untouched, [sweep] STALL: 0 acted next tick, and board-edge.sh 97 --unblock 95 ending it
Criterion 4 — the drills sit beside the other passes' and fail without the pass the two rows above
Criterion 5 — the protocol states it in one sentence references/implement-worker-protocol.md, the dependency-yield paragraph
The cycle note never names an edge that does not exist a branched ring (110→111, 111→{112,113}, 112→111, 113→110) asserts the walk is #110 -> #111 -> #113 -> #110 and specifically NOT the #112 -> #110 link a greedy walk dead-ends into
A dead binding cannot suppress a report forever, and a live recovery is not mistaken for one three registry drills covering a pending recovery (waiter NOT reported), an exhausted ladder (waiter IS reported, naming the blocker RECOVER just parked), and another board's ticket of the same number (suppresses nothing here) — with one existing meta left unstamped so meta_is_mine's legacy-reads-as-ours direction stays covered
The pass costs a board with healthy waits nothing beyond the snapshot every pass takes drills under board-sweep: STALL read cost, measured on the harness's own COMMENT_READ_LOG: a candidate whose blocker is being worked, and one whose blocker is merely queued, are read 0 times; a blocker's own comments are never read; the single worst-case shape — due on every predicate but the dedupe — costs exactly 1. The dedupe read is the LAST check for that reason, so a cursor file (the machinery IMPACT needs) is not required here
The script still parses, and its embedded Python with it bash -n clean; the pass's heredoc extracted from the SHIPPED file and ast.parsed clean; shellcheck -S warning -x clean on both the script and the test file
The note a human actually reads is complete and actionable both notes rendered from the SHIPPED format strings (lifted out of the script, not retyped): each names what waited, on what, for how long, the chain behind it, and three concrete repair commands — no event-trail lookup needed
Nothing else regressed every other tests/issue-tracker/ suite green — test-board-scripts.sh, test-board-surface.sh (45 assertions), test-board-gc.sh, test-snapshot-cache.sh, test-execute-dispatch.sh, test-protocol-content.sh — plus tests/shell-lint/test-lint-shell.sh. scripts/bump-version.sh --audit clean at 7.90.0

An independent cross-model review ran against the first draft of this pass and
found six real defects. All six are fixed in this branch (the cycle
fall-through, the fabricated cycle edge, the board-blind and ladder-blind
worker signal, the missing version bump) or logged with a trigger (the two
tech-debt rows). Each fix carries a drill that fails without it.

Not claimed: no live gh board was exercised. Every drill runs against the
shared mock gh with the real _board.py and the real board-transition.sh /
board-edge.sh on top of it, which is how every other pass in this file is
tested — but the pass has not yet parked a ticket on a real GitHub-backed
board.

main is red right now, and this PR repairs it. test-protocol-content.sh
asserts on the phrase which no park state does; #146's rewrap of that
paragraph split it across a line break, so the phrase appears zero times as a
contiguous string on main today and that suite fails there. The repair is a
two-word reflow, in a paragraph this PR edits anyway. Worth noting on its own:
a merged PR took a suite red, which is TECH-DEBT row 4 ("No CI/pre-push gate
on the shell test suites") cashing out.

Confusions

Follow-ups

FOLLOW-UPS: none registered. Three residuals are logged in
docs/doperpowers/TECH-DEBT.md, which is where this repo tracks accepted debt
(GitHub Issues are disabled on this fork), each with the trigger that promotes
it:

  • row 18 (T3) — the pass considers waiting LEAVES only, so an epic's own
    dependency wait is unobserved. Inherited from codex-companion: reap leaked broker/app-server processes — idle timeout or session-end equivalent #56's own Design §4 decision.
  • row 19 (T2) — every sweep pass writes from a snapshot taken once at pass
    start, so a concurrent writer in that window can leave two status:* labels
    on one issue. Bounded today (single-instance lock; this pass's candidates are
    never B.eligible, so no dispatcher can be that writer), and fencing one
    pass buys no guarantee — it wants a fence every writer shares.
  • row 20 (T3) — the dedupe has no cross-tick cursor. Bounded structurally
    (the read is the last predicate checked, and any human touch buys another
    full threshold of silence), unbounded on a board where many tickets are
    re-queued onto blockers that never move.

`B.eligible` refuses to draw a ticket while a blocker is unfinished, and
that refusal is the whole of what the gh board does about the wait: nothing
ages it, nothing asks whether the blocker is still moving, nothing tells a
human when it is not. The dependency yield (#146) makes that state reachable
without a human ever having looked at it.

board-sweep.sh grows a STALL pass — the gh half of the binding-neutral
contract the API board's reconciler owns (arkho #56). Two signals: a CYCLE,
structural and clockless, fired once no member is in flight; and a STALL on
the BLOCKER's silence, gated by the waiting ticket's own wait reaching the
same threshold. Both park the waiting ticket needs-human with the blocker,
the chain behind it, and the repairs in the note.

Each predicate is translated to a signal the sweep already reads: issue
`updatedAt` over the blocker's subtree for the ledger, the daemon registry
for `owner_run`, the park note for "already reported". Dedupe is the marker's
own payload rather than a clock — it is the only dedupe a ring admits.

Two divergences from the spec, both because the gh queue is not the API
queue. `wontfix` is an unfinished blocker here, because B.eligible accepts
only `done` and a wontfixed blocker therefore strands its waiter forever.
And a dispatch-eligible blocker is never a stall root: a cap-bounded lane
leaves eligible tickets queued for days, and without that clause every
ticket behind a backlog is parked for it.

Threshold SWEEP_STALL_DEPENDENCY_MINUTES, default 2880 (48h), the same
number as the API board's DEPENDENCY_STALL_MS.

Also: the protocol's dependency-yield paragraph says what comes back if the
blocker dies, and SKILL.md's re-joins the phrase test-protocol-content.sh
asserts on, which a rewrap on this branch's base had split across a line.
The IMPACT pass needs a persisted cursor because it must read every
child's comments. This pass gets the same bound by ordering its
predicates — the dedupe read is the LAST check, reached only by a
candidate already due on every snapshot-derived one. The drill measures
that: one read in the worst-case shape (due on everything but the
dedupe), zero for a healthy wait, and never a read of the blocker.
…is board's workers

Six defects an independent review found in the gh STALL pass (arkho #61),
none of them changing what the pass is for.

A ring that cannot be PARKED still has to be JUDGED. The cycle branch used to
`continue` on three paths — a member still in flight, this ticket not being
the ring's representative, the ring already reported — and each of those
skipped the temporal stall evaluation below as well. arkho #56 is explicit
that a ring member in flight, unowned and silent past the threshold IS a
stalled root, and the STALL rule is how a never-resumed member is caught at
all. The branch now parks-and-continues or falls through, nothing else.
Nothing doubles up: a ring member in a lane queue is a waiting leaf and a
parked representative carries a [dependency- note, so the chain-link rule
already reads both as somebody else's report.

`ring_walk` could name an edge that does not exist. It was a greedy forward
walk with no backtracking, so on a branched strongly connected component it
dead-ended and closed the walk with the start anyway — printing a blocked-by
link nobody ever drew, into a note whose whole job is telling a human which
edge to cut. It is now a depth-first search with backtracking, deterministic
in ascending numeric order, returning only a path whose closing step is real.

The "being worked" signal is this board's, and it reads the recovery ladder.
`B.live_bound_tickets()` is board-blind — $DAEMON_HOME is machine-global, and
a neighbouring checkout's worker on ITS #42 was suppressing this board's
report about OUR #42 — and status-blind in the other direction: RECOVER
backgrounds `sminos resume` and returns inside the same tick, so a binding it
is actively recovering still reads `idle` when STALL runs. The pass now builds
its own set: metas filtered through `_board_api.meta_is_mine` against
`gh:$BOARD_REPO`, counting `working`/`blocked` always and `idle`/`error` while
the ladder has a rung left. An EXHAUSTED ladder stops counting on purpose —
RECOVER's own answer to exhaustion is to park the blocker `needs-human`, and a
dead binding must never suppress a report forever. `live_bound_tickets()`
itself is untouched; its other callers stay tech-debt row 13.

`activity()` records one deliberate reading: a park this pass writes onto a
ticket inside the blocker's subtree bumps that ticket's `updatedAt`, which is
bookkeeping rather than progress, and the snapshot is not re-read to pick it
up within a tick — at the honest cost that a later tick does see it.

Version bumped to 7.87.0 in the same commit, per the marketplace rule.

Two findings are logged rather than fixed (TECH-DEBT rows 19, 20): the
snapshot-to-write window every pass shares, which wants a fence all writers
hold rather than a fix in one pass; and the dedupe's per-candidate comment
read, bounded structurally today but with no cross-tick cursor.

Drills: the 101/102/103 fixture now asserts the report it was silently
swallowing; a new 104/105/106 ring with a LIVE bound worker pins that the
fall-through is not a false-positive machine; a branched ring asserts the walk
names real edges only; and three registry drills cover a pending recovery, an
exhausted ladder, and a foreign board's ticket of the same number — with the
existing unstamped meta left unstamped so the legacy-reads-as-ours direction
stays covered. All three suites green, 199 assertions, no stderr.
# Conflicts:
#	.claude-plugin/marketplace.json
#	.claude-plugin/plugin.json
#	.codex-plugin/plugin.json
#	package.json
@SSFSKIM
SSFSKIM merged commit 86132e4 into main Sep 15, 2026
@SSFSKIM
SSFSKIM deleted the arkho-61-gh-stall branch September 15, 2026 17:06
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
sminos 1.27.4: the send RPC on RL10 (MAWS O9 §E, board #155)

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
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