Repository navigation
ci: make the cross-audits re-runnable, and stop them looking un-run - #210
Conversation
Two problems, both hit during today's PRs. RE-AUDITING WAS UNREACHABLE. The audits fire on `opened`/`reopened`/`labeled` and deliberately not on `synchronize`, so a fix pushed in response to a finding was never re-audited — the posted verdict kept describing the first commit. The documented escape hatch, "add the `agent:audit` label", does not work either once the PR already carries it: re-adding a label a PR already has fires no `labeled` event at all, so it silently does nothing. On #207 the only way to get a verdict on the fixed code was to REMOVE the label and add it back. `synchronize` is now a trigger, but only when the PR already carries `agent:audit`. A plain PR still gets exactly one audit on open, so the fix loop's pushes don't re-spend credits; labelling one says "keep auditing this as I fix it" and every later push re-audits until the label comes off. That makes the label meaningful rather than a one-shot, and makes re-auditing reachable without the remove/re-add dance. THE STATUS READ AS "NEVER RAN". The Classifier's `domain:*` labels land seconds after open, and each one triggers this workflow, which correctly skips. That skipped run is NEWER than the real audit, so `gh pr checks` reports "skipping" while the audit had in fact succeeded moments earlier. I read that as "the auditors don't run for this change class" and said so — wrong, and the sort of wrong that gets a review gate quietly written off. GitHub cannot filter label names in `on:`, so the skipped run is unavoidable; both headers now explain the display, and the job comment says which labels are allowed to spend credits. sdlc-design-review is untouched: its `types: [labeled]` + `domain:ui` gate is the intended routing pattern, not this bug. actionlint clean. Behaviour verified on the PR carrying this change.
🔎 Codex cross-audit (agent:audit)No Blocking findings. I don’t see correctness or security regressions introduced by this PR. The new Validation performed:
Residual note: pushes without |
🔷 Gemini cross-audit (agent:audit-gemini)🔷 Gemini Audit Verdict: CONDITIONAL PASS (Blocking Issues Identified)While the updated GHA triggering logic is syntactically correct and safely handles the opt-in 1.
|
🔎 Codex cross-audit (agent:audit)No Blocking findings. I found no correctness, security, or missed-edge regressions in the PR diff. The new Verification: inspected |
🔷 Gemini cross-audit (agent:audit-gemini)🔴 Blocking Issues1. Lack of Concurrency Control (High Risk of Costly & Redundant Runs)
2. Duplicate Auditing During Auto-Fix Loops (Extreme API Credit Waste)
|
🔎 Codex cross-audit (agent:audit)No Blocking findings. I did not find correctness, security, or missed-edge-case regressions in the PR diff. The new Residual note: these workflows will now produce skipped runs on unlabeled Validation: parsed both workflow YAML files successfully. |
🔷 Gemini cross-audit (agent:audit-gemini)I have audited the changes in 🟢 Status: Approved (No Blocking Issues)The changes are correct, secure, and idiomatic. They successfully implement an opt-in re-audit loop for both the Gemini and Codex auditors while minimizing token/credit spend. 🔍 Detailed Audit Findings1. Logic & Correctness (Pass)
2. Security (Pass)
3. Edge Cases & Reliability (Pass)
|
Verified on this PR's own CISame-repo PRs run the head branch's workflow, so this change tested itself. Codex audit runs, in order:
The last row is the behaviour that did not exist before. Under the old config that push was ignored entirely and the posted verdict kept describing an older commit — which is why #207 needed the remove-then-re-add dance to get a verdict on fixed code. Row 2 is the display bug, reproduced live: a skipped label-triggered run lands newer than the successful audit, so |
Two problems, both hit during today's PRs.
1. Re-auditing was unreachable
The audits fire on
opened/reopened/labeledand deliberately not onsynchronize— so a fix pushed in response to a finding was never re-audited, and the posted verdict kept describing the first commit.The documented escape hatch ("add the
agent:auditlabel") doesn't work once the PR already carries it: re-adding a label a PR already has fires nolabeledevent, so it silently does nothing. On #207 the only way to get a verdict on the fixed code was to remove the label and add it back.synchronizeis now a trigger, but only when the PR already carriesagent:audit:agent:auditA plain PR still gets exactly one audit on open, so the fix loop doesn't re-spend credits. Labelling one means "keep auditing this as I fix it" — which makes the label meaningful rather than one-shot.
2. The status read as "never ran"
The Classifier's
domain:*labels land seconds after open, and each one triggers this workflow, which correctly skips. That skipped run is newer than the real audit, sogh pr checksshowsskippingwhile the audit had already succeeded.I read that as "the auditors don't run for this change class" and said so — wrong, and the kind of wrong that gets a working review gate quietly written off. GitHub can't filter label names in
on:, so the skipped run is unavoidable; both headers now explain the display, and the job comment says which labels may spend credits.sdlc-design-reviewis untouched — itstypes: [labeled]+domain:uigate is the intended routing pattern, not this bug.Verification
actionlintclean. The behavior table above is being verified on this PR, which carries the change.