Repository navigation
E2: ticket ledger & observability (v7.36.0) + 15-round hardening campaign - #42
Conversation
…chitect / in-design / ready-for-implementer (E1); final LEGAL table, DISPATCHABLE/PRE_PARK/EDGE_NOTE tables, mechanical suite rename
…literal; Step 8 grep scoped to scripts/ (SKILL.md/ticket-gate rewrites are Task 13's)
…keleton guard covers both lanes
…n the Architect handoff edge
…ign/in-progress/in-review)
…th [answers] reset
…umes, ready-for-* retires)
…'s full RECOVER line (the bare "resume attempt 1/" substring is satisfied incidentally by seeded tickets 10/12)
…in, X4 exemption, per-lane slot caps
…intf|grep -Fq -> herestring, matching test-review-dispatch.sh)
…moved, architect escalation edges added (E1)
…e every other section; assertion pins MODE SELECTION as the plan's Step 1 intended (plan text amended to match)
… — the latter pre-dated this task and could not catch a regression to the retired mode
…st — the board has no ready-for-architect → ready-for-implementer edge, so the documented decompose exit was unreachable from the gate (plan text amended; assertion pins it)
…eedback is T14's; T16 owns the repo-wide proof)
…ect-lane gate variant, lane-aware rituals
…e skill prose must not force a permanent carve-out in the residual-vocabulary grep (plan text amended)
…ocabulary, 1:1 swap)
…r-architect impasse route (E1; pins/fix-wave ride C5)
…ins (pre-spec runs DIRECT and does post a gate comment); add Step 4b for ORIENT + PARKED-tier completeness
… the impasse turn-ending, patch ORIENT's pointer Review found three defects in the T15 lane-split landing: - the authorization-anchor rule claimed no plan:-pinned ticket carries a [gate] pass, which is false for plan: pre-spec (DIRECT mode, posts a real gate) — only plan: <path>@<sha> (PLAN-EXECUTION) posts none; narrowed the rule so pre-spec tickets still anchor on their gate - the RE-REVIEW impasse's ready-for-architect branch had no turn-ending unlike its needs-human sibling, and ESCALATE's PARKED tier didn't cover a ticket that route just parked there - ORIENT pointed only at the [gate] pass comment, which doesn't exist on a real plan: <path>@<sha> ticket; added the handoff-comment alternative as a pointer, consistent with the anchor rule
…es — handoff comment admits the missing-section finding, plan pin joins the spec hierarchy
…ion event, pre-spec is a plan-need ruling
…t version; name the two known residual test descriptions
The queue-state arm of RECOVER acted only on absent|error. A worker that wrote its destination handoff state — its job on this ticket finished — but stays live and silent keeps its meta binding the ticket, and implement-dispatch both charges that binding to the destination lane's slots and refuses to dispatch a ticket a working worker owns. A cap-1 lane blocked for as long as the process lingered. Past the stall threshold such a binding is now retired. Not the in-flight arm's resume ladder: a queue state is handed-off, the worker owns no further writes here, and the log line says so. Workers on in-flight tickets are untouched — they own their exit. Verified rather than assumed: STALL_MIN is NOT measured from the meta's `updated` field, as the finding supposed. Every silence check in this file uses the bound session's TRANSCRIPT mtime, because the meta's `updated` is bumped by the finalize call the check itself just made and would mask the very silence being measured. This arm reuses that mechanism.
…ll routes what it named L3 — K2 made epic-hood outrank category at dispatch, but board-transition still banned the spike CATEGORY from every entry into ready-for-architect. A decomposed spike epic's scale-defect route (in-review → ready-for-architect) was rejected, leaving the parent mislabeled in-review with nothing able to move it. Leaf-hood is the discriminant now: a spike WITH children is an epic and follows epic rules, and the guard's own comment says why the original ban exists (the spike protocol's gate-pass write is in-progress, which has no edge out of that queue) and why it cannot reach an epic (the dispatcher routes an epic there as an ARCHITECT claim). L4 — pass_impact skipped a child with no parent before ever parsing its proposal's named target, so board-edge --orphan after posting killed the discovery. That contradicts the contract K3 rests on: the recut does not retire what the child found. A parentless child is now skipped only when it carries no proposal, which means its comments must be read to know — the same read-set widening as F3 and K3, noted in the pass header with the same bound options. A proposal that names nothing and has no parent to fall back on is left unmarked with a log line.
A reviewer that dies pre-reply finalizes `error`; the respawn path retires that meta; daemon-retire — which is daemon-owned, not local to this script — overwrites status with `retired`. That status WAS the only evidence _outage_streak had, so the walk hit the retired meta, broke, and the streak never reached 3. The sweep respawned a doomed reviewer every tick forever and F4's escalation was unreachable for exactly the failure class it exists for. Mechanism chosen: a local `_retire_failed` stamps `retired_from: failure` into the meta (through the same _stamp_meta lock board-bind uses) BEFORE calling the daemon's retire, and _outage_streak counts a retired meta carrying that stamp as a failure and keeps walking. Only failure retirements are stamped — a superseded reviewer (new closure package) and a stale-ticket cleanup carry none, so a non-failure retirement still breaks the streak and cannot inflate the cap toward a false escalation. The test harness's retire stub was log-only, which is what hid this: a "retired" failure kept status=error and the streak counted it either way. It now writes status=retired and bumps `updated` like the real script, and the spawn stub's timestamp increments per spawn so a worker spawned after a retire sorts newer than it, as in production. Four assertions that read a meta's status after a retire now assert on finalize's durable evidence (its reply file) instead.
The sweep's ticket-status read took the first status label, so a ticket carrying `status:in-review` AND a second label — `conflict` by _board.py's own definition — passed as in-review whenever in-review happened to sort first, and a reviewer was bound to an unrepaired ticket whose other label often said a human was waiting. The check requires exactly one label now. Two or more report as conflict(<labels>) and take the skip path with a message naming the repair rather than a puzzling "not in-review". Zero labels keeps the deliberate fail-open for untracked/off-machine tickets, with its comment intact.
…ispatched for recomposition L6 — verified against the E1 lane-split plan first (docs/doperpowers/plans/2026-07-31-implement-lane-split.md:1711-1715): it says the feedback registrar keeps its conservative gate, "no architect-lane births: feedback tickets are bug-shaped; a design-heavy item lands needs-human for the human to route". The TypeScript gate already enforces the birth-state SET (ready-for-implementer | needs-human | needs-info, no architect lane), but it demotes only on category, citation, risk surface and lint — nothing told the triage worker that a design-heavy item belongs in needs-human, so it could recommend ready-for-implementer and the ticket would dispatch to an Implementer only to bounce into the architect lane. The protocol now says it, in its own voice, with the reason: the human decides architect-lane entry. L7 — E2 dispatches ready-for-architect epics for recomposition and reconciliation claims, so "epics are never dispatched" is false where the operator manual and the decompose reference still said it — the edge-case entry instructed a worker to refuse a VALID claim. Both now say never dispatched for IMPLEMENTATION, and the edge case distinguishes the IMPLEMENT/SPIKE mistake from the ARCHITECT claim that is the one way an epic is dispatchable at all. Content pins for both live in test-protocol-content.sh, which is already the cross-skill prose-pin home (it pins issue-tracker, decomposing and reviewing-prs prose). The triaging-feedback skill's own vitest suite covers src/, not its protocol prose, so it had no pin of its own before this.
…lled epic's idle Architect is retired M1 — K3 routes a proposal to the parent it names, and authorAssociation (H1) only proves the comment came through the repo token. Workers post through that token, so a malformed or prompt-injected `[parent-impact] #123 …` could name ANY open ticket and this pass would move it to ready-for-architect — a write no LEGAL edge authorizes and nobody asked for. The named target must now belong to the child's lineage: its current native parent, or the parent recorded in its `parent-pin:` meta. The pin is what keeps the legitimate cases working — it holds the OLD parent across a reparent (K3's case) and survives an orphan (L4's), which is exactly when the current parent is not enough. Anything else is skipped unmarked, naming the child, the claim and the lineage that rejected it. The pin is not a snapshot field, so it is read from the meta block and its `#<n> @ <sha>` shape parsed for the number. M3 — an epic's `in-progress` is never a worker's own lane: the architect lane is in-design and children own real in-progress, so an epic gets there only by the pull's bookkeeping. The normal decomposed-epic path therefore ended with RECOVER resuming a finished Architect — it hands the parent to ready-for-implementer and ends, a child goes active and pulls the parent to in-progress, and the pass sees an idle worker on an ACTIVE ticket. L1's stall-retire covers only the queue-state window, which the pull closes early. An idle worker bound to an epic in in-progress is now retired, not resumed; an Architect mid-recomposition (epic in in-design) stays resumable. _bound_rows carries an is-epic flag for it, and all three readers take it.
…rphaned-work retirements are not failures M2 — the off-review stale cleanup retired a finalized-idle reviewer whose ticket sits in needs-human, which is the RESUMABLE park: board-answer.sh relays to the bound session and accepts only an idle/awaiting-human one, so the retirement broke the wake path the park's own note promises. Verified which parks that covers: board-answer relays needs-human parks ONLY — it dies by name on interactive-preferred and needs-info, naming their alternative routes — so needs-human is the whole set with a session-resume path to protect, and the other parks correctly keep retiring. The message for those no longer claims board-answer will resume them. Both stale paths honor it: run_for's off-review branch and the registry enumerator. F4's capped-outage path is untouched — it retires BEFORE parking, deliberately. M4 — L2 stamped the whole respawn path as a failure, but triggered mode respawns a CLEANLY finished reviewer on every explicit PR event, so two ordinary re-reviews plus one real outage reached the 3-consecutive cap. _finished_verdict now emits `respawn-clean <uuid>` for that case and the retire it drives carries no stamp; every other respawn is a dead session or an outage and still stamps. M5 — same deadlock as G1, PR side: the sweep enumerates OPEN PRs, so when a reviewer routes its ticket off in-review and the PR then closes, nothing ever finalizes the lingering meta and implement-dispatch skips the now-eligible ticket forever. G1's enumerator is generalized into one _cleanup_orphaned_reviewer helper both species use, and the PR walk feeds it review-pr-* metas whose PR is absent from this tick's open listing (captured once from the existing call, drafts included — a draft is open). Parked tickets are exempt on both paths, M2's rule. Neither retirement is stamped: orphaned work is not a failure.
colOf's close-candidate relocation exempted in-progress and in-review but not in-design, so an Architect mid-design on a ticket with a previously merged linked PR was shoved into the close-candidate column — while _board.ACTIVE and lint both treat that as ordinary mid-flight shape. in-design is the architect lane's in-flight state and belongs with the other two. The template suite (test-board-template.cjs, run from the board-scripts suite) already had an in-design fixture; it is now also a close candidate, which pins both that it renders its own non-core column and that it is not relocated out of it. Checked while in the file, as asked: the HTML view does NOT carry the eligibility-fallback defect F6/G6 fixed on the sibling surfaces. Its payload takes `eligible` straight from `B.eligible` (board-map.sh:420), so the template's filters, sorting and counts have always used the authoritative predicate — only the Markdown fallback's state_label re-derived it.
Round 7's concern, materialized. The pin stamp was a single-value overwrite, so a child reparented and redispatched while an earlier proposal still sat unmarked — its target parked, or already in the architect lane — lost the one record that made that proposal admissible, and M1's lineage check then rejected it forever. The discovery outlived the edge, which is exactly what K3 and L4 established it should. The stamp now appends when the recorded parent differs from the new one, entries separated by "; " (parse_meta splits a meta line on the FIRST colon only, so the value carries separators safely), newest last. A redispatch under the SAME parent still replaces that entry with the fresh sha — accumulation tracks lineage, not attempts. lineage() admits every recorded parent (findall, not the first match) plus the current native one. No expiry machinery: a pin retires when the board forgets the ticket. Growth is bounded by real reparents, which are human- or Architect-driven and rare.
G1's ruling — no new name filters, fix the lifecycle instead — covered STALE reviewer metas, and retirement resolved those. The LIVE window it did not cover: a working review-epic-* reviewer that has already moved its epic to ready-for-architect is still posting its trail, and while it does, _slots_used charged it to the architect lane and blocked every unrelated Architect dispatch on a cap-1 lane. _slots_used now excludes review-epic-* alongside review-pr-* and land-pr-*: reviewer species are accounted in their own registry, never in a lane's slots. This does not reopen G1's _bound_meta decision — per-ticket binding still blocks dispatch of the epic that reviewer owns, correctly; only the lane-wide count changes.
…rizes anything I4 required that a recorded branch exist; the pin itself was still only shape-checked. A mistyped or unpushed sha, or one whose tree lacks the named path, therefore minted gate-free PLAN-EXECUTION against an artifact no cattle clone can fetch — and the worker would discover it only after the gate had already been skipped on the pin's authority. Two remote checks now run before any state is written: the recorded branch must contain the sha (compare status identical or behind), and the path must exist at that sha (contents). Both fail CLOSED, and so does an API error — an unverifiable pin is not a pin, and the Architect pushes and retries. Each message names what to fix. pre-spec is untouched: it names no revision. The gh mock learned the two REST endpoints, driven by a small refs fixture (compare statuses, existing path@sha pairs, and a fail list standing in for API errors) so the fail-closed path is exercised rather than assumed.
M5 read absence from the open-PR listing as proof a PR had closed. The listing has a `|| rows="[]"` failure fallback and a --limit 100 cap, so a transient gh failure read as "every PR closed" and would retire completed dedupe records wholesale — duplicate reviews on the next healthy sweep — and PR #101 was permanently "closed" to it. Two changes. The listing's health is now tracked rather than swallowed, and the cleanup pass does not run at all on a failed one, saying so. And absence is only a CANDIDATE: each candidate is verified directly with `gh pr view <n> --json state` before any retirement — OPEN means off the cap, not gone; an unanswerable candidate is left alone this tick and named. Candidates are few, so the cap now costs verification calls, never correctness.
…ding set
Validated from two independent directions — raised in four consecutive fix-wave
reports, then quantified by codex: at the documented ~300-ticket board size and
a 5-minute cadence, reading every child every tick is 3,600+ sequential
`gh issue view` calls an hour, most of the GraphQL quota, minutes added to each
tick. Three rounds of correctness fixes (F3, K3, L4) each removed one filter,
so the pass had grown to scale with total board history rather than with active
work.
A child is read only when its issue updatedAt advanced since the last completed
scan, OR the last scan left a proposal undispositioned. Both conditions are
load-bearing: every new comment bumps updatedAt, so a fresh proposal always
qualifies — but a proposal the pass could NOT disposition (parked or
architect-lane target, invalid target) produces no new comment, so a plain
cursor would strand it forever. `pending` is what closes that, and it is why a
naive cursor is wrong here.
State lives in $DAEMON_HOME/impact-scan.json, never on the board:
{"version": 1, "children": {"<ticket>": {"seen": "<updatedAt>",
"pending": true|false}}}
written atomically at the end of a successful pass, pruned to tickets still on
the board. Missing, corrupt, or never-written (a pass that died early) all mean
a full rescan — the failure direction is correctness, never a silent skip.
The snapshot gained a full-precision `updated_at` beside the day-granular
`updated` it already carried for display, and the gh mock now bumps updatedAt
on writes the way GitHub does — without that the cursor tests would have been
vacuous.
…ion-due binds childless tickets Two protocol holes in skills/architecting/SKILL.md, both silent-stall shaped. 1. The corrective-child branch of a recomposition claim had no exit. The Architect registers the child and the epic has no verdict to write, so it sits in in-design — which PULL_FROM deliberately excludes, so the child going active can never pull it back. The epic waits forever on a pull that cannot arrive and the sweep force-parks the finished Architect every tick. It now takes the same needs-info release the reconciliation-claims exit already uses, noted "corrective child #<n> registered — waiting on children"; needs-info IS pullable, so the child restarts the cycle. 2. Reconciliation-due handling was written as epic-scoped. When the proposing child was its former parent's last child (reparented or closed away after posting [parent-impact]), the sweep still returns that parent to ready-for-architect with the reconciliation-due note and writes its dedupe marker — but the parent is a leaf now, so a claim reading the note as epic-only runs ordinary design, never retrieves the proposal, and the marker blocks any retry. The note now binds independently of child membership: retrieve and disposition the proposals first, then continue into ordinary design of the ticket with the findings folded in. Both clauses content-pinned in tests/implementing/test-protocol-content.sh (verified RED against the parent commit's prose).
…ranks category The spike-category branch sat above the ready-for-architect branch, so any spike-labeled ticket in the architect queue opened the spike protocol. That protocol's first board write is ready-for-architect -> in-progress, which has no LEGAL edge from that state at all: the worker hard-fails, the sweep re-dispatches into the identical failure, and the architect slot burns every tick. It was never an epic-shaped bug — round 9's guard covered only the epic case because that is the case that had been observed. Every spike in this queue hits it: one filed design-first by a human, and an ex-epic that went childless when its children were reparented away (exactly what the sweep's reconciliation-due return produces). The ready-for-architect branch now wins outright and the epic carve-out collapses into it — epic-hood was a special case of the state rule, not an exception to it. Category selects a protocol only within the implement lane, where a spike out of ready-for-implementer still routes SPIKE. T_IS_EPIC was the epic guard's only consumer, so the export and its B.epics() scan go with it. Tests: the childless-spike case is pinned in test-implement-dispatch.sh and was verified RED against the parent commit (3 asserts); the K2 spike-epic pin and the ready-for-implementer spike pin stay green.
…te, and count the architect lane as running Q1 — the leaf-spike ban is stale. board-register.sh refused a spike born ready-for-architect and board-transition.sh refused every edge into it, both because role resolution was category-first: the spike protocol dispatched from either lane queue and its gate-pass write (in-progress) has no LEGAL edge from that queue. Dispatch now routes the queue on STATE, so such a ticket gets an ARCHITECT whose exit is in-design — a design-first spike is a supported route. Both gates removed; the doctrine copy in issue-tracker/SKILL.md that documented the old precedence now states the state-first rule. The two refusal asserts in test-board-scripts.sh are deliberately INVERTED: birth into the architect queue and transition into it are now required to succeed, and the birth case is carried on into in-design to prove the exit is legal. Q2 — impact-scan.json recovery caught parse failures but not shape corruption. Well-formed JSON of the wrong shape ([], null, a bare string) parses, so _loaded.get raised AttributeError OUTSIDE the catch; the pass died before its atomic rewrite, the bad file survived, and every later IMPACT pass died identically — reconciliation permanently dead until a human deleted the file, the opposite of the documented full-rescan-on-corruption. The load path now validates the shape (dict, version 1, dict children) and discards anything else like a parse failure. Per-entry values are filtered the same way, since prior.get would raise on a non-dict record; a dropped entry costs that one child a rescan. Q3 — board-map.template.html: M6 added s_design to the column exemption but not to the telemetry. edgeClass drew an in-design blocker as an idle amber wait, and updateHeader left the Architect out of the running count, though _board.ACTIVE is (in-design, in-progress, in-review). Both now include it. Tests: all four asserts sets verified RED against the parent commit — board-scripts (the old ban aborts the suite at the birth call), board-sweep (7 shape-corruption asserts), board-template (2). board-scripts, board-sweep, implement-dispatch, protocol-content and the node template suite all pass; lint-shell clean.
… calling a pulled epic orphaned
R1 — the in-design terminal-authority guard covered done and in-review, but
LEGAL[in-design] also has wontfix and it closes the issue through the same
apply_state. An epic could be abandoned with children still running, bypassing
every recomposition invariant by picking the third terminal instead of the
first two. wontfix now joins the guard on the EPIC side: an epic needs
recomposition_ready for it. The LEAF side is deliberately not adjudicated —
whatever legality a leaf wontfix from in-design has today it keeps, and a test
pins that explicitly so the guard's scope is visible.
R2 — gh issue view --json comments serves ONE page, and three scans read it as
the whole log: the convergence count in board-transition, and the IMPACT
pass's child-proposal and target-marker reads in board-sweep. Past ~100
comments a truncated read drops traversals (bounces the convergence rule
exists to stop), proposals, and dedupe markers. The IMPACT case is the worst:
its cursor persists seen=<updatedAt> for a child whose proposal it never
reached, so that proposal is skipped permanently. All three now go through one
new helper, _board.comments(), which reads
repos/{owner}/{repo}/issues/{n}/comments with --paginate and normalizes the
REST field names (author_association) back to what the callers key on. gh()
dies on a non-zero exit, so a failed page kills the pass before any cursor
write — a cursor only ever records a complete read. The mock now models both
sides: issue view --json comments truncates at a page (the real 100 by
default, MOCK_GH_COMMENT_PAGE to shrink it), and the REST endpoint serves the
whole log, so a fixture can tell a page-1 reader from a paginated one.
R3 — board-reconcile called a pulled epic orphaned. A corrective child going
active drags its queued parent to in-design as bookkeeping (PRE_PARK); no
daemon is bound because none is meant to be, and telling the operator to
respawn and bind one invents work and would put a second Architect on a live
epic. The discriminant is the children: an in-design epic with any non-terminal
child now reports as pulled; all-terminal keeps the orphan warning (that is a
recomposition claim that SHOULD have an Architect), and a childless in-design
ticket is unchanged.
Tests: board-scripts and board-sweep both verified RED against the parent
commit (4 asserts for R1, 1 convergence + 4 sweep for R2, 2 for R3).
board-scripts, board-sweep, implement-dispatch, review-dispatch,
protocol-content and the node template suite all pass; lint-shell clean.
The relay scan was the last single-page comment read, and the one a cap damages worst: it selects the NEWEST trusted comment and injects it verbatim into a live worker session, and the newest comments are exactly what a first-page read hides. On a long-trailed ticket the human's answer is either missed outright or — the case the new fixture reproduces — an older comment is taken for the newest and relayed as though it were the answer. It now goes through _board.comments() like the other three. The J1 selection is untouched: newest TRUSTED comment, untrusted ones skipped rather than allowed to end the scan, machine prefixes filtered, turn-end ordering, relayed_comment dedupe. The helper gained createdAt (REST created_at), which the ordering check needs, and both mocks now serve it. Read failure still means no relay: B.gh dies on a non-zero exit and the caller turns that into an empty verdict, the same silence the old suppressed-stderr read produced. No board code path reads a capped comment page any more. The sweep suite runs with the mock page shrunk to two for the whole tick, so a regression back to starts failing immediately. Test verified RED against the parent commit: the capped read relays IC_72b (a stale 'still thinking') where the answer is IC_72c. board-sweep, board-scripts and review-dispatch pass; lint-shell clean.
…s to actually paginate _board.comments() passed bare --paginate and ran the whole stream through one json.loads. gh streams each page as its OWN top-level array, concatenated, so the second page turns the output into several JSON documents back to back and json.loads raises 'Extra data'. The helper therefore failed on exactly the long comment trails it was written for, and since every board comment scan now routes through it, one busy ticket would abort a transition and take the whole IMPACT and RELAY machinery down with it. --slurp (gh >= 2.53; local gh is 2.96) wraps the pages into one outer array instead, so the read decodes to a list of page-lists and flattens one level. An older gh rejects the flag outright and gh() surfaces that stderr, which is the right failure: loud, not half-read. The mock hid this. It served the entire log as a single array under any flags, which is the one shape that cannot reproduce the bug. Both mocks — the shared one and the sweep suite's overlay — now chunk at the page size and emit the real shapes: concatenated per-page arrays without --slurp, one outer array of page-arrays with it. The multi-page fixtures added in rounds 11 and 11b are what exercise the decode path, and they only did so once the mock stopped flattening the difference away. RED against the parent commit is the finding verbatim: board-sweep fails 30 asserts and board-scripts aborts, both on 'json.decoder.JSONDecodeError: Extra data'. board-sweep, board-scripts, implement-dispatch, review-dispatch and land-dispatch all pass; lint-shell clean.
… on state they cannot see
T1 — the parent-pin stamped the repo HEAD sha, but the parent's contract is
its ISSUE BODY. A body edit does not move HEAD and an unrelated commit does,
so the pin changed when the contract had not and held still when it had. The
Architect's promised lineage check — compare the pin against the parent's
current revision — was unimplementable against it, and the ledger spec's
'what contract did this child actually execute' had no answer. It now stamps
the first 12 hex of sha256 over the parent's body, keeping the '#<n> @ <hex>'
shape so the M1/N1 lineage parsing (which reads only the '#<n>' head) and
N1's append-on-differing-parent are untouched. The architecting protocol now
states what the hash covers and gives the exact command that reproduces it;
the three worker protocols and decomposing's doctrine line stop calling it a
repo revision.
T2 — board-reconcile's pulled-epic discriminator was 'has non-terminal
children', which is wrong in the direction that matters: an Architect actively
RECONCILING an epic sits in in-design WITH live children by definition, so a
lost binding produced a stranded claim the report then declined to mention.
The discriminant is now the note the pull itself wrote ('epic: child #<n>
active'); every other note leaves the orphan warning standing.
T3 — a done/wontfix ticket is CLOSED and its terminal write strips the status
label, so review-dispatch's labels-only lookup printed nothing and run_for
read that silence as in-review: a reviewer spawned onto a finished ticket. The
lookup now reads state too. A lookup that FAILS still fails open (it exits
non-zero and the caller restores the empty verdict); a lookup that succeeds
and reports CLOSED is stale.
T4 — a proposal naming a terminal target counted as undispositioned, pinning
pending=true forever: the child and its target were re-read and re-logged
every tick for a reconciliation that can never happen. Terminal now settles.
Deliberate corner, recorded in the pass comment: reopening a wontfixed parent
means re-raising the impact by hand, and nothing is destroyed — the
[parent-impact] comment stays on the child for any later lineage check.
All four verified RED against the parent commit. implement-dispatch,
protocol-content, board-scripts, board-sweep, review-dispatch, land-dispatch
and the node template suite pass; lint-shell clean.
…eeping Round 13 hashed the parent's whole issue body, and the body carries the board:meta block the board rewrites constantly — recompose_epics clears pr:/branch: on every recomposition cycle by itself. So the pin announced 'the parent contract changed' at every cycle and the Architect adjudicated a fake diff each time, which is worse than no signal: it teaches the reader to discount the real one. _board.py gains strip_meta() and contract_hash() next to the parse_meta / render_body pair that already owns this format (render_body now calls strip_meta instead of repeating the regex). Both sites call the helper: the dispatch stamp, and the architecting protocol's documented comparison command, which is now a BOARD_SCRIPTS python one-liner rather than a hand-rolled hash — two implementations of one hash is how a lineage check quietly stops working, and last round's newline discovery already showed how easily the hand-rolled form diverges. Verified byte-for-byte: stamp and documented command agree, a meta-only change does not move the hash, a prose edit does. Tests: the invariance asserts read the pin the dispatcher actually WROTE rather than a recomputed expectation — the first draft recomputed it, and when the helper is absent that expectation is empty and every 'still the same' assert passes vacuously. A guard now fails loudly if the helper stops answering. Verified RED against the parent commit: 4 asserts, three of them behavioral. implement-dispatch, protocol-content, board-scripts and board-sweep pass; lint-shell clean.
…ts engine label and fetches child pull heads U1 — _slots_used charged a worker to whichever lane its TICKET had reached. An Implementer that handed its ticket to the architect queue was still writing its closing trail, and while it did, its meta sat on the single architect slot and blocked every unrelated Architect until finalize or the stall reaper caught up — up to 45 minutes. The lane-split spec makes lane crossing the binding release (transition 8). A worker now charges a lane only when its persisted role AND the ticket state agree; a handed-off worker charges neither lane and L1 owns its lifecycle. A meta with no role at all falls back to state alone, so a pre-role worker that is genuinely in-lane keeps being counted. U2 — dispatch_epic ignored the epic's engine:claude/engine:codex label and always took WORKER_ENGINE. Scale review is a QAgent route and per-ticket engine overrides apply to every QAgent route; the X4 exemption covers ARCHITECT dispatch alone, where plan authorship is deliberately never label-routed. The board selector now carries the label out with the epic row and it overrides the environment, resolved exactly as the PR path resolves it. U3 — the scale worktree fetched only the default branch, but a squash- or rebase-merged child leaves a head SHA that is an ancestor of nothing and a deleted branch. The closure package names those SHAs and the no-integration-branch mode tells the reviewer to detach at each one, which in a fresh clone simply fails. The selector now names each child's PR and the dispatcher fetches refs/pull/<n>/head, which GitHub retains past branch deletion. Objects land in LOCAL_REPO and every worktree shares that store. Per-ref non-fatal: a pull ref that is genuinely gone is the reviewer's finding against the closure package, not a reason to refuse the whole review. The review suite gained a transparent git recorder — real git, every call logged — because a missing fetch is otherwise invisible until a reviewer cannot resolve a range hours later. All three verified RED against the parent commit. implement-dispatch, review-dispatch, land-dispatch and protocol-content pass; lint-shell clean.
…ct board-answer's documented return V1 — impact-scan.json sat at the top level of DAEMON_HOME, which is the daemon metadata namespace: daemon-list and _resolve_uuid read every *.json there as a worker meta. The cursor was a phantom fleet row, resolvable by prefix as `daemon-retire impact-scan`, and deletable or rewritable by tooling entitled to assume it owned the file. It now lives at DAEMON_HOME/sweep/. No migration needed — a missing cursor already means a full rescan, which is the safe direction. The sweep tests gained the daemon-namespace predicate itself as an assert, so any future stray file in that directory fails here. V2 — the issue-tracker command table said board-answer always returns a ticket to in-progress. The lane-aware return shipped rounds ago: the pre-park state the park recorded, falling back to the bound worker's own lane (in-design for an ARCHITECT) when the park came from a state PRE_PARK does not cover. An Architect sent to in-progress lands where its own protocol has no legal exit. Row corrected and content-pinned. Close-out chores for the hardening campaign: - docs/INSTALL-doperpowers.md gains a Prerequisites section naming GitHub CLI 2.53 as the floor (the comment reads use --paginate --slurp). - The ticket-ledger spec's living tail gains a Revision Notes entry for the campaign and a consolidated MIGRATION NOTE in Surprises & Discoveries covering the four one-shot identifier/value-space changes. Both findings verified RED against the parent commit.
architecting/SKILL.md told the Architect to dispatch doperpowers:plan-reviewer on the implementation plan. That agent was deleted when plan review moved to the Codex adversarial-review route — the instruction was a live pointer at nothing, and it had simply never followed the decision that settled in doperpowers:writing-plans. Aligned to writing-plans' current text rather than inventing a variant: the plan gets codex-companion's adversarial-review verb (gpt-5.6-sol, xhigh via the with-effort wrapper) in a background Bash, focused on whether the plan is complete, spec-aligned, well-decomposed and buildable by an engineer with zero context, with the same 'evaluate the findings rather than accept them wholesale' caveat. Content-pinned in both directions — the deleted agent must not come back, and the mechanism must stay the one writing-plans prescribes. The doperpowers:critique reference is untouched (that agent exists; the link checker's agents/-blindness is its own follow-up). Verified RED against the parent commit (3 asserts). protocol-content 210 pass, board-scripts 415 pass, lint-shell clean.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df00ef3168
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # meta's `updated` is bumped by the finalize just above). | ||
| tx="$(_transcript "$current")" | ||
| if [ -n "$tx" ]; then | ||
| age="$(( ( $(date +%s) - $(stat -f %m "$tx" 2>/dev/null || stat -c %Y "$tx") ) / 60 ))" |
There was a problem hiding this comment.
Select the mtime command by platform
On GNU/Linux, this newly added live ready-for-* recovery path aborts the entire sweep whenever a transcript exists. GNU stat --help defines -f as “display file system status instead of file status,” so stat -f %m "$tx" emits a filesystem report before failing; the fallback epoch is then appended, and Bash arithmetic interprets the leading File token as an unset variable under set -u. This reproduces in tests/issue-tracker/test-board-sweep.sh as File: unbound variable, preventing all later dispatch, review, land, and relay passes. Choose BSD/GNU stat based on the platform rather than combining their output with ||.
Useful? React with 👍 / 👎.
| ln = B.apply_state( | ||
| tickets, target, "ready-for-architect", | ||
| "reconciliation-due: [parent-impact] from #%s" % tid, |
There was a problem hiding this comment.
Revoke landing authority when impact reopens a ticket
When a late [parent-impact] targets a ticket whose approved PR already carries confident-ready, this changes only the issue state; the PR label and approval remain intact. In this same sweep, implement dispatch can be blocked by the finished reviewer's lingering binding, review dispatch explicitly skips confident-ready PRs, and the LAND pass then selects the PR solely from its label and approval; land-dispatch.sh finalizes the old owner and may merge before any Architect reconciles the impact. Invalidate the PR's confidence/landing authority when making this return, or require the LAND path to verify that the linked ticket is still confident-ready.
Useful? React with 👍 / 👎.
| if ! git -C "$LOCAL_REPO" fetch -q origin "$int_ref" 2>/dev/null; then | ||
| if [ "$int_ref" = "$DEFAULT_BRANCH" ]; then | ||
| echo "$name: git fetch failed ($int_ref)" >&2; return 1 | ||
| fi | ||
| echo "$name: integration branch '$int_ref' is gone (deleted when its children merged) — the closure package's PR ranges are the review ranges" >&2 |
There was a problem hiding this comment.
Fail closed on integration-branch fetch errors
If the integration branch still exists but this fetch fails because of a transient network, authentication, or server error, every non-default ref is immediately treated as deleted. When the following default-branch fetch succeeds, scale review proceeds from the default branch and per-child heads instead of the aggregate integration tree; for children merged only into that integration branch, this omits their composed tree and any integration-only commits or conflict resolutions. Use the deleted-branch fallback only after confirming that the remote ref is absent, and otherwise fail the dispatch for retry.
Useful? React with 👍 / 👎.
| continue | ||
| # Parked, or already in the architect lane: skip UNMARKED and re-see it | ||
| # next tick. Both are transient and say nothing, so neither logs. | ||
| if tstate in UNCLAIMABLE or tstate in ARCHITECT_LANE: |
There was a problem hiding this comment.
Skip reconciliation for off-machine target states
When the named parent currently has no status:* label (untracked) or has conflicting status labels, neither sentinel is included in UNCLAIMABLE or ARCHITECT_LANE, so this branch calls apply_state and silently normalizes it to ready-for-architect. That bypasses the explicit board-lint.sh repair path, discards the ambiguity represented by conflicting labels, and makes the issue immediately dispatchable based only on a child comment. Leave UNTRACKED and CONFLICT targets pending until a human repairs their board state.
Useful? React with 👍 / 👎.
…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.
Summary
E2 — Ticket ledger & observability (interim slice, v7.36.0) plus its 15-round post-merge hardening campaign. This is the E-cycle integration branch (
feature/en-cycles); with E3 targeting a standalone platform repo, E4 folded into the research round, and E5 closed as a no-change verdict, this PR carries the complete plugin-side E-cycle stack.E2 interim slice (SDD run, 9 tasks)
env-issuecategory with the needs-human birth rule; fire-and-continue filing authority in all four worker protocols[parent-impact]upward-revision channel: dispatch-time parent pinning, sweep reconcile pass, Architect reconciliation claims with lineage checkHardening campaign (15 codex review rounds, ~60 adjudicated findings)
_board.comments()(--paginate --slurp; new prerequisite: GitHub CLI ≥ 2.53, documented in INSTALL)engine:labels and fetches child pull headsplan-reviewerdispatch instruction (agent deleted in 7.35.x) realigned to the codex adversarial-review routeVerification
lint-shell.shclean; every campaign fix demonstrated RED-firstskill-linksred is main's own pre-existing agents-directory blindness; measured at origin/main in a clean worktree, this branch contributes zero new dangling references post-merge.doperpowers/sdd/2026-08-01-e2-interim-slice/progress.md(gitignored, in the worktree)Notes for merge
🤖 Generated with Claude Code