Skip to content

Personas post as don-petry, not donpetry-bot — record as ADR-0008 and apply across the fleet (fixes #1734, reverses #1650) #1765

Closed

Description

@don-petry

Decision (maintainer, 2026-09-12)

Personas post as don-petry, not donpetry-bot. This reverses the identity change made by
#1650 / PR #1694 and restores the behaviour ADR-0005 already describes.

Why this is a restoration, not a new direction

ADR-0005 (accepted) already sanctions it. Its §on write-identity says:

"'Write runtime identity' here means code/branch write capability (commit, push, label, close),
not the account a persona posts advisory comments as: an advisory-only persona may still run
under a real account — security-lead, for instance, posts as the owner account don-petry."

#1650 changed eight manifests to donpetry-bot without superseding ADR-0005, so the accepted
record and the code have contradicted each other since 2026-09-08. dev-lead was never switched and
still posts as don-petry — so today the fleet is also internally inconsistent.

It also fixes a live regression. #1734: DON_PETRY_BOT_GH_PAT authenticates as donpetry-bot
but lacks permission to write issue comments here, so the post step 403s and the advisory is
discarded
— not persisted anywhere. A real qa-lead invocation on epic #1723 was lost this way,
twelve minutes after #1694 merged. GH_PAT_DON_PETRY is known-good: dev-lead posts with it
continuously today.

The trade-off this accepts — state it, do not bury it

#1650's rationale was real and is now consciously traded away. persona-mention-reusable.yml's
pre-filter carries two independent recursion axes:

github.event.comment.user.login != 'donpetry-bot' &&      # actor axis
github.event.comment.user.login != 'github-actions[bot]' &&
!contains(github.event.comment.body, '<!-- persona:') &&  # marker axis

With personas posting as don-petry, the actor axis no longer covers persona output — a human
account cannot be added to that exclusion list without making the persona un-invocable by the very
maintainer who invokes it most. So the marker axis becomes the sole mechanical guard.

That is acceptable, for reasons worth recording:

  1. The marker is workflow-enforced, not prompt-enforced. persona-runner-reusable.yml applies
    pr_ensure_marker in the post step — "the only writer" — so an agent that forgets the marker
    cannot post an unmarked comment, because it cannot post at all. Prompt-only marker enforcement is
    precisely how feat: implement issue #846 — [Phase 2] Cache the LSP index and enforce the 30s cold-start SLA with auto-skip #860 produced 1,481 acks in 4.5h; this design deliberately does not rely on it.
  2. It has been proven live. The [persona-runtime soak] qa-lead mention smoke test #1300 soak posted a marked advisory, which triggered a router run
    that returned skipped — the guard caught its own marker.
  3. A third, weaker protection remains: prompts/<id>/advisory.md forbids writing a literal
    @petry-projects/<role> in the body, so an advisory should not contain a routable handle at all.

The residual risk is a single-axis guard. If the marker enforcement in the post step is ever
weakened or bypassed, nothing else stops a persona comment from re-routing. That makes
pr_ensure_marker and its bats coverage load-bearing in a way they were not before — AC #6 below
makes that explicit rather than tribal.

Acceptance Criteria

  1. ADR-0008 is authored at docs/architecture/adr/0008-personas-post-as-the-owner-account.md,
    following ADR-0000's process: Nygard's five sections in order (Title / Status / Context /
    Decision / Consequences), Status: accepted. Context names [qa-lead S7] Stop posting persona advisories under a human maintainer's PAT #1650's experiment, ADR-0005's
    existing position, and persona-runner: qa-lead advisory lost — DON_PETRY_BOT_GH_PAT gets HTTP 403 posting issue comments (regression from #1694) #1734's regression. Consequences states the single-axis trade-off above
    honestly, including the residual risk — an ADR that records only the upside is not a decision
    record.
  2. ADR-0005 is NOT edited. ADR-0000 makes an accepted ADR immutable, with the single permitted
    edit being a superseded-by status change. ADR-0008 aligns with ADR-0005 rather than reversing
    it, so no supersede link is warranted — ADR-0008's Context should say so explicitly, so a future
    reader does not assume an unrecorded conflict.
  3. The eight manifests are updated — business-analyst, devops-lead, pr-review, qa-lead,
    scrum-master, security-lead, solution-architect, sre-lead — to
    account: don-petry / credential: GH_PAT_DON_PETRY. dev-lead is already correct and must not
    be touched. validate-personas.py's check_identity (the GH_PAT_<ACCOUNT> schema rule) must
    still pass.
  4. tests/resolve_persona_identity.bats is updated, including the two tests that assert the
    bot identity by name ("qa-lead posts as the bot identity donpetry-bot, not a human maintainer"
    and its credential sibling). Keep the generic tests that prove identity is read from the manifest
    and never defaulted — those encode fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316) #1317's guarantee and are still correct.
  5. The stale rationale in persona-runner-reusable.yml is corrected. Its header currently asserts
    the persona posts as a bot "never a human maintainer — a human byline halves the recursion
    guard"
    . That comment will be false after this change; replace it with the ADR-0008 reasoning and
    cite the ADR. The credential-resolution logic already accepts both secrets and needs no behaviour
    change.
  6. The marker guarantee is reinforced, since it is now load-bearing. Add a comment at the
    pr_ensure_marker call site in the post step recording that it is the sole mechanical recursion
    guard for persona output under ADR-0008, and confirm tests/persona_runner.bats still covers the
    forgot-the-marker path (pr_ensure_marker PREPENDS the marker when the agent forgot it).
  7. persona-runner: qa-lead advisory lost — DON_PETRY_BOT_GH_PAT gets HTTP 403 posting issue comments (regression from #1694) #1734 is verified fixed by a live post, not by inspection. After the change, invoke a persona
    and confirm an advisory actually lands — author don-petry, marker present as the first body
    line — and link the run. This is the acceptance bar, and it is the step that was skipped last
    time:
    [qa-lead S7] Stop posting persona advisories under a human maintainer's PAT #1650's own AC feat: feature ideation framework — adversarial proposer/challenger/synthesizer #6 required exactly this live verification, it was never performed, and the
    first real invocation after merge 403'd and lost its advisory.

Tasks / Subtasks

Dev Notes

  • Do NOT change the router's actor-exclusion list in petry-projects/.github
    (persona-mention-reusable.yml lines ~90-91). Adding don-petry there would make personas
    un-invocable by the maintainer who invokes them most — the exclusion exists to stop bot output
    re-routing, and a human account cannot serve both roles. donpetry-bot should remain excluded: it
    is still dev-lead's review identity and other automation posts as it.
  • GH_PAT_DON_PETRY is known-good — dev-lead posts with it continuously. No new secret needs
    provisioning, which is the main reason this resolves persona-runner: qa-lead advisory lost — DON_PETRY_BOT_GH_PAT gets HTTP 403 posting issue comments (regression from #1694) #1734 immediately rather than requiring a
    permissions change on the bot account.
  • Do not "simplify" by removing DON_PETRY_BOT_GH_PAT from the reusable's secrets: block — other
    paths still reference the bot credential, and the resolution logic accepting both is what makes
    this change a one-line manifest edit per persona.
  • Approval mechanics are unaffected: require_last_push_approval compares the approver to the last
    pusher. Personas post comments; they do not push. donpetry-bot remains the PR-review approver.

Project Structure Notes

New docs/architecture/adr/0008-*.md; eight personas/*/persona.yml; tests/resolve_persona_identity.bats;
comment-only edits in .github/workflows/persona-runner-reusable.yml. No change in petry-projects/.github.

References

Activity

  1. don-petry commented on Sep 12, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead Implementation Plan

    Issue: #1765 — Personas post as don-petry, not donpetry-bot — record as ADR-0008 and apply across the fleet (fixes #1734, reverses #1650)

    Scope

    Author ADR-0008 recording that advisory personas post as the owner account don-petry, flip the advisory persona manifests to don-petry/GH_PAT_DON_PETRY, update the identity bats, and correct the runner's now-stale rationale — reinforcing the marker guard that becomes the sole mechanical recursion guard.

    ⚠️ Deviation from AC #3 — pr-review is intentionally NOT flipped

    AC #3 lists eight manifests including pr-review. I am flipping only the seven advisory personas and leaving pr-review as donpetry-bot, because flipping pr-review contradicts the rest of this issue and would break the merge gate:

    • Dev Notes (this issue): "donpetry-bot remains the PR-review approver" and "it is still dev-lead's review identity."
    • AGENTS.md (canonical org standard): "pr-review acts as the review-only machine user donpetry-bot … They are deliberately different accounts."
    • Wiring: pr-review.yml resolves BOT_USER from personas/pr-review/persona.yml runtime.identity.account — the account it approves PRs as. dev-lead authors PRs as don-petry; GitHub forbids approving your own PR, so pr-review approving as don-petry breaks require_last_push_approval/CODEOWNERS. GH_PAT_DON_PETRY may also be fine-grained, which pr-review.yml rejects for addPullRequestReview.
    • ADR-0005's basis for this issue is specifically "the account a persona posts advisory comments as" — pr-review's persona identity governs review/approval, which is out of that scope.

    The seven flipped: business-analyst, devops-lead, qa-lead, scrum-master, security-lead, solution-architect, sre-lead. dev-lead already correct; pr-review left as bot. Please confirm if pr-review was genuinely intended to flip.

    Implementation Checklist

    Tests to Write

    Test Command

    scripts/run-bats.sh tests/resolve_persona_identity.bats tests/persona_runner.bats + python3 personas/validate-personas.py + bash .dev-lead/scripts/dev-lead-lint.sh

    Note on AC #7 (live verification)

    A live persona invocation is a post-merge step — the dev-lead workspace does not push. I will flag it for post-merge execution in the final report; it cannot be performed from this pre-push workspace.

  2. don-petry commented on Sep 12, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead: Implementation Complete — PR #1768

    The implementation for issue #1765 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.

    Review happens on the PR. Acceptance criteria and test results are evidenced by the PR's diff and CI checks — not asserted here. If a later stage fails, this claim is retracted in place.

  3. added a commit that references this issue on Sep 12, 2026
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

    bugBug reportsdev-leadFor dev-lead agent pickupenhancementFeature requestsinitiativeEpic / initiative tracking issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions