Skip to content

chore: enter changesets pre-mode (tag: beta) — recover from accidental 8.0.0 GA publish - #1933

Merged
bokelley merged 1 commit into
mainfrom
bokelley/enter-changesets-pre-beta
May 22, 2026
Merged

bokelley merged 1 commit into
mainfrom
bokelley/enter-changesets-pre-beta

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Recovery for the accidental `8.0.0` GA publish. Enters changesets pre-mode on `main` so every subsequent release accumulates as a `@beta` prerelease instead of going out as a GA.

Background

`8.0.0` shipped to npm as a regular GA release via release PR #1930, driven by a single `major` changeset on PR #1932 (catalog-sync → wholesale-feed-sync rename). The 8.0-beta foundation work (#1902 — full `3.1.0-beta.2` pin flip) was never merged; the 8.0.0 that exists is just the rename plus a few minor/patch items, not the full 3.1 adoption sweep.

What this PR does

  • Adds `.changeset/pre.json` (mode: `pre`, tag: `beta`).
  • After merge, every changeset on `main` accumulates into a prerelease:
    • `patch` → `8.0.1-beta.N`
    • `minor` → `8.1.0-beta.N`
    • `major` → `9.0.0-beta.N`
  • Releases publish under the `@beta` npm dist-tag automatically.

Required npm-side moves (run from a publish-credentialed shell)

```bash
npm dist-tag add @adcp/[email protected] latest
npm dist-tag add @adcp/[email protected] beta
npm deprecate @adcp/[email protected] "Released as GA prematurely; treat as 8.0.0-beta. The 8.x line iterates as 8.0.1-beta.N under @beta dist-tag before re-promoting to @latest. For stable, pin to 7.11.0."
```

After those run:

  • `npm install @adcp/sdk` → 7.11.0 (stable)
  • `npm install @adcp/sdk@beta` → 8.0.0 today, 8.0.1-beta.N after the first post-merge release

Exit criteria

When the 3.1.0-beta.x adoption work is complete and dogfooded, run on `main`:

```bash
npx changeset pre exit

commit + push the resulting .changeset/pre.json removal

merge the auto-generated Release PR → ships as 8.0.x or 8.1.0 (depending on accumulated changeset types)

move @latest dist-tag forward: npm dist-tag add @adcp/sdk@ latest

```

Coordinates with the existing 8.0-beta foundation work

`bokelley/cut-8-0-beta` (PR #1902) was scoped to the `3.1.0-beta.2` pin flip + 5 structural-break follow-ups (all already merged into that branch). After this pre-mode PR lands, that branch should be rebased on the new main. The foundation's `major` changeset means the first release after foundation-merge will be `9.0.0-beta.0` (semver-wise) — or you can demote the changeset to `minor` if you want to stay on the 8.x line.

Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]

8.0.0 shipped as a GA major release prematurely (single-PR rename of
catalog-sync → wholesale-feed-sync). To avoid further accidental GA
publishes while the 3.1.0-beta.x adoption work iterates, enter pre-mode
with tag 'beta'. Subsequent merges to main accumulate as 8.0.1-beta.N
(or 8.1.0-beta.N for minor, 9.0.0-beta.N for major) under the @beta
npm dist-tag.

The npm @latest dist-tag is moved back to 7.11.0 via:
  npm dist-tag add @adcp/[email protected] latest
  npm dist-tag add @adcp/[email protected] beta
  npm deprecate @adcp/[email protected] "Released as GA prematurely; treat as 8.0.0-beta. ..."

To exit pre-mode and re-promote, run:
  npx changeset pre exit
  # merge resulting Release PR

@aao-ipr-bot aao-ipr-bot Bot 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.

LGTM. Right mechanism for the right problem — pre-mode plus a dist-tag move beats trying to unpublish or hand-roll the version math.

Things I checked

  • .changeset/pre.json shape: mode: "pre", tag: "beta", empty changesets: []. Correct format.
  • initialVersions matches current workspace state: @adcp/sdk 8.0.0 (package.json:3), @adcp/client 6.0.0 (packages/client-shim/package.json:3), @adcp/eslint-plugin 0.1.2 (packages/eslint-plugin/package.json:3). All three present, including the private: true/ignored shim — that's the right call, pre exit needs every workspace recorded to compute bumps.
  • The accompanying enter-pre-mode-beta.md is a patch on @adcp/sdk, so the first post-merge Release PR computes to 8.0.1-beta.0 under @beta. Matches the body's stated math.
  • Lineage: 91cb6fb shipped 8.0.0 via #1930 (the bad GA), this branch enters pre-mode immediately after. Recovery window is one commit, no other releases in between to untangle.
  • No source code, no library API surface, no protocol code, no transport code. Changesets infrastructure only.

Follow-ups (non-blocking — file as issues if not done out-of-band)

  • The three npm dist-tag / npm deprecate commands in the PR body are manual and require publish credentials. Confirm they actually run after merge — pre-mode without the dist-tag move leaves @latest pointing at the bad 8.0.0, which is the failure mode this PR is trying to fix.
  • After merge, rebase bokelley/cut-8-0-beta (#1902) on the new main. The PR body flags this; worth a calendar entry so the foundation work doesn't sit and rot while 8.0.1-beta.N accumulates patches around it.
  • Worth a one-paragraph postmortem note somewhere durable (CLAUDE.md release section, or a docs/development/ file) on what let a major changeset ship as GA when the foundation work hadn't landed — the changeset machinery did exactly what it was asked, so the gap is upstream of changesets. Notable that the very release process documented in CLAUDE.md as "let changesets handle it" is what shipped this; the answer probably isn't "less automation."

Safe to merge. Run the dist-tag commands the moment this lands.

@bokelley
bokelley merged commit 54afaaf into main May 22, 2026
11 checks passed
@bokelley
bokelley deleted the bokelley/enter-changesets-pre-beta branch May 22, 2026 14:20
bokelley added a commit that referenced this pull request May 22, 2026
…al sweep)

Foundation rebased onto main. Picks up:
- Pre-mode entry (#1933) so foundation publishes under @beta
- Codegen TS7056 fix (#1924)
- Wholesale-feed-sync rename (#1932, replaces catalog-sync from earlier branch)
- 3.1.0-beta.3 schema bundle (was beta.2 on the foundation branch)

Resolutions:
- .changeset/pre.json: took main's (initialVersions=8.0.0)
- src/lib/version.ts: regenerated via sync-version --force
- src/lib/types/schemas.generated.ts: regenerated
- ADCP_VERSION: bumped 3.1.0-beta.2 → 3.1.0-beta.3

Demoted foundation changeset major → minor so the foundation merge
publishes as 8.1.0-beta.0 (stays on 8.x line). The 9.0 major bump can
come when v1 deprecation calendar tightens, not from this cut.

Beta.3 spec changes folded in (partial):
- RETENTION_EXPIRED removed from ErrorCodeValues; STALE_RESPONSE added.
  Updated DEFAULT_CODE_POLICY accordingly.
- Envelope `status` REQUIRED on all responses — added 'failed' to two
  synthetic-error envelopes in response-unwrapper.ts.
- ControllerError / SeedSuccess / wrapped store returns updated to
  carry envelope `status` (introduced wrapStoreSuccess helper in
  src/lib/server/test-controller.ts).
- Type guards in src/lib/testing/test-controller.ts widened to handle
  the new union shape with envelope intersection.

KNOWN ISSUE: ~45 more compile errors remain across decisioning/
adapter/middleware code from the envelope-status-required change. Each
is mechanical (add `status: 'completed'` to a success-shape return) but
the sweep is wider than this single merge commit. Pushed for visibility;
follow-up PRs will sweep the remainder.
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