Skip to content

ci: the merge gate accepts a check:pr receipt that records a failed check #3951

Open

Description

@schlessera

Context

The merge gate reads the check:pr receipt in a PR body. It refuses a candidate only for a local check whose outcome is skipped, timed-out or preempted, and only when exact-head hosted proof did not cover that check's categories.

A check recorded as failed is never examined:

  • UNPROVEN lists only the three not-run outcomes (UNPROVEN, scripts/check-receipt.ts:22).
  • uncoveredChecks filters on UNPROVEN (uncoveredChecks, scripts/check-receipt.ts:118-122).
  • receiptRefusal therefore returns null for a receipt whose only problem is a failed check (receiptRefusal, scripts/check-receipt.ts:125-132).
  • integrate.ts applies that result at scripts/integrate.ts:207.

The decision record describes the merge gate in the same terms. It maps "each skipped, timed-out or preempted check" to hosted categories and says nothing about failed (local check receipts). The same section notes that the receipt's head "need not equal the candidate's". So a PR can carry a receipt recording a failed local check from any earlier head, and the gate accepts it. Hosted proof then decides alone.

Observed 2026-11-10 on PR #3805. Its body carried a receipt for head 775cccb07 with "affected fast invariants" "outcome":"failed". The receipt was replaced with a passing one before confirmation, so nothing merged on it. Nothing in the gate would have stopped it.

Observed at main 96ba8a7c8.

Scope

Decided 2026-11-10: option B. A failed outcome joins UNPROVEN. The options considered:

  • A. Refuse. Any failed check refuses the candidate, whatever hosted proof covered. The remedy is to fix the failure and rerun check:pr.
  • B. Treat it as unproven. failed joins UNPROVEN: it is accepted only when exact-head hosted proof ran one of its categories successfully. The existing post-merge exemption applies. An unmapped failed check can never be covered.
  • C. Keep it. Document that failed is deliberately ignored and that hosted proof alone decides.

Chosen: B. It matches how the gate already treats the other non-passing outcomes and the rule that the receipt head need not match the candidate. A later commit may have fixed the failure, and B lets exact-head hosted proof show that. A, by contrast, would force a local rerun even when hosted proof already ran the category green.

Out of scope

  • Comparing the receipt head with the candidate head. The decision record makes that deliberate.
  • Changing what check:pr runs or how it records outcomes.
  • Changing the hosted proof categories or the post-merge exemption.

Acceptance criteria

  • scripts/check-receipt.ts adds failed to UNPROVEN. A failed check is accepted only when exact-head hosted proof ran one of its categories successfully, or when all of its categories are post-merge. A failed check with no mapped category always refuses.
  • The refusal text in receiptRefusal no longer says every listed check was "not run". It names a failed check as failed.
  • The local check receipts section of docs/decisions/ci-utility.md lists failed with the other non-passing outcomes, in the same change.
  • tests/check-receipt.test.ts cases show: (1) a receipt whose only problem is a failed check, with no covering exact-head category, is refused; (2) the same receipt is accepted when exact-head proof covers its category; (3) a failed unmapped check is refused. Case (1) fails on the current tree first.

Verification

bun run test tests/check-receipt.test.ts tests/integration-command.test.ts and bun run check:pr --base origin/main. Also run a mutation that removes the new rule, with the named case failing.

Contract impact

None. Repository CI tooling only. No package, CLI --json or MCP surface changes.


2026-11-10: the maintainer chose option B. Scope and acceptance criteria now follow B only.

Activity

  1. added
    type: fixSomething is broken and must behave the way it is documented.
    area: ciCI workflows, the gates they run, release scripts, packaging.
    needs: decisionBlocked on a maintainer or designer ruling, not on code.
    on Nov 10, 2026
  2. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-11-10): option B. Treat failed as unproven.

    • failed joins UNPROVEN in scripts/check-receipt.ts. A failed local check passes the merge gate only when exact-head hosted proof ran one of its categories successfully. The existing post-merge exemption applies.
    • A failed check with no hosted category can never be covered, so it always refuses. The remedy is to fix it and rerun check:pr.
    • This keeps the deliberate rule that the receipt head need not match the candidate head. A later commit may have fixed the failure, and exact-head hosted proof is how that gets shown.
    • The ci-utility.md local-check-receipts section states the rule in the same change. No separate decision record is needed, because the ruling amends that existing section.

    The body's acceptance criteria now follow B.

  3. added
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    and removed
    needs: decisionBlocked on a maintainer or designer ruling, not on code.
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ciCI workflows, the gates they run, release scripts, packaging.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.type: fixSomething is broken and must behave the way it is documented.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions