Skip to content

ci: stamp version: 0 and an anchor hash from v0, and backfill merged QEPs - #35

Merged
mmcky merged 2 commits into
mainfrom
ci-stamp-from-v0
Sep 14, 2026
Merged

mmcky merged 2 commits into
mainfrom
ci-stamp-from-v0

Conversation

@mmcky

@mmcky mmcky commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Found while verifying the stamp after #34: QEP-5 merged Accepted with no version and a in the index, as QEP-3 did at #29. QEP-1 v3 (§ Automation, and Adoption item 4) says the post-merge stamp writes version: 0 alongside the hash into any QEP that has left Draft and carries no version, and backfills already-merged QEPs with the most recent commit that touched each. AGENTS.md documents that behaviour too. stamp.mjs never got the change: it still skips an unversioned QEP with // v0 — no version to stamp.

What changes

  • stamp.mjs stamps every non-Draft QEP that has no version: a QEP merged by this push takes this SHA; one already on main takes 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.yml also fires on .github/scripts/** (so this backfill runs when this PR merges) and on workflow_dispatch.
  • A comment in qeps.mjs no longer calls an absent version an implicit v0.

What the merge will do, from a local run of the script on main:

QEP Before After
QEP-3 v0 @ d7b1f24 (#29, its acceptance merge)
QEP-5 v0 @ 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.mjs is unchanged: after the backfill no QEP on main is unversioned, so its "a first version must be 1" rule only ever meets a hand-written version on a new QEP, which AGENTS.md already says to omit.

Assisted-by: Claude Code (Claude Fable 5.1)

🤖 Generated with Claude Code

…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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-hash for any non-Draft QEP lacking version, 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 allow workflow_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.

Comment thread .github/workflows/stamp-version.yml
Comment thread .github/scripts/stamp.mjs Outdated
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
mmcky merged commit b9502ed into main Sep 14, 2026
1 check passed
@mmcky
mmcky deleted the ci-stamp-from-v0 branch September 14, 2026 01:17
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>
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.

2 participants