Skip to content

gates: the two required contexts name their own subject, not the wrong one - #3062

Merged
gHashTag merged 12 commits into
masterfrom
w54-required-gates-name-their-subject
Sep 4, 2026
Merged

gates: the two required contexts name their own subject, not the wrong one#3062
gHashTag merged 12 commits into
masterfrom
w54-required-gates-name-their-subject

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Closes #3061

Two of the five required contexts in docs/BRANCH-PROTECTION.md printed a verdict about something they never examined. A wrong message on a required check is the worst place for one: it is the check a contributor cannot merge past, and it sends them to fix the wrong thing.

1. NOW Sync Gate — a revision it cannot resolve read as a missing entry

BASE="${PR_BASE_SHA:?}"
ADDED=$(git diff --diff-filter=A --name-only "$BASE" "$HEAD" | grep -E "$ENTRY_RE" || true)

${...:?} catches unset and empty, not a non-empty SHA naming an object this clone does not have — a shallow fetch, a force-push that orphaned the base, a rerun after the branch moved. git diff exits 128, and the || true that exists to absorb grep's no-match absorbs that identically.

$ GITHUB_EVENT_NAME=pull_request PR_BASE_SHA=00…01 PR_HEAD_SHA=$(git rev-parse HEAD) \
    bash scripts/ci/now-sync-gate-diff.sh
fatal: bad object 0000000000000000000000000000000000000001
::error::SYNC REQUIRED: this PR/push adds no docs/now/ entry.
EXIT=1

After: both revisions are verified with git cat-file -e <sha>^{commit}; an absent one exits 2 and names the variable and the value. Resolvable revisions produce exactly the verdict they did before. The push arm is fixed the same way.

2. Issue Gate — no pull request read as an unreferenced pull request

workflow_dispatch carries no pull_request object, so PR_TITLE and PR_BODY render as empty strings, grep matches nothing, and the step printed

::error::L1 TRACEABILITY violation: No issue reference found in PR title/body.

against a pull request that does not exist. IS_BOT does not rescue it — a human dispatcher makes every disjunct false. Not hypothetical: tools/check_now_entry_shape.py:185 already records the dispatch run that produced it.

After: the step reads PR_NUMBER, and with none it says it examined nothing and exits 0. POSIX 1003.3 calls that UNTESTED — no subject, which is different from an instrument that failed — and the message says it is not a pass for any PR.

Evidence

arm result
NOW gate, base absent from checkout exit 2, names PR_BASE_SHA and the value, no "SYNC REQUIRED"
NOW gate, push with an absent PUSH_AFTER exit 2
NOW gate, resolvable pair unchanged verdict (0 or 1)
Issue Gate, no pull_request exit 0, "examined nothing", no violation text
Issue Gate, real PR with Closes #7 exit 0, ✅ Issue gate passed
Issue Gate, real PR with no reference exit 1, violation — unchanged
mutant result
drop the revision check 3 assertions FAILED
refuse every revision (exit 2 always) only the control catches it
drop the no-PR branch 3 assertions FAILED
take the no-PR branch always only the two real-PR controls catch it

The test extracts the Issue Gate's run: body from the workflow rather than restating it, so editing the YAML and not the test is caught — and it asserts the extraction matched, because an extractor that stops matching would assert nothing at all.

The NOW gate's control compares HEAD against itself rather than HEAD~1: it needs no history, so it survives a fetch-depth: 1 checkout instead of silently skipping there. A control that vanishes with the runner's clone depth is not one.

The test runs in untrusted-input-gate.yml rather than in either gate's own workflow, so a break in the test cannot turn a required context red for a reason unrelated to the change under test.

Where these came from

A read-only fan-out over workflows, hooks, python gates and the Rust --gate commands: 41 candidates, 15 confirmed, 9 refuted, 0 agent deaths. These two are the only ones marked blocks-a-merge.

Among the thirteen left is a fourth quiet shape that tri gates quiet (#3049) does not classify — if grep -n PATTERN A B 2>/dev/null; then … else echo OK, where grep's exit 2 (cannot open) merges with exit 1 (no match) and the else prints success. coq-kernel.yml:121 is its only instance in 49 workflow files, and the reproduction ran GNU grep 3.11 with one operand absent and got OK: no Admitted, exit 0. Listed in #3061 rather than fixed here.

…g one

Closes #3061

Both are in docs/BRANCH-PROTECTION.md's required list, so each wrong message
lands on a check nobody can merge past.

NOW Sync Gate. `${PR_BASE_SHA:?}` catches unset and empty, not a non-empty SHA
naming an object this clone does not have -- a shallow fetch, a force-push that
orphaned the base, a rerun after the branch moved. `git diff` exits 128, and
the `|| true` that exists to absorb grep's no-match absorbs that identically,
so the gate printed "SYNC REQUIRED: this PR/push adds no docs/now/ entry"
about a comparison it never made. Reproduced with a bad base SHA. It now
verifies both revisions with `git cat-file -e <sha>^{commit}` and exits 2 when
one is absent, naming the variable and the value; resolvable revisions produce
exactly the verdict they did before. The push arm is fixed the same way.

Issue Gate. workflow_dispatch carries no `pull_request` object, so PR_TITLE and
PR_BODY render as empty strings, grep matches nothing, and the step printed
"L1 TRACEABILITY violation: No issue reference found in PR title/body" against
a pull request that does not exist. Not hypothetical:
tools/check_now_entry_shape.py:185 already records the dispatch run that
produced it. It now reads PR_NUMBER and, when there is none, says it examined
nothing and exits 0 -- POSIX 1003.3 UNTESTED, no subject, which is different
from an instrument that failed, and the message says it is not a pass for any
PR.

Found by a read-only fan-out over workflows, hooks, python gates and the Rust
--gate commands: 41 candidates, 15 confirmed, 9 refuted, 0 agent deaths. These
two are the only ones marked blocks-a-merge; the other thirteen are in #3061's
closing note.

Four mutants, four kills, and two are caught only by the controls: refusing
every revision kills the resolvable-pair control, and taking the no-PR branch
unconditionally kills both real-PR controls. The test extracts the Issue Gate's
`run:` body from the workflow rather than restating it, so editing the YAML and
not the test is caught -- and it asserts the extraction matched, because an
extractor that stops matching would assert nothing at all.

The control for the NOW gate compares HEAD against itself rather than HEAD~1:
it needs no history, so it survives a fetch-depth 1 checkout instead of
silently skipping there. A control that vanishes with the runner's clone depth
is not one.
@gHashTag
gHashTag enabled auto-merge (squash) September 3, 2026 20:44
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 20:47:53 UTC

Summary

Status Count
Total Open PRs 17
PRs with Failing Checks 10
PRs with All Checks Green 7
READY 0
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

Refs #3061

#3064 landed a step at the same anchor this branch adds one to -- both are
'a gate that could not run must say so' tests, written hours apart against the
same class. Both kept, both run green here.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 22:00:32 UTC

Summary

Status Count
Total Open PRs 12
PRs with Failing Checks 10
PRs with All Checks Green 2
READY 0
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 22:10:02 UTC

Summary

Status Count
Total Open PRs 13
PRs with Failing Checks 10
PRs with All Checks Green 3
READY 0
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 22:20:47 UTC

Summary

Status Count
Total Open PRs 13
PRs with Failing Checks 10
PRs with All Checks Green 3
READY 0
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 22:34:38 UTC

Summary

Status Count
Total Open PRs 14
PRs with Failing Checks 9
PRs with All Checks Green 5
READY 0
FAILING 9
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

Both sides append a step at the same anchor in untrusted-input-gate.yml, so the
conflict is structural rather than semantic and both steps are always right.
This is the fourth time; the cheap fix is an ordering rule for the step list,
noted rather than done here.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 23:06:10 UTC

Summary

Status Count
Total Open PRs 13
PRs with Failing Checks 11
PRs with All Checks Green 2
READY 0
FAILING 11
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

This branch owns no skill section; master's copy carried the three conflict
markers from #3072, so the repaired copy is used rather than propagating them.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 23:15:14 UTC

Summary

Status Count
Total Open PRs 13
PRs with Failing Checks 9
PRs with All Checks Green 4
READY 0
FAILING 9
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 23:30:26 UTC

Summary

Status Count
Total Open PRs 12
PRs with Failing Checks 10
PRs with All Checks Green 2
READY 0
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 23:55:59 UTC

Summary

Status Count
Total Open PRs 12
PRs with Failing Checks 10
PRs with All Checks Green 2
READY 0
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 23:59:22 UTC

Summary

Status Count
Total Open PRs 12
PRs with Failing Checks 10
PRs with All Checks Green 2
READY 0
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@gHashTag
gHashTag merged commit f8b3d6e into master Sep 4, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Both required gates report the wrong subject when their instrument fails

1 participant