Skip to content

Staff the reviewer role with a dedicated App identity #73

Closed

Description

@radiusred-cody

Goal

The last unstaffed seat gets its own crew member, adopting backlog capture #34 — proven in davison/numberguess (operator direction, 2026-08-24), the M4 test-drive project, before the hub's own seat changes: the operator mints a dedicated reviewer App with the released v0.3.0 identity new reviewer verb run from the numberguess checkout (the live proving ground for the #68 decision, exercising the personal-account endpoint — an App under davison, which per the account boundary is all numberguess needs), installs it, and routes reviewer: in numberguess's .codecrew.yml. A codex harness operates the App under roles/reviewer.md through a new feature milestone there: its first dispatch reviews a real task PR end to end — changes requested, then an approving review. Whether a GitHub App's approving review counts toward required-review rules is verified empirically on that milestone (branch protection requiring one approving review) and recorded as a Decision on this task before any task finish expectation is wired to App approvals; if it does not count, the documented fallback ships — the agent reviews, the operator approves on its recommendation. Fold-back into the hub: docs record the outcome and Copilot code review coexistence (advisory signal, not the reviewer role; plan-gated — platform-tier intentionality applies), and the hub's own reviewer: davison routing flips to a radiusred sibling App only once the proof stands. Code touched ships with tests per the #46 convention.

Requirements

M5-R1

Plan

Written at the wrap-up, the milestone's live fires having reshaped the middle (thirteen findings and four Decisions on this issue; delivered through #74, #76, #78, #81–#85, #90, #91, #94 and releases v0.3.1/v0.4.0):

  1. Proving ground: davison/numberguess — done; three review rounds, the App-posted changes-requested→approve pair on numberguess#15, the required-review experiment, and the transcripts committed.
  2. The counting question — answered twice: read-only Apps' approvals don't count; write-access Apps' do (the superseding Decision; the probe experiment).
  3. The hub flip, remaining: radiusred-checky minted by the operator with released v0.4.0 identity new reviewer --with-approval-permission (App ID 4719924, installation 156598567, contents: write verified) — this PR commits the auto-written routing. Checky's first dispatch reviews this PR itself; with its counted approval, task finish 73 is the agent-gated merge closing the seat it opens.
  4. Fold-backs already merged carry the docs (dispatch recipe, counting rules, coexistence); no further doc work rides this task.

Ask-the-human points

None remaining — the minting browser leg was the operator's and is done.

Activity

  1. added
    cc:task
    on Aug 24, 2026
  2. radiusred-cody commented on Aug 24, 2026

    @radiusred-cody
    ContributorAuthor

    Finding (live fire of the shipped v0.3.0 verb): the minting leg failed at GitHub's manifest validation with Invalid GitHub App configuration … Error "url" wasn't supplied. The top-level url (homepage) was present — the served form decodes to a complete manifest. The actual defect: the webhook-off default sends "hook_attributes": {"active": false} with no url, and per the manifest docs hook_attributes.url is required whenever the object is supplied, regardless of active — GitHub's error just doesn't say which url it means. Fix: omit hook_attributes entirely unless --with-webhook; a manifest without it registers an App with no webhook, which is exactly the "a crew App acts, it never listens" default. Remediation task follows.

  3. radiusred-cody commented on Aug 24, 2026

    @radiusred-cody
    ContributorAuthor

    Decision: Release parity binds proof runs, not iteration (operator, 2026-08-24, on this task's first live-fire finding). The M4 principle — QA verdicts and stranger-path evidence must cite the binary an adopter installs — stands, scoped: during a live-fire proving loop, discovery runs use local source builds (codecrew version prints dev, keeping the tier honest in any transcript), and fold-back fixes ride normal tasks with no release per iteration. A single release precedes the recorded proof run: the critical path (minting, first review dispatch, the required-review experiment) re-runs end to end against the shipped binary, and that run is what the Decision and verdicts cite — so release-build-only defects (the #51/#55 class) are still caught where the record depends on them. Trade-off: intermediate iterations lose release-pipeline coverage per cycle. Rejected: a public patch release per fold-back (an ops task and version churn per bug — the friction this task surfaced); prerelease tags with --pin (keeps per-iteration pipeline coverage, but retains the ceremony without the proof-run benefit, since the final proof run covers release-build behaviour anyway).

  4. radiusred-cody commented on Aug 24, 2026

    @radiusred-cody
    ContributorAuthor

    Finding (second live fire, source build with the #74 fix): minting succeeded end to end — manifest accepted, App created, key stored, next steps printed. Two observations: (1) the operator's first name choice was reserved by GitHub; the flow coped — the rejection surfaced on GitHub's confirm page and a rerun with a new name completed cleanly, so no change needed. (2) Ergonomics (operator direction, 2026-08-24): next-step 2 — "route the role in the hub's .codecrew.yml" — should not be an instruction. When the verb runs in the hub, the routing table is local; the verb should write the routing itself and say so, with an opt-out for the rare case it's unwanted, falling back to the printed instruction when the table isn't local (pointer-only spokes) or the edit can't be applied safely. Remediation task follows.

  5. radiusred-cody commented on Aug 24, 2026

    @radiusred-cody
    ContributorAuthor

    Findings (third live fire: the Codex reviewer dispatch on numberguess M2, PR davison/numberguess#8):

    1. App holders are not review-requestable. With reviewer: routed to davison-review-bot, the implementer obligation from Request review from the reviewer-role holder at PR creation #45 (--reviewer $(codecrew role reviewer)) failed — GitHub cannot resolve an App as a review-requestable user. The protocol behaved exactly as designed: Codex raised a checkpoint gate rather than working around it, and the operator resolved it — the App acts through its installation credential and posts its review directly. The obligation's wording and the docs must make the split explicit: human/team holders are requested; App-held seats are dispatched.
    2. codecrew-token installation discovery is org-only. /orgs/{org}/installations cannot see an App installed on a personal account, so a second gate had the operator hand-feed App ID 4704266 and installation 156249032. /user/installations covers the personal-account case; the script should fall back to it.
    3. The routing edit lived only in the working tree. numberguess main's .codecrew.yml still reads reviewer: ~ — the davison-review-bot routing was never committed, so the record's role-gated claims aren't checkable against committed config. The M4 "record exists only in a working tree" gap, config variant. (Route the role automatically when identity new runs in the hub #76's routed-then-commit output nudges this; the numberguess commit is the operator's to make.)
    4. The dispatch model for a sole rider, stated (operator direction, 2026-08-25): the minimum is the main model assuming the reviewer role in a separate session with no implementation context, using the App's credentials; better is the orchestrator dispatching a different model/harness with that App and key — the routing table's harness: field is the declared intent. Independence is contextual as well as credential.

    Empirical status of the required-review question: the App can post an approving review (davison-review-bot APPROVED on numberguess#8, which then merged) — capability confirmed. But numberguess main has no branch protection or ruleset, so nothing yet tests whether that approval satisfies a required-review count. The experiment still needs protection requiring one approving review, then a rerun on the next PR, before the R1 Decision can be recorded.

  6. radiusred-cody commented on Aug 24, 2026

    @radiusred-cody
    ContributorAuthor

    Finding 7: the M2 ("colourful") session transcript is not committed anywhere in davison/numberguess — main's SESSION_TRANSCRIPT.md (2ab727a4) ends at M1, and no branch carries an M2 record. Finding 5's pattern repeating on the record itself, and the exact defect that made M4-R4 untestable until remedied. The transcript is the operator's to commit; the fold-back task for the systemic gap (evidence reachable before QA dispatch) is M5-R4's, still to come.

  7. radiusred-cody commented on Aug 24, 2026

    @radiusred-cody
    ContributorAuthor

    Finding 8 (from the committed M2 transcript, numberguess task/7 branch c12d9ef3): the transcript shows more than the PR record does, in three ways that matter to R1.

    • The dispatch model already ran, and well. The primary Codex session delegated to an isolated reviewer sub-agent with a clean-context prompt — contract first, diff before description, identity-differs-from-author check, token never printed, approve only if sound, no merge, no task finish. That prompt shape is now carried into docs/identities.md (PR docs: dispatch App-held role seats instead of requesting review #79) as the proven recipe.
    • The independent review caught a real bug the implementer's tests missed: styled-mode detection ignored stream encoding, and an ASCII pseudo-TTY crashed with UnicodeEncodeError on the icon set. The reviewer refused approval, the implementer fixed it with a regression test, and the re-review reproduced the exact failing case before approving. De-correlated review demonstrably earned its seat — first hard evidence for the M5-R1 premise.
    • The request-changes half never reached GitHub. The first review's verdict (request changes) could not be submitted as the App — the token helper 404'd on the org-only lookup at exactly that moment — so it was reported to the primary agent and addressed via a PR comment; only the final APPROVE exists as an App-posted review. R1 promises "changes requested, then an approving review" end to end: the proof run must show both halves as App-posted reviews, on a protected branch.

    Also in the transcript, worth a line each: the reviewer sub-agent independently refused to approve while cc:needs-decision was unresolved (the contract held under delegation); it declined to fall back to the operator's credential when the App token failed (no identity smearing under pressure); and task new --milestone 6 (the GitHub issue number) was refused and self-corrected to --milestone 2 — the refusal message did its job.

  8. radiusred-cody commented on Aug 25, 2026

    @radiusred-cody
    ContributorAuthor

    Decision (M5-R1, the required-review question — answered empirically on the numberguess M3 proof run): an App's review is protocol review, never GitHub's counted approval. On davison/numberguess#11, CodeCrew's gate accepted davison-review-bot's approval while GitHub held reviewDecision: REVIEW_REQUIRED; auto-merge would have waited indefinitely; --admin was rejected (bypass_actors: [] — rulesets have no implicit administrator override); the merge required a bypass actor, added temporarily under a gate and later made standing policy by the operator. The deeper structural finding: the fallback #34 predicted — operator approves on the agent's recommendation — is unavailable exactly in pure solo, because the operator authored the PR and GitHub forbids self-approval.

    Supported configurations, to be documented with platform footprint: (i) solo, operator-authored PRs — a required-review rule needs the operator as a ruleset bypass actor (numberguess's standing policy), or no count rule at all, with CodeCrew's own gate as the review floor; (ii) crew hubs, App-authored PRs — the App reviews first and any non-author human's approval satisfies the count on its recommendation (this hub's configuration; the reviewer seat can flip to a radiusred App under it); (iii) teams — GitHub's native counts compose with team routing (#44).

    Trade-off: the bypass path concentrates merge power in the operator where solo already concentrates everything; it is visible in the ruleset and recorded at each use. Rejected: wiring task finish to expect App approvals to count (the platform says no); telling adopters to drop required-review rules everywhere (loses GitHub-native enforcement precisely where humans participate).

    (Both halves of the R1 review promise landed as App-posted reviews on davison/numberguess#15: changes requested twice — audit-trail chronology findings, held until fixed — then approved.)

  9. radiusred-cody commented on Aug 25, 2026

    @radiusred-cody
    ContributorAuthor

    Findings 9–12 (the M3 proof run, from M3_SESSION_TRANSCRIPT.md):

    1. Harness guardrails don't know CodeCrew authorizes dispatch. Codex declined to auto-dispatch the reviewer: its runtime guardrail requires the user or AGENTS.md to explicitly ask for sub-agents, and nothing in the scaffold does. Remedy: a conditional standing authorization in the AGENTS.md scaffold — addressed to the operator's primary session only; a session dispatched as a role never dispatches another role — with the solo/platform tier gradient stated in identities.md. (Operator-confirmed 2026-08-25 that the conditional form preserves the platform invariant: platform-dispatched role agents all fail the condition.)
    2. task finish cannot complete in the App-reviewer + required-review configuration. Its gates passed, GitHub refused the normal merge, and PRs Implement the remaining workflow verbs #11/Synthesize the M1 milestone document #13/M2: Protocol hardening #15 were merged around the protocol verb with gh pr merge --admin — three bypasses of the one merge point the protocol owns. Remedy: refuse with a precise code when the only approvals are uncounted App reviews, and offer an explicit, recorded bypass path inside the verb.
    3. The v0.3.1 token-helper fallback fails in practice. Both the M2 and M3 reviewer sessions found /user/installations rejected under the operator's gh credential; they minted via raw JWT with operator-supplied IDs. Remedy: identity new knows the App ID at creation — persist a credential stub beside the key and discover installations by JWT, removing the user-credential dependence.
    4. The milestone template's Requirements placeholder matches the requirement parser (its example **M2-R1** is bold), so M2's close refused on a phantom requirement until a verdict was recorded against placeholder text. Remedy: a non-matching placeholder. The record coped honestly — the M2 document preserves the never-defined-requirement gap rather than rewriting it.

    Positive notes for the milestone record: the reviewer enforced audit-trail chronology on the milestone document itself (two changes-requested rounds on #15); operator-held QA verdicts and the DOC_MISSING chain behaved exactly as designed; and the --milestone <issue-number> refusal self-corrected twice.

  10. radiusred-cody commented on Aug 25, 2026

    @radiusred-cody
    ContributorAuthor

    Decision (superseding the R1 Decision's counting claim; operator hypothesis 2026-08-25, proven live): "an App's review is never GitHub's counted approval" was too strong. Probe evidence (throwaway radiusred/cc-approval-probe#1, since deleted): under the org ruleset, reviewDecision flipped REVIEW_REQUIRED → APPROVED on radiusred-testy[bot]'s approval alone. Testy holds contents: write; davison-review-bot — whose approval did not count on numberguess — holds the reviewer table's deliberate contents: read. Corrected statement: an App's approving review counts toward required-review rules when the App has write access; a read-only App's does not. (Write access is the documented criterion for counted reviews; org-vs-personal is not fully excluded as a co-factor — the discriminating experiment, bumping davison-review-bot to contents: write and probing numberguess, is recorded here for whoever wants the last word.)

    Consequences: task finish's merge gate needs no code change — it keys on reviewDecision, which is mechanism-agnostic — but the "never counted" prose in SPEC §6, docs/identities.md, and the REVIEW_NOT_COUNTED/bypass messages must be corrected; and the #34 hub flip calculus changes — a reviewer App minted with contents: write can fully satisfy the org gate, making agent-gated merges possible with no bypass. Trade-off to decide at that point: granting write to a role whose contract forbids editing code (privilege beyond contract need, held by an auditable identity) versus keeping least-privilege and the human-approval/bypass paths.

  11. radiusred-cody commented on Aug 25, 2026

    @radiusred-cody
    ContributorAuthor

    Decision (operator direction, 2026-08-25): a model review — clean context, the reviewer role contract, optionally a different harness — is the protocol's expected review, whether or not a human gate also applies. Mechanized where a distinct principal holds the seat: task finish's review gate tightens from "any non-doer approval" to an approving review from the reviewer role's holder (roles define whose acts count — the #42/#45 rule qa verdicts already follow; other approvals, CODEOWNERS included, remain welcome but not sufficient). In pure solo (reviewer ~, operator authors), a mandate has no second principal to bind, so the contract and scaffold strongly encourage dispatching a clean-context reviewer session whose findings land as a PR comment before --operator-confirm. Evidence base: the numberguess M2/M3 reviews and the hub's own four-PR batch, where clean-context App review caught implementer-blind defects in every round it ran. Trade-off: teams lose the flexibility of "anyone senior approves" unless they route the reviewer seat accordingly — routing is the declared intent, so that is a feature.

  12. radiusred-cody commented on Aug 25, 2026

    @radiusred-cody
    ContributorAuthor

    Finding 13 (the superseding Decision, operationalized same-day): PRs #92 and #93 are the hub's first fully agent-gated merges — task finish merged both with reviewDecision: APPROVED on radiusred-testy[bot]'s approval alone (write-access App; no human approval, no bypass). The operator directed the merges; no gate was waived — CodeCrew's non-doer gate and GitHub's required-review rule were both satisfied by the counted App review. Testy remains the qa seat standing in for review by operator direction while #34's dedicated reviewer App is pending; the review cycle it ran (six PRs, three finding rounds, every fix verified by re-experiment) is the M5-R1 premise demonstrated on the hub itself.

  13. radiusred-cody commented on Aug 25, 2026

    @radiusred-cody
    ContributorAuthor

    Started by @radiusred-cody[bot].

  14. radiusred-testy commented on Aug 26, 2026

    @radiusred-testy

    Finding (M5 QA, released v0.5.0): R1's closing doc clause — "Coexistence with Copilot code review is stated in the docs" — is not delivered. What I did: searched every markdown file at main (grep -rni copilot over SPEC.md, README.md, docs/, roles/, docs/milestones/) and the full history (git log --all -i -S copilot), plus adjacent phrasings ("advisory", "third-party review"). What happened: zero matches — no statement about Copilot code review exists anywhere in the repository, under that name or any other; CODEOWNERS coexistence is stated (SPEC §6, roles/implementer.md), Copilot's is not. What the record says should happen: M5-R1 (#67) ends "Coexistence with Copilot code review is stated in the docs", and this task's plan step 4 asserts "Fold-backs already merged carry the docs (dispatch recipe, counting rules, coexistence)" — the dispatch recipe and counting rules are verifiably present in docs/identities.md; the coexistence statement is not. Everything else R1 promises verified live; see the verdict on #67.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cc:task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions