Skip to content

fix: align Fern-generated SDK version strings with published 4.0.0 - #18

Merged
luke-speechify merged 1 commit into
mainfrom
fix/align-sdk-version-strings
Aug 19, 2026
Merged

fix: align Fern-generated SDK version strings with published 4.0.0#18
luke-speechify merged 1 commit into
mainfrom
fix/align-sdk-version-strings

Conversation

@luke-speechify

Copy link
Copy Markdown
Collaborator

On main, src/version.ts and src/BaseClient.ts report 3.0.2 while npm latest for @speechify/api is 4.0.0.

Why they drifted

The publish job stamps the version literals from the release tag, but it does so in the CI checkout only and never commits the result back:

  • SDK_VERSION in src/version.ts
  • X-Fern-SDK-Version in src/BaseClient.ts
  • User-Agent in src/BaseClient.ts

So the published 4.0.0 artifact was correct — the assertion step verified the stamped values against the tag in both dist/cjs and dist/esm before publishing. What stayed behind on main was whatever Fern last generated, which was 3.0.2.

The three files release-please owns structurally were already correct on main and are untouched here: package.json version, .release-please-manifest.json, and .fern/metadata.json sdkVersion all read 4.0.0.

What this changes

Sets the three stale literals to 4.0.0, nothing else:

File Before After
src/version.ts SDK_VERSION = "3.0.2" SDK_VERSION = "4.0.0"
src/BaseClient.ts "X-Fern-SDK-Version": "3.0.2" "X-Fern-SDK-Version": "4.0.0"
src/BaseClient.ts "User-Agent": "@speechify/api/3.0.2" "User-Agent": "@speechify/api/4.0.0"

"Speechify-Version": options?.version ?? "2026-09-13" is deliberately not touched — that is the API date-version and it moves independently of the SDK version.

No x-release-please-version marker comment was added, and release-please-config.json is unchanged. The marker mechanism is forbidden per AGENTS.md: a Fern regen strips the comment and the generic updater then silently no-ops, which is the original cause of this class of bug.

What happens next

This is a fix:, so release-please will cut 4.0.1. On that release PR the same three literals get bumped again to 4.0.1 — at which point the tree and the published package finally agree, and future releases keep them in step via the stamp plus the pre-publish assertion.

Interim state to expect: between merging this and the 4.0.1 release, main reads 4.0.0 in these files and npm latest is 4.0.0, so they match for the first time. After 4.0.1 publishes, main will again read one version behind until the next regen or alignment — that is the by-design consequence of stamping at publish time and is documented in AGENTS.md.

Verification

  • pnpm install --frozen-lockfile — lockfile up to date
  • pnpm build — passed
  • pnpm test — 29 files, 533 tests, all passing
  • Built output confirmed carrying 4.0.0 in dist/cjs/version.js, dist/esm/version.mjs, dist/cjs/BaseClient.js, dist/esm/BaseClient.mjs
  • package.json repository.url verified as case-exact Speechify-AI (provenance requirement)

The publish job stamps SDK_VERSION, X-Fern-SDK-Version and User-Agent from
the release tag in the CI checkout only, so main kept the 3.0.2 values Fern
last generated while 4.0.0 shipped correctly. Set them to 4.0.0 so the tree
matches the published package.
@luke-speechify
luke-speechify merged commit 3b72093 into main Aug 19, 2026
4 checks passed
luke-speechify added a commit that referenced this pull request Aug 19, 2026
🤖 I have created a release *beep* *boop*
---


##
[4.0.1](4.0.0...4.0.1)
(2026-08-19)


### Bug Fixes

* align Fern-generated SDK version strings with published 4.0.0
([#18](#18))
([3b72093](3b72093))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Luke Oliff <289678208+luke-speechify@users.noreply.github.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.

1 participant