Repository navigation
docs(claim-ticket): the empty draft now goes red by design, not green - #806
Merged
Merged
Conversation
`6d04e4b3` inverted the behaviour this passage described. It told the reader to expect the draft's first CI run to be the FULL backend gate and to ignore it as "green noise". As of that commit an empty diff reports `code=false`, the compile tier skips, and the new `empty pull request` job fails on purpose — so the draft goes RED in about 19s, and a session following the old wording would read the claim procedure working correctly as the gate failing, and try to fix it. Measured on a live empty PR (#794, opened and closed to prove it): 19s and `failure`, against 9m54s and `success` for a full run on the same base. Keeps the old behaviour as a dated note rather than deleting it, because the reason the bug existed — this is the one `detect` in the repo built as a denylist, and an empty path list inverts through it — is what stops it being reintroduced. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
12 tasks done
athvin
pushed a commit
that referenced
this pull request
Nov 7, 2026
Two things a pull request here did not carry, both invisible rather than wrong. Post-merge work had no record. `/land-pr` already knew the merge was not the finish line, but every observation it made lived in a session transcript — so a merged pull request and an abandoned post-merge watch looked identical from GitHub. The template now carries a ledger between stable `<!-- BEGIN POST-MERGE -->` markers, and land-pr gains Phase 4: tick it in the MERGED body, evidence inline, `n/a — <why>` where it does not apply, and leave a box empty rather than tick something unverified. A merged pull request's body is writable — probed, a PATCH on #806 while `merged: true` returned 200 — which is what makes the body the right home for the record. And a pull request need not have been tied to a ticket. The board's `Pull request merged` automation acts on the linked issue, so a pull request closing nothing moves no card; #806 merged the same day closing no issue at all. The `pull request contract` check asserts both clauses from the body, reading GitHub's own parsed `closingIssuesReferences` rather than regexing text that may not actually close anything. It is its own workflow because it needs `types: [… edited …]` — filling in the ticket line must turn it green with no push, and putting `edited` on rust.yml would re-run the backend gate on every typo fix. No `paths:` filter, so it stays promotable. Exempt: `merge-bus/*` (a bus pull request closes nothing by design, and merge-bus-verdict.sh reads its rollup, so a failure there would stop every batch), Dependabot, reverts, and a `no-ticket` label. The decision logic is pure and sourced, so pr-contract-test.sh exercises it with no network — 22 assertions, including that the committed template passes its own gate. It caught one real bug while being written: the END marker was only recorded after a BEGIN, making the `inverted` verdict unreachable. Not a required check: promoting it is a branch-protection change, and it must come after the check has been observed failing and the open pull requests predating the template have been swept. Also corrects post-merge.md, which still said the `kind` probe had never passed; its first green scheduled run on `main` was 2026-11-07.
athvin
added a commit
that referenced
this pull request
Nov 7, 2026
* feat(ci): a pull request contract — a ticket, and a post-merge ledger Two things a pull request here did not carry, both invisible rather than wrong. Post-merge work had no record. `/land-pr` already knew the merge was not the finish line, but every observation it made lived in a session transcript — so a merged pull request and an abandoned post-merge watch looked identical from GitHub. The template now carries a ledger between stable `<!-- BEGIN POST-MERGE -->` markers, and land-pr gains Phase 4: tick it in the MERGED body, evidence inline, `n/a — <why>` where it does not apply, and leave a box empty rather than tick something unverified. A merged pull request's body is writable — probed, a PATCH on #806 while `merged: true` returned 200 — which is what makes the body the right home for the record. And a pull request need not have been tied to a ticket. The board's `Pull request merged` automation acts on the linked issue, so a pull request closing nothing moves no card; #806 merged the same day closing no issue at all. The `pull request contract` check asserts both clauses from the body, reading GitHub's own parsed `closingIssuesReferences` rather than regexing text that may not actually close anything. It is its own workflow because it needs `types: [… edited …]` — filling in the ticket line must turn it green with no push, and putting `edited` on rust.yml would re-run the backend gate on every typo fix. No `paths:` filter, so it stays promotable. Exempt: `merge-bus/*` (a bus pull request closes nothing by design, and merge-bus-verdict.sh reads its rollup, so a failure there would stop every batch), Dependabot, reverts, and a `no-ticket` label. The decision logic is pure and sourced, so pr-contract-test.sh exercises it with no network — 22 assertions, including that the committed template passes its own gate. It caught one real bug while being written: the END marker was only recorded after a BEGIN, making the `inverted` verdict unreachable. Not a required check: promoting it is a branch-protection change, and it must come after the check has been observed failing and the open pull requests predating the template have been swept. Also corrects post-merge.md, which still said the `kind` probe had never passed; its first green scheduled run on `main` was 2026-11-07. * feat(ci): stamp the session and host that closed a ledger, and gate the template The ledger says WHAT was done; it did not say who, or where to go to read the reasoning behind a tick. `**Closed by:**` now carries the Claude Code session id and the machine, not just a timestamp: agent · session `<CLAUDE_CODE_SESSION_ID>` on `<hostname -s>` · <UTC> The host is the part that is easy to leave out and the part that makes the id resolvable. A transcript is a local file — `~/.claude/projects/<slug>/<id>.jsonl` on the machine that ran it — so an id alone goes nowhere once more than one machine is in play. With both, `claude --resume <id>` reopens months later; `claude --from-pr <n>` is the shortcut while that link survives, and the line in the body is what remains when it does not. `CLAUDE_CODE_SESSION_ID` is named as the authoritative source because the obvious alternative is wrong: a scratchpad path may carry the PARENT session's id when `CLAUDE_CODE_CHILD_SESSION=1`, which is the state a `/clear` leaves behind. claim-ticket stamps the same pair into its claim banner, which also gives the worktree audit a durable answer to "which session owns this tree" — the question `lsof` cannot answer when a session drives its worktree with `git -C` from the primary checkout. And `pr-contract-test.sh` joins `make check` as `pr-contract-check`. The committed template is one of its fixtures, so without it a template edit that drops a ledger marker would surface only as a red check on every pull request opened afterwards, with nothing in the diff that mentions CI. The generated gates reference picked the new step up by itself; CLAUDE.md's hand-written `make check` line is corrected to match, including the `tf-static-credentials-check` step it was already missing. --------- Co-authored-by: bmoore813 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #793, which inverted the behaviour this passage described.
claim-ticket/SKILL.mdtold the reader:As of
6d04e4b3that is false in both halves. An empty diff now reportscode=false, the compile tier reportsskipped, and the newempty pull requestjob fails on purpose — so the draft goes red in ~19s. A session following the old wording would read the claim procedure working correctly as the gate failing, and try to fix it. That is the "skills rot at borrowed identifiers" failure: the skill borrowed a fact about CI behaviour and the behaviour moved underneath it.Measured on a live empty PR (#794, opened and closed for exactly this): 19s /
failure, against 9m54s /successfor a full run on the same base.The old behaviour stays as a dated note rather than being deleted, because the reason the bug existed —
rust.yml's is the onedetectin the repo built as a denylist, and an empty path list inverts through it — is what stops it being reintroduced.Also adds the one check that must still be green on an empty draft:
agent skills (lint + drift), which is ungated and runs on everything.Body-only edit, so no description change and no generated-block regen.
skills-check allpasses (28 skills, 0 errors). Being.claude/-only, this PR is itself a worked example of thedetectexemption: the compile tier should skip.