ci: stamp version: 0 and an anchor hash from v0, and backfill merged QEPs - #35
Merged
Merged
Conversation
…d QEPs QEP-1 v3 says the post-merge stamp writes `version: 0` alongside the hash into any QEP that has left Draft and carries no `version`, and that already-merged QEPs are backfilled with the most recent commit that touched each. AGENTS.md documents that behaviour, but stamp.mjs still skipped unversioned QEPs, so QEP-3 (#29) and QEP-5 (#34) merged Accepted with no version and a `–` in the index. stamp.mjs now stamps every non-Draft QEP without a `version`: a QEP merged by this push takes this SHA; one already on main takes the last non-bot commit that touched it (QEP-3 -> d7b1f24, QEP-5 -> 8cdca64). Changed, versioned QEPs are re-stamped as before. A run that starts from the bot's own stamp commit treats nothing as changed. The stamp workflow also fires on `.github/scripts/**` so this backfill runs at merge, and on `workflow_dispatch`. Implements the stamp half of #22; the theme version pill has no implementation to update. Assisted-by: Claude Code (Claude Fable 5.1) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new backfill trigger can update README/QEP metadata in a bot push that won’t be reflected in the published Pages site without additional workflow coordination.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR updates the post-merge stamping automation so that accepted (non-Draft) QEPs with no version are backfilled to version: 0 plus an anchored version-hash, and extends the workflow trigger surface to ensure this backfill runs when the stamping scripts change.
Changes:
- Stamp
version: 0+version-hashfor any non-Draft QEP lackingversion, anchoring backfilled QEPs to the last non-bot commit that touched them. - Add a guard so manual runs starting from the bot’s own
[skip-stamp]commit don’t re-anchor “changed” QEPs to the stamp commit. - Trigger the stamping workflow on
.github/scripts/**changes and allowworkflow_dispatch.
File summaries
| File | Description |
|---|---|
| .github/workflows/stamp-version.yml | Expands workflow triggers to include script changes and manual dispatch. |
| .github/scripts/stamp.mjs | Implements v0 stamping/backfill logic and refines changed-file handling for manual runs. |
| .github/scripts/qeps.mjs | Updates documentation around version semantics now that v0 is stamped post-merge. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot review on #35: the stamp push is made with GITHUB_TOKEN, so it never triggered deploy.yml, and since v0 stamping the stamp commit is where `version: 0` and the README's `v0` cell first appear. The stamp job now runs `gh workflow run deploy.yml` after a successful push (actions: write), and its comment no longer claims the merge commit already carries everything visible. Assisted-by: Claude Code (Claude Fable 5.1) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mmcky
added a commit
that referenced
this pull request
Sep 14, 2026
…tion (#36) When #35 merged, the stamp job was **skipped**: the squash commit carried the PR body, which mentioned the bot's marker in prose (the sentence about a manual run starting from the bot's own commit), and the guard uses `contains` over the whole message. So the stamp that PR shipped did not run on its own merge and had to be dispatched by hand. This changes the guard to `startsWith` on the bot's exact subject line. The stamp script's own equivalent check already reads the subject only. Any PR whose description discusses the marker no longer skips its own stamp. Assisted-by: Claude Code (Claude Fable 5.1) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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.
Found while verifying the stamp after #34: QEP-5 merged Accepted with no
versionand a–in the index, as QEP-3 did at #29. QEP-1 v3 (§ Automation, and Adoption item 4) says the post-merge stamp writesversion: 0alongside the hash into any QEP that has left Draft and carries noversion, and backfills already-merged QEPs with the most recent commit that touched each. AGENTS.md documents that behaviour too.stamp.mjsnever got the change: it still skips an unversioned QEP with// v0 — no version to stamp.What changes
stamp.mjsstamps every non-Draft QEP that has noversion: a QEP merged by this push takes this SHA; one already onmaintakes the last non-bot commit that touched it. Changed, versioned QEPs are re-stamped exactly as before. A run that starts from the bot's own[skip-stamp]commit treats nothing as changed, so a manual run never re-anchors a QEP to a stamp commit. Drafts are never stamped.stamp-version.ymlalso fires on.github/scripts/**(so this backfill runs when this PR merges) and onworkflow_dispatch.qeps.mjsno longer calls an absentversionan implicit v0.What the merge will do, from a local run of the script on
main:d7b1f24(#29, its acceptance merge)8cdca64(#34, its acceptance merge)Nothing in
qeps/is edited by hand in this PR. QEP-1 and QEP-2 are already stamped and are untouched. A second local run reports nothing to stamp, so the script stays idempotent.Not in scope: the "theme's version pill" QEP-1 v3 also names has no implementation in this repo (the site is the stock book-theme), so #22 stays open for that half.
check.mjsis unchanged: after the backfill no QEP onmainis unversioned, so its "a first version must be 1" rule only ever meets a hand-writtenversionon a new QEP, which AGENTS.md already says to omit.Assisted-by: Claude Code (Claude Fable 5.1)
🤖 Generated with Claude Code