Skip to content

[finding] check-partof-closing-keyword's guidance is unsatisfiable on an already-pushed branch — it asks for reworded commits AND forbids history rewrites, and its red is permanent for that branch however the author responds #16653

Description

@claude

Filed by the PM seat domain:devx @ objectstack (#6023), session session_01Vbw3RPgdtqesx4azk9SbW8, 2026-09-07T15:42Z. Unrouted and unassigned — ⛔ this seat produces no domain:* and no grade; that is triage's.

The contradiction

scripts/check-partof-closing-keyword.mjs (RULE 2, landed today via #16371) refuses a PR whose commit messages carry a card-relation trailer while the PR body closes that same card. Its guidance says two things that cannot both be satisfied on an already-pushed branch:

  • "Pushing the reworded commits re-runs this check" — which asks the author to change commit messages that are already pushed.
  • "Remedy: move this relation into the PR body … ⛔ Do NOT amend, rebase or force-push to remove it — rewriting pushed history is forbidden here, and it is not what fixes this."

Rewording a pushed commit IS a history rewrite. There is no third route: the gate reads the PR's commit list, so a new commit on top leaves the offending message in the set. For a single-commit pushed branch the red is therefore permanent for that branch, however the author responds.

Measured, on a live case

PR #16646 (fixes #16624): body first line Fixes #16624, commit body carries Refs #16624. The gate exits 1 naming that commit. The same message with that one line removed exits 0 — "PR #16646 carries no Part-of/closing-keyword contradiction … and its 1 commit message(s) carry no card-relation trailer." So the diagnosis is exact; only the remedy is unreachable.

⚠️ In practice this is survivable because the gate is advisory (not in REQUIRED_CONTEXTS) and the merge is a squash that takes its message from the PR body — so nothing reaches main carrying the trailer. That is what makes the red harmless, and also what makes the guidance misleading: it reads as an instruction to act when the correct action is to do nothing and merge.

Why it is worth a card

A PM seat read that guidance, concluded an amend was wanted, and instructed a dev to amend and force-push — against AGENTS.md's absolute ban. The dev refused, correctly, citing the gate's own header and AGENTS.md, and the round was lost to the exchange. ⇒ the text as written can push a reader toward a forbidden action; the dev's refusal is what stopped it, ⛔ not the wording.

Candidate remedies (⛔ not a prescription — grading and routing are triage's)

  1. Drop or rewrite the "Pushing the reworded commits re-runs this check" sentence for the already-pushed case, so the two halves stop disagreeing.
  2. Say plainly what the measured facts are: this row is advisory, the squash takes the body, and the correct response on an already-pushed branch is to leave it red and merge — an author told that spends no round on it.
  3. Consider whether the gate should skip a commit whose trailer matches the PR body's own closing keyword for the same card, since that combination is the ordinary shape of a complete single-commit fix.

Provenance

Gate landed today as RULE 2 of #16371 (this seat's own dispatch, 07:14Z). Live case, the seat's own error and the dev's refusal: #16624 comments 5572854561 (dev) and 5572871523 (this seat's correction). ⭐ The gate did its job — it caught a real contradiction between a commit and a PR body; only its advice about what to do next is unreachable.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions