Skip to content

The Reviewer fold: the board's review loop as a subagent of the ticket's owner; execution tier to sol - #180

Merged
SSFSKIM merged 112 commits into
mainfrom
reviewer-fold
Sep 23, 2026
Merged

SSFSKIM merged 112 commits into
mainfrom
reviewer-fold

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • The review loop runs as a subagent of the ticket's owner. A new registered agent, doperpowers:qa-loop (sol/high), owns the engine rounds, the compliance audit, triage, fix waves, grading, the merge, and the review trail. The Architect and Executor protocols dispatch it after the PR opens and stay bound through done; only three things come back to the owner — a spec conflict (answered by which-governs or one board-minted re-pin), a design gap (repair-and-rebuild, a follow-up ticket, or a park; a second on the same ticket is the human's), and a dismissal request for a non-blocker (only against a pinned spec section, recorded in the trail). The xhigh/max panel is handed up as NEEDS_PANEL because a subagent has no Workflow tool; the owner fast-forwards its checkout, runs the panel with repo set, and resumes the agent with the findings file.
  • skills/qa-loops retires. Its references move under issue-tracker (review-loop.md, wave-board.md, the stand-in's protocol and bootstrap); review-dispatch.sh shrinks to the trigger for PRs nobody owns and spawns a thin stand-in seat that dispatches the same agent; a ticket with a live owner is never taken by a stand-in, on the PR path and the epic scale path.
  • The execution tier flips to sol and the engine:codex route retires. plan-executor and task-executor read model: sol; the dispatchers pin ${IMPLEMENT_MODEL:-sol} / ${ARCHITECT_MODEL:-fable}; the engine label, WORKER_ENGINE, CLODEX_*, and ENGINE_NAME are gone from the board route.
  • Board schema, both bindings. in-review → in-review (the re-pin self-edge, note and pin required), in-review → in-progress (the review→build return, convergence-counted), the owner's run surviving review, in-review → done gated on a review-trail event after the latest in-review entry, decision_park.from_state so a park answer returns to the interrupted state, and a state-aware lane cap. The server side is arkho PR SSFSKIM/arkho#80 (separate repo, not yet merged).
  • The sweep recovers an idle owner in review on both ticks, bounded by review progress (review_recoveries resets on a new trail artifact), and verifies the ticket's authoritative state before acting so a server-side park is never resumed. A relay to a live idle owner uses sminos wake, not resume (a resume starts a copy).
  • Owner bootstrap bindings AUTO_MERGE, REVIEW_LEVEL, TECH_DEBT_ISSUE; the phase seat-meta key for lane caps; the QA agent positions its isolated worktree at the reviewed head itself (the harness cuts isolation at the main checkout, not the dispatcher's); single-rung reviewers and the panel are pointed at a path.
  • Design: docs/doperpowers/specs/2026-09-21-reviewer-fold-design.md (Decision Log, Surprises, Outcomes & Retrospective); plan: docs/doperpowers/plans/2026-09-21-reviewer-fold.md (14 tasks). Version 7.118.0 (main moved twice while this was in review).

Verification

  • Structural and hermetic suites, all green on the final head: the ten tests/issue-tracker/* suites (qa-loop-agent 77, protocol-content 312, review-standin 150, board-sweep 226, review-dispatch 343, board-scripts 580), the board-api mock-server suites (sweep-review-recover 55, sweep-stall, sweep-renew-relay, answer), tests/codex/test-native-agents.py, tests/mods/run-mods-tests.sh, scripts/lint-shell.sh. tests/claude-code/run-skill-tests.sh 24 pass, 9 gated skips, 1 fail — test-subagent-driven-execution.sh, which regex-matches a live model's free text and fails at a rate on main too (recorded in the spec's Surprises with three distinct assertions caught).
  • Live smoke on a private scratch gh board (SSFSKIM/fold-smoke-0922, kept as evidence). Drill A (low, auto-merge on): one Architect seat bound from gate through done; the QA agent positioned at the reviewed head, ran one reviewer-low round, posted the trail, merged with --match-head-commit, then done. Drill B (xhigh, auto-merge off): three panel hand-ups with the owner fast-forwarded and repo set, one fix wave under the QA agent that caught a planted assertion, a QA-written park ("review confident — merging is yours"), the human merge, done by the sweep's finalize pass. Two defects found only by running (isolation cut at the main checkout; resume starting a copy on a live idle seat) were fixed with tests and re-run.
  • Whole-branch xhigh panel review (review-code, 8 agents, 5 lanes): 11 findings — 9 fixed in one wave with RED-then-GREEN tests, 1 dismissed by a probe (a subagent carries the parent's session id, so the QA agent acts as the owner's run), 1 logged as tech debt (API recovery of a silent working owner). Delta re-review at reviewer-high: 2 findings (an apostrophe is a legal ref character, so quoting is not a safeguard — replaced by a charset rule that parks on any other name; a head adopted after a re-pin needs a fresh engine round before merge), both fixed with structural tests; the loop closed there.
  • Behavior evals with tools enabled, before/after, preserved under the plan workspace for Tasks 7, 8, 9 and 13 (owner dispatch and end-turn, panel relay, role-specific escalations, scale corrective-child release, the recovery nudge).

Deployed-service smoke (Task 12)

  • After arkho PR 80 merged and deployed: ticket spec: task-grain experiment — paired double-run + sde-telemetry #72 on the scratch repo name fold-smoke went register → claim (architect run 53) → in-design → in-progress → in-review (fold-smoke-0922#12) → two review-trail events → in-review → done written by the QA agent under the owning run, then the close's own release. One claim, no release before done, merge pinned to the reviewed head (--match-head-commit, squash 88ceafb). The spec-conflict escalation ran live: the planted no-op test was prescribed by the ticket's Decision, the QA agent escalated, the owner answered over SendMessage that the pin governs and a follow-up owns the repair.
  • Two API-binding gaps it exposed are fixed in the closing wave with hermetic tests: the API tick now retires the seat of an ended run whose ticket is terminal (parity with gh's cancel pass — without it every finished ticket left an idle background session), and Closes #<n> in the PR body is a gh-binding expectation only (on the API board it would close an unrelated GitHub issue).
  • Three environment failures stood between the merge and the smoke, none in this branch; recorded in the spec's Surprises: a dangling certifi symlink in the python.org framework, the Supabase project paused for an unpaid invoice, and the database's direct host resolving to IPv6 only after the restore (the service's direct/migration/mirror URLs now use the session pooler; lesson recorded in arkho's render.yaml).

Merge order

  • arkho PR 80 is merged and deployed; this PR follows it. The scratch principals are retired and the credentials file removed; the scratch repo and board rows are kept as evidence.

…ge, PARKED semantics, panel positioning, bootstrap bindings, per-lane close, recovery on both ticks
…oard re-pin, evidence-gated close, lane caps by ticket state, dismissal tightenings
… answers, pin gates, self-edge plan, scale path, executable frontier, progress-bounded recovery, isolated smokes
…hase states, pin gates, self-edge plan, scale handoff, progress-bounded recovery, isolated smokes
…, ticketless observation, and scale outcomes
…ecret; the return contract covers armed auto-merge, ticketless observation, and both scale outcomes
The relay's candidate is a worker parked on an answer: a live, idle seat,
where sminos resume starts a copy and delivers nothing. It is now
wake --wait --from sweep, still bounded by DAEMON_TIMEOUT and still gated
on the sentinel. board-answer's API path runs this same relay inline, so
its suite pins the verb too. The successor-session resume stays resume.
…shed pin commit

The owner's repaired document is a commit on the PR branch, so the head the
review held is no longer the PR head. Fetch and fast-forward onto it, verify
against the PR's head, and audit and merge that head.
…ote branch names

A single-branch clone's fetch of a bare name moves only FETCH_HEAD, leaving no
origin/<head branch> for the wave push chain. Every positioning fetch now names
an explicit refspec, and every branch name in a command is quoted: the PR's
author chooses the head branch's name.
The sweep reads each new trail as the review's progress. A review waiting on
its dispatcher for any hand-up, not only the design-gap that can end it, now
resets its owner's recovery count instead of running it out.
…ht before the spawn binds

The owner-first check ran before the lock, and the locked section's gh read,
fetch and worktree build left a window in which a seat could bind the ticket
and then lose it to the stand-in's bind. Both the PR and the epic spawn now ask
again and skip, dropping the prepared worktree, when an owner appeared.
…when they are this board's

_live_owner and _bound_rows matched a seat to a ticket by number alone, so a
neighbouring repo's seat on its own ticket of the same number read as this
board's owner, or was recovered, relayed to or cancelled here. Both now filter
through meta_is_mine with the gh board key.
… tree

The review runs in the owner's QA subagent, whose stream lands under the
session's subagents/ directory while the parent file stays quiet. The idle
clock read the parent alone, so an hour-long panel review was nudged and then
parked. It now takes the newest mtime across the tree, as the gh sweep does.
A park's delayed review-parked stamp can overwrite the answer's review stamp,
leaving the owner outside the recovery ladder with no transition left to fix
it. The review-recover phase now visits review-parked seats, restamps those on
an in-review ticket under the registry lock, and treats them as candidates.
Row 23: phase_review_recover's idle gate skips an owner still reading working
whose review went silent; gh mode's live arm is the parity target.
…afe charset

Quoting cannot make an arbitrary ref safe to paste into a command the agent
composes itself: an apostrophe is a legal ref character. Each file now states
one rule near its first command: a branch name matching ^[A-Za-z0-9._/-]+$ may
be used in a command, and any other name is a park naming the branch. The
stand-in's scale snippet, which resolves its base inside the command, gates
that name with the same pattern. The explicit refspec form stays.
…ore merge

The re-pin answer fast-forwards the review onto the owner's pushed pin commit,
which no engine round has seen, while the merge pins the head the final engine
round reviewed. That head is now merge-eligible only after a fresh engine round
at the same level, and Re-review's trigger names the re-pin beside a wave that
fixed something.
…red — parity with the gh cancel pass

The owner seat stays bound through done, so the server ends its run on the
terminal transition and the renew phase strips the run from the meta — and no
phase ever retired the seat, leaving one idle background session per finished
ticket (observed in the Task 12 API smoke, run 53 on #72).

Phase 1 now closes, once per tick (not on interleaved renewals), with a scan of
runless metas whose run ended: when the ticket's board state is done or
wontfix and the seat's turn is over, the seat is retired through sminos retire
and one line names ticket, run and seat. A non-terminal ticket (reclaim, park)
is left to the resume path; a working seat is left for a later tick, which the
registry scan still sees after the 409 has come and gone. The ended run's id
is kept on the meta (ended_run_id) so that later tick can name it, and sminos
drops it on a re-fill with the rest of the run binding.
… is the defect

On the API binding the ticket number is the board's, so a Closes/Fixes/Resolves
line would close whatever GitHub issue carries that number in the PR's
repository. The compliance audit now splits by binding: under gh the body
carries Closes #<ticket> and its absence is a finding; under the API binding
its presence is a SPEC FINDING, and the trail and the board's --pr pin link the
ticket. The PR authors get the same split: the implement protocol's Authority
and Closing Artifact, and plan-executor (the architect lane's PR author, keyed
on whether the brief's ticket is a GitHub issue). The architect protocol never
instructed the line itself. Codex mirrors regenerated.
@SSFSKIM
SSFSKIM merged commit a51ce81 into main Sep 23, 2026
SSFSKIM added a commit that referenced this pull request Nov 8, 2026
sminos 1.40.7: remove the leftovers RL10 no longer reaches (board #180)
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