ci: retire the agent-completion truth gate - #1431
Conversation
Removes ~7,750 lines whose only effect was a check that failed on every pull request, including merged ones. The gate scored a pull request against a frozen intent snapshot on its linked issue. That snapshot is written only by `snapshot-agent-task-intent`, which runs on `issues` events and never on `pull_request_target`. #1377 narrowed applicability so provenance arms the gate only when a linked issue exists, which removed a real false-positive class. It did not and could not fix the deadlock, because two required checks contradict each other: * `PR Governance` requires exactly one `Closes #<issue>` reference. * That linked issue is exactly what arms the truth gate. * The armed gate then demands an intent snapshot that exists only for work dispatched through an issue labelled `agent-task`/`mcp-agent` already declaring an agent login and run id. So satisfying `PR Governance` guarantees failing `agent-completion/truth-gate` unless the work originated from a dispatch. The only pull requests #1377 could rescue were ones with no linked issue -- exactly the ones `PR Governance` rejects. Demonstrated on #1408, where linking an issue moved the verdict from missing_linked_issue to missing_intent_snapshot but left it blocked. No change to the applicability rule resolves this: the arming condition is mandatory under another check. The trust infrastructure was never provisioned either. All three allowlists in `.github/agent-lock/trusted-publishers.json` were empty, and the file's own note recorded that an empty allowlist "intentionally blocks rather than downgrading agent work to not_applicable". Removed: .github/workflows/agent-completion-enforcement.yml 161 .github/agent-lock/trusted-publishers.json 8 scripts/ci/agent_completion_gate.py 443 scripts/ci/agent_completion_enforcement.py 90 tests/unit/test_agent_completion_gate.py 3634 tests/unit/test_agent_completion_enforcement.py 31 pr-checks.yml truth-gate jobs ~3224 `pr-checks.yml` is reduced from 3297 lines to 75, keeping only `validate` -- PR title, conventional-commits format, description length, and the large-PR warning. That job is independent of the gate and worth keeping; deleting the file wholesale would have silently dropped it. Its `schedule: */15 * * * *` trigger, which existed only to drive the gate's refresh job, is also gone. `PR Governance` and `Canonical issue and evidence` are untouched -- they live in pr-governance.yml, they are satisfiable, and they now own binding a pull request to one focused issue. That is what the truth gate was trying to guarantee, minus the part that could never pass. Verified: 8119 tests collected on origin/main, 8002 on this branch -- a delta of exactly 117, matching the 117 test functions in the two deleted files. Full unit suite 7997 passed, 0 failed. No surviving reference to the apparatus in any workflow, script, or test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YcHjCZ6pGn6A5BeeoZ6eZi
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
🔍 PR Validation |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned Files
|
Agent Completion Truth Gate: BLOCKEDReasons: Machine-readable verdict{
"verdict": "blocked",
"reasons": [
"verdict_artifact_missing"
],
"details": {}
} |
Resolves the pr-checks.yml conflict in favour of main: #1431 retired the agent-completion truth gate outright, so this branch's edits to that job (comment corrections, twice) have no surviving target. The substance of this PR -- the pr-governance.yml author escape and its five behavioural tests -- is untouched by the retirement. Updates the escape's own comment, which cited the retired gate as the sibling precedent for deferring. Left as-is it would assert a cross-check that no longer exists, which is the same class of stale claim this PR was opened to remove. Verified after the merge: both workflows parse, and tests/unit/test_pr_governance_workflow.py is 14 passed, including test_gate_is_not_applicable_to_dependabot and the two narrowness guards. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsrR4ngeBsCT9qiBftEWbB
* docs: correct the dangling truth-gate reference in MERGE_POLICY The demotion-rule section cited `.github/workflows/agent-completion-enforcement.yml` in the present tense as a file that "documents" its own failure mode. The preceding commit deletes that file, so the reference dangled. Recast in past tense and record that both workflows were removed as unsatisfiable. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WAtfaTNtsPS6wzzo865nd3 * docs: reconcile stale truth-gate guidance in dated reports and the agent SOP CodeRabbit's full review on #1434 found two dated remediation reports still giving present-tense operational instructions about machinery this branch deletes. A sweep for the same defect found a third the review missed. docs/runbook/pr-remediation-report-2026-08-04.md Historical banner; recommendation 3 ("restore the publishing App or drop the gate") recast as resolved-by-removal. There was no trust path to restore: all three allowlists were empty by construction. docs/pr-remediation/2026-07-31-run.md Historical banner; the "provide a provenance disposition" next-command and the infrastructure note recast to past tense. invalid_payload was a symptom, not the disease -- the arming condition was mandatory under another gate. .jules/agent_orchestration_sop.md Not flagged by the review. Line 65 listed "the truth gate reports the real remaining blockers" as a live verification gate an agent must satisfy before advancing a PR. Repointed at PR Governance / Canonical issue and evidence. Observations in the dated reports are left intact -- they are an accurate record of the queue on their run dates. Only the imperatives changed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WAtfaTNtsPS6wzzo865nd3 --------- Co-authored-by: Claude <noreply@anthropic.com>
Canonical issue
Closes #1430
Outcome
Removes 7,750 lines whose only effect was a check that failed on every pull request, including merged ones.
agent-completion/truth-gatestops reporting; CI failures become visible again instead of being buried under a check that is always red.#1377 narrowed applicability and removed a real false-positive class, but could not fix the deadlock. Two required checks contradict each other:
PR GovernancerequiresCloses #<issue>, that linked issue is exactly what arms the truth gate, and the armed gate then demands an intent snapshot that exists only for dispatched work. Satisfying one guarantees failing the other. Demonstrated live on #1408 — addingCloses #1407moved the verdict frommissing_linked_issuetomissing_intent_snapshotand left it blocked.The trust infrastructure was never provisioned either: all three allowlists in
trusted-publishers.jsonwere empty, with a note recording that this deliberately blocks rather than downgrading tonot_applicable.Scope
pull_request_template.md,.github/workflows/README.md, andAUDIT.md.pr-governance.yml— untouched. It becomes the sole binding gate.pr-checks.yml'svalidatejob — kept, see below.What was kept, and why it nearly wasn't
pr-checks.ymlgoes from 3,297 lines to 75. All five of its jobs looked like apparatus, and my first plan was to delete the file outright..github/workflows/README.mdsaid it "validates PR title (conventional commits) and description" — checking that claim showedvalidateis genuinely independent of the gate and is what posts the🔍 PR Validationcomments. Deleting the file wholesale would have silently dropped PR title and description validation.The job is carried over verbatim (extracted by line range, not retyped). Its
schedule: */15 * * * *trigger went with the rest — that existed only to drive the gate's refresh job, so this also stops a workflow that was running every 15 minutes indefinitely.Risk
PR GovernanceandCanonical issue and evidence, which are satisfiable and demonstrably work:PR Governancecaught fix(ci): unblock the merge gate, consolidate its competing fixes, and audit 337 branches #1377's own non-conforming description.git revert. The change is deletions plus three doc edits; no runtime code path, schema, or infrastructure is touched.Verification
Current head
27b2ecf0f.origin/main, 8,002 on this branch = 117, matching the 117 test functions in the two deleted test files precisely. (An earlier 8,079 baseline was stale;maingained tests when test: restore focused skill-dispatch regression tests #1225 and fix(security): neutralize CR/LF in rendered log records (CWE-117) #1270 merged mid-work.)grepforagent_completion_gate,agent_completion_enforcement,agent-completion/truth-gate,trusted-publishers,agent-lockacross*.py,*.yml,*.ts,*.js,*.jsonreturns nothing. This caughttests/unit/test_agent_completion_enforcement.py, which imported a module being deleted and would have broken collection.yaml.safe_loadgives exactly one job,validate, one trigger,pull_request_target, permissions intact.PR Governance/Canonical issue and evidenceare inpr-governance.yml;approve/mergeindependabot-auto-merge.yml. Neither file is touched.test_gh_aw_workflow_governance.py— 9 passed against the trimmedpr-checks.yml.Production evidence
Not applicable — CI configuration and tests only. No runtime, build-output, or deployment surface is touched. Under
MERGE_POLICY.mdgate 4, previews gateapps/web/**changes; this touches none.Agent handoff
After this merges
agent-completion/truth-gateshould stop appearing on new pull requests entirely. If it still reports, that is a real signal worth flagging.Still open and needing you:
scripts/maintenance/archive-and-prune-branches.sh(dry run, then--execute) with tag-write credentials.ecdsaadvisory).Generated by Claude Code