fix(codeql): recover reruns after pre-runner cancellation - #1902
fix(codeql): recover reruns after pre-runner cancellation#1902seonghobae wants to merge 7 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Exact-head verification sweep for Accordingly the executable test-first regression and minimal source repair remain a development candidate, not hosted GREEN or merge-ready evidence. ADR 0025 is still Proposed and its attempt-one/attempt-two prose must be reconciled before this Draft can advance; do not mark it Accepted merely because the recovery defect is understood. |
|
Non-force restack completed on protected Keep Draft: ADR 0025 still describes the older "attempt one dispatch / attempt two verdict read" sequence and must be made code-current before merge, and this restacked exact head still needs its own full test/coverage/docstring/workflow/security/review evidence. After ordinary protected integration, acceptance remains rerunning unchanged accounting-platform #49 and observing authenticated terminal |
|
Fresh owner-head adoption: protected Keep Draft. This restack does not address the still-stale ADR 0025 and predecessor checks/reviews do not transfer. Require all evidence on |
Root cause
The required
CodeQL PRworkflow treatedgithub.run_attempt != 1as proof that an earlier attempt had already dispatched the native scan. That is false when earlier attempts are cancelled before runner assignment.Concrete consumer evidence is
ContextualWisdomLab/accounting-information-platform#49@065f9ab7038bf35db4ef129827de6ab8ee6a1038, CodeQL run33890965185:101082241642:cancelled,runner_id=0,steps=[];101128192785:cancelled,runner_id=0,steps=[];actionsjob101220582725andpythonjob101220582747found no authenticated terminalcodeql-dispatch/<language>status and failed solely at theRUN_ATTEMPT != 1guard.The unchanged consumer head therefore could not recover when runner capacity later became available.
RED / minimal causal repair
4c62031fb253cec6abb39ac14c0dc124db6a61e6executes the production dispatch Bash block with a later attempt, no authenticated verdict, exact live head, OIDC/app-token boundary stubs and the observed AIP run/job identity. It requires boundedcodeql-scandispatch withverdict=pendinginstead of an attempt-number veto.fabc998d3efffee61e288e14624d5a933026b2ffremoves only that veto. Live PR/head revalidation, creator-bound terminal status consumption, exact run/job validation, OIDC exchange, one-language payload and fail-closed pending/failure behavior remain intact.e47de34288fba93b990a39031503c3e59caeb680records the reproduction, rollback boundary, duplicate-recovery risk and post-integration canary.67a6bc95ac9a85cdf59c0f5ce08ae0a09c5a3980removes the stale “attempt 1 dispatch / attempt 2 consume” architecture claim. ADR 0025 now makes recovery evidence-driven:run_attemptis metadata, not a dispatch receipt; absent a trusted exact-head terminal verdict, the exact shard may redispatch and remainspendinguntil the authenticated central handler produces a terminal status.The same target-repository / PR / language concurrency lane bounds duplicate recovery. A manual rerun can replace an already queued same-shard native dispatch before a terminal receipt exists; if that churn is material, the successor design must add an authenticated pending/dispatch receipt rather than restoring attempt-number inference.
Concurrent-main adoption
Protected
mainadvanced independently from27d7331cc4e0ae73f2d10122e9f2a8f437c90641to8aea81323d93e90c79b71d7718de2798919fa1dfin three commits touchingopencode-review.yml,AGENTS.md, andCLAUDE.md. Those paths do not overlap this PR's four-file delta. Commit510e3378f2fc30129debc776f4a187474f5ff6faadopts that intervening protected-main tree as a normal two-parent descendant; no rebase, force-push, or delta loss was used. Comparemain@8aea813… -> 510e337…is ahead 7 / behind 0 and still contains only this PR's four changed files.Current exact state and acceptance
Current exact development head is
510e3378f2fc30129debc776f4a187474f5ff6faon protectedmain@8aea81323d93e90c79b71d7718de2798919fa1df. Keep Draft until this unchanged head has the focused regression, existing CodeQL contracts, complete central tests, 100% owned coverage/docstrings, workflow syntax, security gates, code-current documentation, resolved review findings and qualifying independent approval.After ordinary protected integration, rerun the unchanged AIP #49 exact head and require real authenticated terminal
codeql-dispatch/actionsandcodeql-dispatch/pythonverdicts. No leaf workaround, provider substitution, synthetic status, self-approval, admin bypass, force push or required-gate weakening is authorized.