Skip to content

ci: retire the agent-completion truth gate - #1431

Merged
groupthinking merged 1 commit into
mainfrom
claude/event-relay-blockers-1k020k
Aug 7, 2026
Merged

ci: retire the agent-completion truth gate#1431
groupthinking merged 1 commit into
mainfrom
claude/event-relay-blockers-1k020k

Conversation

@groupthinking

Copy link
Copy Markdown
Owner

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-gate stops 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 Governance requires Closes #<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 — adding Closes #1407 moved the verdict from missing_linked_issue to missing_intent_snapshot and left it blocked.

The trust infrastructure was never provisioned either: all three allowlists in trusted-publishers.json were empty, with a note recording that this deliberately blocks rather than downgrading to not_applicable.

Scope

  • Included: the eight artefacts listed in Retire the agent-completion truth gate — it cannot be repaired #1430, plus reference cleanup in pull_request_template.md, .github/workflows/README.md, and AUDIT.md.
  • Explicitly excluded:
    • pr-governance.yml — untouched. It becomes the sole binding gate.
    • pr-checks.yml's validate job — kept, see below.
    • Branch protection changes — none; the gate was never a required check.

What was kept, and why it nearly wasn't

pr-checks.yml goes 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.md said it "validates PR title (conventional commits) and description" — checking that claim showed validate is genuinely independent of the gate and is what posts the 🔍 PR Validation comments. 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

Verification

Current head 27b2ecf0f.

  • Test-count delta is exact — 8,119 collected on 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; main gained 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.)
  • Full unit suite — 7,997 passed, 5 xpassed, 0 failed.
  • No dangling referencesgrep for agent_completion_gate, agent_completion_enforcement, agent-completion/truth-gate, trusted-publishers, agent-lock across *.py, *.yml, *.ts, *.js, *.json returns nothing. This caught tests/unit/test_agent_completion_enforcement.py, which imported a module being deleted and would have broken collection.
  • Trimmed workflow parsesyaml.safe_load gives exactly one job, validate, one trigger, pull_request_target, permissions intact.
  • Kept checks live elsewherePR Governance / Canonical issue and evidence are in pr-governance.yml; approve / merge in dependabot-auto-merge.yml. Neither file is touched.
  • test_gh_aw_workflow_governance.py — 9 passed against the trimmed pr-checks.yml.

Production evidence

Not applicable — CI configuration and tests only. No runtime, build-output, or deployment surface is touched. Under MERGE_POLICY.md gate 4, previews gate apps/web/** changes; this touches none.

Agent handoff

After this merges

agent-completion/truth-gate should stop appearing on new pull requests entirely. If it still reports, that is a real signal worth flagging.

Still open and needing you:


Generated by Claude Code

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
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v0-uvai Ready Ready Preview, v0 Aug 7, 2026 6:41pm

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • [‘architecture-gap’, ‘bug’, ‘ci-cd’, ‘ci/cd’, ‘copilot-rabbit’, ‘documentation’, ‘duplicate’, ‘enhancement’, ‘frontend’, ‘github_actions’, ‘good first issue’, ‘help wanted’, ‘high-priority’, ‘invalid’, ‘javascript’, ‘ml-model’, ‘needs-triage’, ‘pipeline-critical’, ‘placeholder-code’, ‘priority:high’, ‘python’, ‘python:uv’, ‘question’, ‘styling’, ‘tests’, ‘v0’]

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1a27610a-c728-4608-819e-1d3977fe773c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

Comment @coderabbitai help to get the list of available commands.

@groupthinking groupthinking added ci-cd github_actions Pull requests that update GitHub Actions code labels Aug 7, 2026 — with Claude
@github-actions github-actions Bot added ci/cd documentation Improvements or additions to documentation python labels Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

🔍 PR Validation

⚠️ Large PR detected (7762 lines changed)

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 79e1d38.
Ensure 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

  • .github/workflows/pr-checks.yml

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Agent Completion Truth Gate: BLOCKED

Reasons: verdict_artifact_missing

Machine-readable verdict
{
  "verdict": "blocked",
  "reasons": [
    "verdict_artifact_missing"
  ],
  "details": {}
}

Workflow evidence

@groupthinking
groupthinking marked this pull request as ready for review August 7, 2026 18:44
@groupthinking
groupthinking merged commit 8cd4a10 into main Aug 7, 2026
48 of 54 checks passed
@groupthinking
groupthinking deleted the claude/event-relay-blockers-1k020k branch August 7, 2026 18:44
@linear-code

linear-code Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

GRV-350

groupthinking pushed a commit that referenced this pull request Aug 7, 2026
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
groupthinking added a commit that referenced this pull request Aug 7, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd ci-cd documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retire the agent-completion truth gate — it cannot be repaired

2 participants