Skip to content

[qa-lead reach 3/3] Serve the pull_request surface from the persona mention router (architect decision (b), ADR-0007 consolidation) #1165

Description

@don-petry

Story

As the org,
I want the persona mention router to also serve the pull_request event,
so that a persona's PR-advisory surface is delivered by the one published ingress path instead of a second, repo-local runtime.

Decided by solution-architect advisory on petry-projects/.github-private#1869 (2026-09-23), option (b).

Why this repo, and why the router

The qa-lead pull_request advisory (.github/workflows/qa-lead-pr-advisory.yml in .github-private) is self-contained: it sources a local script and calls a local persona-runner-reusable.yml, and has no standards/workflows/ template. It therefore cannot be deployed anywhere.

The architect ruled against publishing a second runtime, citing ADR-0007 (one agent-ingress stub per repo, not one stub per role): ADR-0007 fact 4 already names persona-mention → persona-runner as the fleet's hub-and-spoke model, and a second published runtime "repeats, at the ingress-path level, the exact per-role-stub proliferation ADR-0007 just collapsed."

The router is now the right home: #1134 merged, persona-mention is promoted through v1-stable (all tiers at fde249e0), and #1159 put persona-mention.yml into DEPLOYABLE_WORKFLOWS, so the stub reaches nine repos on the next sweep.

Acceptance Criteria

  1. persona-mention-reusable.yml accepts a pull_request-sourced trigger and dispatches the addressed persona's advisory for that PR, alongside the existing comment-mention path. The caller-stub template standards/workflows/persona-mention.yml gains the event; consumers get it by re-sync, never by hand-editing a stub.
  2. Stop markers bind on the new path — the hard requirement. A pull_request-sourced dispatch must honour each persona's stop_markers from personas/<id>/interaction.yml exactly as the mention path does (persona-mention router ignores stop_markers (needs-human-review, dev-lead:needs-human) — a human hold stops dev-lead but not a mentioned persona #1133/feat: implement issue #1133 — persona-mention router ignores stop_markers (needs-human-review, dev-lead:needs-human) — a human hold stops dev-lead but not a mentioned persona #1134): skip on a declared marker, fail closed on an unreadable contract or a non-200/404 fetch, refuse when a persona has a manifest but no contract. The architect named this "the real open risk, not the routing choice." Prove it with a test per branch, not by inspection.
  3. Which personas fire on pull_request is derived, not hardcoded. Use each manifest's declared surfaces (persona.yml), so enabling another persona needs no edit here — the derive-don't-enumerate rule (Provision <id>:hands-off labels so persona opt-out actually works #756).
  4. The existing write-mode gate, opt-out label check, trust floor and agent-marker exclusion apply unchanged on the new path. A PR event must not become an ungated write surface.
  5. No behaviour change for the comment-mention path, evidenced by the existing tests still passing untouched.
  6. Rollout follows channel discipline: land here, then a maintainer cuts persona-mention and advances v1-next. Do not repoint caller stubs. Note in the PR that .github-private's local qa-lead-pr-advisory.yml is retired only after this reaches the channel (tracked on [qa-lead reach 3/3] The pull_request advisory surface has no deployable form — decide and implement how it ships beyond .github-private .github-private#1869) — retiring it earlier would leave the surface dead.

Tests

In the existing persona-mention-tests.yml suite: PR event with no stop marker → dispatches; with a declared marker → skipped, naming the marker; contract fetch 5xx → job fails (closed); contract 404 for a manifested persona → refuses; persona not declaring the surface → not dispatched; comment-mention path unchanged.

Budget guard

  1. Router ingress + derivation + stop-marker enforcement on the new path, with the tests above (AC Addressing PR comments #1–Add workflow, environment, and orchestration guidance #4). This is the commit that matters.
  2. Template stub event + docs (AC Addressing PR comments #1 remainder, feat: add Structured Logging and CQRS standards #6 note).

If budget runs low, stop after step 1 with a green PR and list the rest. Do not land the template stub change without the enforcement — a deployed stub whose path ignores stop markers is a fail-open brake fleet-wide.

References

petry-projects/.github-private#1869 (decision + advisory), #1134/#1133 (stop markers in the router), #1159/#1156 (fleet deployment), #1745 (the brake semantics), ADR-0007, ADR-0006.

Activity

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

    dev-leadFor dev-lead agent pickupenhancementFeature requests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions