Description
Problem
Epic #1643, Phase 2. On the first live router-served pull_request dispatch (PR #2188, 2026-10-10), the persona runner produced a qa-lead advisory and then discarded it.
Run 38051651146: pre-gate run, authorization preflight passed, engine step succeeded (43 s), then the post step failed:
##[error]posting token authenticates as '{
persona-runner-reusable.yml reads the posting identity with actual_login="$(gh api user -q .login 2>/dev/null || true)" and compares it to the manifest account. When that API call fails, gh prints the error response body on stdout, so actual_login holds a JSON object rather than a login. The check reads that as "wrong identity" and exits 1. The same read worked 46 seconds earlier in the preflight step of the same run, so the failure was transient.
Three things are wrong:
- An unreadable login is reported as a wrong identity. The message names the first character of a JSON error body as the account, which points an operator at a credential problem that does not exist.
- No retry. One transient API failure discards an advisory the engine has already been paid for.
- The advisory is not preserved. The
Preserve the advisory as a run artifact (post failed)step ran and loggedNo files were found with the provided path: …/persona-advisory-body.md, because the identity check fails before the body is extracted and written. The Preserve the advisory when the persona post fails — a 403 must cost a retry, not the work (split from #1734 AC #4) #1775 preservation does not cover this failure.
The authorization preflight step has the same read ([ -n "$actual_login" ] && [ "$actual_login" != "$POSTING_ACCOUNT" ]). Its comment says an unreadable login is deliberately left to the post step, but an error body is non-empty, so the preflight would also reject it as a wrong login.
Why it matters now
On #2188 the PR still got one advisory, because the local qa-lead-pr-advisory.yml path ran next in the same concurrency group and posted. Once that local workflow is retired, the router path is the only one, and a pull_request: opened event does not recur: a transient failure here means that PR never gets an advisory. This blocks retiring qa-lead-pr-advisory.yml.
Acceptance criteria
- One helper (in
scripts/lib/persona-runner.sh) reads the posting login and returns one of three outcomes: a syntactically valid login, unreadable (the call failed, or the output is not a valid GitHub login), or nothing configured. Both the preflight and the post step use it. - The post step retries an unreadable read with backoff (3 attempts). If it is still unreadable it fails with a message that says the identity could not be read and why — never
authenticates as '<error text>'. A readable login that differs from the manifest account still fails closed at once, with the existing message. Posting under an unverified identity is never an outcome. - The preflight treats an unreadable read as indeterminate (its documented fail-open contract) and a readable mismatch as definite.
- The advisory body is extracted and written to
$RUNNER_TEMP/persona-advisory-body.mdbefore the identity check, so the preservation step uploads it on any post-step failure. - bats in
tests/persona_runner.bats, withghstubbed to print an error body and exit non-zero: unreadable then readable → posts; unreadable three times → fails with the unreadable message and the body file exists; readable mismatch → fails at once with the mismatch message; the helper rejects{-prefixed and multi-line output as a login.
Budget guard
ACs 1, 2 and 4 are the ones that matter. If the preflight change (AC 3) grows beyond swapping in the helper, land the rest, file a follow-up, and stop.
Activity
don-petry commentedon Oct 10, 2026
Dev-Lead Implementation Plan
Issue: #2196 — persona-runner discards a finished advisory when the posting-identity read fails
Scope
Replace both inline
gh api user -q .loginreads inpersona-runner-reusable.ymlwith one tri-state helper, retry an unreadable read in the post step, and stage the advisory body to$RUNNER_TEMP/persona-advisory-body.mdbefore any identity check so the #1775 preservation step covers this failure.Implementation Checklist
scripts/lib/persona-runner.sh:pr_valid_login(rejects{-prefixed / multi-line / non-login output)scripts/lib/persona-runner.sh:pr_read_posting_login— rc 0 + login | rc 1 unreadable + reason | rc 2 no token configuredscripts/lib/persona-runner.sh:pr_verify_posting_identity— retries unreadable (3 attempts, backoff viaPR_LOGIN_RETRY_DELAY), fails at once on a readable mismatch (existing message), distinct "could not read the posting identity" message otherwisescripts/lib/persona-runner.sh:pr_run_post— extract + marker + redact + write body file FIRST, then verify identity, then post viapr_post_advisory_or_preserve.github/workflows/persona-runner-reusable.yml: post step callspr_run_post; preflight usespr_read_posting_login(unreadable → warning, proceed; readable mismatch → fail)Tests to Write (
tests/persona_runner.bats, gh stubbed to print an error body and exit non-zero)authenticates as '{) and the body file existsgh api usercall) with the mismatch message, body file exists{-prefixed and multi-line output as a login; no-token → "nothing configured"Test Command
bats tests/persona_runner.bats(+bash .dev-lead/scripts/dev-lead-lint.sh)don-petry commentedon Oct 10, 2026
Dev-Lead: Implementation Complete — PR #2198
The implementation for issue #2196 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.
e631606f32c664f1c0baf3327a92c1d21f65f520main: 3 file(s), +320/-62 linesReview 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.
feat: implement issue #2196 — persona-runner discards a finished advi…