Skip to content

refactor(persona): run gating, model and posting as separate jobs - #2442

Merged
don-petry merged 1 commit into
mainfrom
persona-runner-job-split
Nov 3, 2026
Merged

don-petry merged 1 commit into
mainfrom
persona-runner-job-split

Conversation

@don-petry

@don-petry don-petry commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Splits the persona runtime reusable into three jobs, each on its own runner:

Job Does
gate Resolves the persona, runs the event pre-gate, resolves the posting identity, preflights its PAT
run Produces the advisory
post Posts the advisory; the only writer
  • Every job checks out github.workflow_sha, with no persisted credentials.
  • run hands post one artifact file holding only the redacted advisory text, kept for one day. post checks it before parsing it.
  • Each posting step gets only the PAT the persona's manifest names. An unset secret stays empty instead of falling through to another PAT.
  • persona-runner.yml names the secrets it passes instead of inheriting them.
  • The fleet pause still skips all three jobs. The registry and the AGENTS.md inventory are updated to match.

This goes live on merge: persona-runner.yml calls the reusable by local path.

Tests

Run locally at this head:

  • actionlint on both persona workflows; shellcheck --severity=warning scripts/*.sh scripts/lib/persona-runner.sh; the repo's check-* and validate-caller-inputs scripts. All pass.
  • tests/persona_runner.bats (68/68), tests/test_fleet_pause_coverage.bats (60/60), tests/test_fleet_paused_run.bats, tests/fleet_monitor_run.bats, tests/test_persona_pr_pregate.bats, tests/resolve_persona_identity.bats, tests/test_persona_authz_preflight.sh, tests/persona_reach_check.bats, tests/caller_stub_freeze.bats, tests/dev-lead/unit/test_engine_mcp.bats, tests/dev-lead/unit/test_engine_models.bats. All pass.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

Split the persona runtime reusable into three jobs, each on its own runner:
gate (resolve, pre-gate, identity, preflight), run (the model) and post (the
only writer). post checks out the workflow SHA, receives the advisory as one
validated artifact file, and holds the one posting PAT the manifest names.
The caller now names the secrets it passes instead of inheriting them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@don-petry
don-petry requested a review from a team as a code owner November 3, 2026 03:27
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-03T03:27:06.513071Z
We couldn’t complete this review. Comment @codex review to try again.
a3ebfa2 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@don-petry
don-petry merged commit 2dbf8a6 into main Nov 3, 2026
61 checks passed
@don-petry
don-petry deleted the persona-runner-job-split branch November 3, 2026 03:27
@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Collaborator Author

QA Lead — test-risk advisory

Risk tier: LOW. The new handoff helpers have thorough unit tests, including negative paths: oversized, symlinked, extra-entry, renamed and shell-injection inputs. Contract tests pin which job holds which credential, and that the token selection never falls through to the other PAT. If the cross-job wiring is wrong, the run fails visibly: nothing gets posted and the job goes red.

What I'd shore up (highest leverage first):

  • Live check right after merge. The contract tests read the YAML statically. Nothing actually runs the gate → run → post chain, and this change goes live on merge. Summon one persona on a scratch item to confirm the artifact handoff and needs.* outputs work on real runners. Then make one call where the pre-gate declines, and confirm post is skipped rather than failing on a missing artifact.
  • Pin the exact post condition. The test only checks that the condition contains needs.run.outputs.skip_post == . If someone changed the comparison to == '', the test would still pass, and post would run when the gate declined or the model step crashed. Assert == 'false' exactly.
  • Advisory text containing the sentinel lines. Add a pr_write_handoff case where the advisory itself contains a sentinel line, so extraction can't be cut short or doubled.
  • Re-runs. Artifacts are kept for one day, so re-running only post after that will fail. Note this in the failure runbook, or check that the existing 30-day "post failed" artifact covers it.

Escalate? no

Advisory only — I comment, I do not change code. Ground: BMAD Test Architecture
(bmad-tea v1.19.0). Opt out on this item with the qa-lead:hands-off label.

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