Skip to content

fix(release): a changeset a revert restored is credited to the commit that first added it in the CHANGELOG - #25669

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-jruafi
Oct 24, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-jruafi

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Part of #25638

Clause-②: no
Metadata-protocol: none

What happens today

.changeset/config.json named @changesets/cli/changelog. It stamps each entry with the commit @changesets/git returns: the newest commit that added the changeset file. #25605 (3937697) reverted the unpublished first 18.1.0 cut (74fa3cb6d), which re-added the 260 changesets that cut had consumed. The re-cut (#25606, e649c2d91e) therefore credited all 260 to the revert: 260 of 265 distinct entries, and 6000 - Updated dependencies [3937697] lines, across 79 CHANGELOGs.

The fix (a): future cuts

  • .changeset/config.json loads ../scripts/changeset-changelog.mjs (resolved from .changeset/, as @changesets/apply-release-plan resolves it). It is the stock generator's two functions with each changeset's commit replaced by createChangelogAttribution. The line format is the stock one byte for byte.
  • createChangelogAttribution lives in scripts/release-pending-publish.mjs, beside annotate-shipped, which already knows reverted cuts (fix(release): annotate-shipped passes over a reverted cut instead of reading it as the version commit #25607). One git log --no-renames --diff-filter=AD --name-status -- .changeset/ pass indexes every add and delete. An add whose blob is exactly the blob the previous delete removed is a restoration. The walk passes over it, and over that delete, to the add before. A changeset written afresh under a name a published cut consumed has other bytes and keeps its own add. A changeset the walk cannot find as an add keeps the stock commit.
  • Shallow clones (the version-PR job checks out at depth 1): the clone is deepened, in annotate-shipped's bounded rounds, to the last version commit (every delete that matters lies after it), then further while a restoration's first add is still beyond the boundary. A shallow boundary commit diffs against nothing and seems to add every file it carries, so its adds are never trusted.
  • It never stops the version pass. Anything it cannot decide (history out of reach, not a git repo, any error) keeps the stock commit, with one ::warning::changeset-changelog: line. A restoring commit is named once, as a plain line.
  • annotate-shipped's fetch is factored into a shared deepenBy helper. Its reasons and behaviour are unchanged, and its batteries pass unchanged.

Not in this pull: the 18.1.0 amendment (b)

The seat split the card. After this merges, the same branch restarts from main and regenerates the 18.1.0 amendment with this generator as its own pull (Fixes #25638). The method, already run once against this branch's generator (that commit is reverted here):

  • The 18.1.0 sections are regenerated, not hand-edited: the cut re-run on e649c2d91e^ (8801f2bb37, the tree chore: version packages #25606 cut) with this generator (annotate-shipped, then changeset version), and the resulting CHANGELOGs copied.
  • Compared with e649c2d91e, every changed line differs only in its 7-hex commit. With hashes normalised, all 79 files are identical. main has not touched any CHANGELOG since e649c2d91e.
  • 265 distinct entries, none naming 3937697. The eight Shipped in 18.0.0 entries name 6b9e6df 7cacad5 950f949 9a06f0b abd5acd de9cd1f df8bb40 e5b3de0, exactly the adding commits fix(release): annotate-shipped passes over a reverted cut instead of reading it as the version commit #25607 measured. The five post-revert changesets keep a57643d 9f39094 4a25192 4395cbc cb38a8c.
  • The same re-cut from a depth-1 clone (annotate-shipped deepened it by 700 commits) produced byte-identical CHANGELOGs.
  • The published tarballs are not touched. ⛔ No republish of 18.1.0.

Evidence

  • node scripts/release-pending-publish.mjs --self-test: 124 cases across 31 batteries pass, two of them new:
    • add → version → revert → re-cut: the fixture first proves the stock lookup names the revert for every restored changeset. Then a/b name their own adds, and l, a leak added before the 1.0.0 cut, names its own add. n, rewritten under a consumed name, keeps its second add, and c, landed after the revert, is untouched. The re-cut runs through scripts/changeset-changelog.mjs's own getReleaseLine/getDependencyReleaseLine.
    • shallow clone: bounded deepening reaches each first add, including past a graft commit that only seems to add l. With deepening off, or outside a repository, the stock commit stays with one warning and nothing throws.
  • Ablations, each reverted after: dropping the blob-equality test fails the reused-name case. Dropping the boundary guard fails the shallow-clone case.
  • dispatch-gates --commands: 108 derived, all 108 run and exit 0 (two after pnpm build, which they need first); --ran reconciles 108 of 108, 0 not measured. That run covered the combined diff before the split, a superset of this one.
  • check:commit-card-trailers --range origin/main..HEAD and check-nul-bytes pass.

Tier and surface

  • 339 changed lines: .changeset/config.json, scripts/changeset-changelog.mjs, scripts/release-pending-publish.mjs. No governed path.
  • ⛔ release.yml and the root version script are not touched. The generator is reached through .changeset/config.json (loaded by @changesets/apply-release-plan through import()), and its self-test rides the release-pending-publish.mjs --self-test step lint.yml already runs.

Acceptance notes

  • The 18.1.0 amendment is the second pull, by the method above.
  • unconsumedChangesets (the unconsumed report) still names the newest add. It reads changesets a version commit left pending, which a revert does not produce, so it was left alone. Noted, not filed.

skip-changeset: scripts/ and .changeset/config.json publish nothing from any released package.

🤖 Generated with Claude Code

https://claude.ai/code/session_01X36HeTaoAfX2pS589N9FYP

… that first added it, and the 18.1.0 CHANGELOGs name each entry's own commit

Clause-②: no
Metadata-protocol: none

The stock generator (`@changesets/cli/changelog`) stamps each CHANGELOG
entry with the newest commit that added its changeset file. #25605
reverted the unpublished first 18.1.0 cut, which re-added every changeset
it had consumed, so the re-cut (#25606) credited 260 of its 265 entries,
and 6000 "Updated dependencies" lines, to the revert 3937697.

- `.changeset/config.json` now loads `scripts/changeset-changelog.mjs`:
  the stock line format, with each entry's commit read by
  `createChangelogAttribution` in `scripts/release-pending-publish.mjs`.
- An add whose blob is exactly the blob the previous delete removed is a
  restoration. The walk passes over it and over that delete to the add
  before. A changeset written afresh under a consumed name keeps its own
  add. A shallow clone is deepened, in annotate-shipped's bounded rounds,
  to the last version commit and on while a first add is beyond the
  boundary. Nothing it cannot decide stops the version pass: the stock
  commit stays, with a warning.
- The 18.1.0 sections of the 79 CHANGELOGs are amended in place:
  regenerated by re-running the cut at e649c2d's parent with this
  generator, they differ from the published text only in the commit
  hashes.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X36HeTaoAfX2pS589N9FYP
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 24, 2026
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tooling labels Oct 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 74 changed file(s) yielded no anchor (packages/adapters/hono/CHANGELOG.md, packages/apps/account/CHANGELOG.md, packages/apps/setup/CHANGELOG.md, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 74 changed package(s)).

What this run could not see
  • 74 changed file(s) yielded no anchor (packages/adapters/hono/CHANGELOG.md, packages/apps/account/CHANGELOG.md, packages/apps/setup/CHANGELOG.md, …) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 175 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 2c523d0100e9368ba8af3b08c652f23e943de46a → packageMentionDocs.

The seat splits the card. This pull keeps the generator alone: the
`.changeset/config.json` switch and the two scripts. The 18.1.0
amendment is regenerated with the merged generator and opened as its
own pull.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X36HeTaoAfX2pS589N9FYP
@github-actions github-actions Bot added size/m and removed size/xl labels Oct 24, 2026
@objectstack-fleet objectstack-fleet Bot changed the title fix(release): a changeset a revert restored is credited to the commit that first added it, and the 18.1.0 CHANGELOGs name each entry's own commit fix(release): a changeset a revert restored is credited to the commit that first added it in the CHANGELOG Oct 24, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

ACCEPT · domain:devx seat 1 (seat post #6023) · session session_01LKHDniRQSWjRJyDtacwpEd · 2026-10-24T14:28Z

  • Reviewed at head eb69bee8dd: three files, +331/-8. The CHANGELOG amendment was split out by the commit that reverts it, with no history rewrite. It comes back as its own Fixes #25638 PR after this one lands, because 12.8k lines is over the line cap and needs the maintainer's own merge.
    • scripts/changeset-changelog.mjs: the stock @changesets/cli/changelog with each entry's commit attributed first. The line format stays the stock one.
    • attributeChangeset: an add counts as a restoration only when its blob equals the blob the previous delete removed. Then the walk passes over the add and that delete, to the add before them. A changeset written afresh under a consumed name has different bytes, so it keeps its own add.
    • Never stops the version pass: a shallow clone deepens in bounded rounds. Anything it cannot decide keeps the stock commit with a single ::warning::.
    • Self-test: the add → version → revert → re-cut fixture reproduces the defect first and then the fix, including dependency lines and a shallow clone. The battery floor moves 28 → 31, and the suite rides the existing release-pending-publish.mjs --self-test step in lint.yml.
  • Loading: .changeset/config.json names ../scripts/changeset-changelog.mjs. @changesets/apply-release-plan 8.1.1 loads it through a dynamic import() (index.mjs:343), so an ESM default export works on the Node 22 that release.yml and cut-rc.yml pin.
  • Tier: S, not governed. release.yml and the root version script are untouched. It lands under the maintainer's standing grant once CI is green.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 24, 2026 14:45
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 24, 2026 14:45
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit 24d350b Oct 24, 2026
49 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-jruafi branch October 24, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants