Repository navigation
Refuse a release whose core peer floor lacks an API it uses; fix store release tooling (refs #346) - #355
Merged
Conversation
jimhoyd
force-pushed
the
fix/store-peer-floor-346
branch
from
September 21, 2026 00:37
e541d32 to
66b75a4
Compare
…fix release:peers and preparation for the store (refs #346) Co-Authored-By: Claude Sonnet 5 <[email protected]>
…ore contract test and docs (refs #346) Co-Authored-By: Claude Sonnet 5 <[email protected]>
jimhoyd
force-pushed
the
fix/store-peer-floor-346
branch
from
September 21, 2026 00:50
66b75a4 to
ae28159
Compare
This was referenced Sep 21, 2026
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.
Problem and change
Refs #346 (does not close it: the release is the maintainer's). Published store 0.4.2 assumes core changes (#342, #343, and the extension
authoringcontract) that published core 0.4.2 lacks, while its peer range allows core 0.4.2. Nothing in the tooling could notice: unit tests callscaffold()directly andrelease:peersnever drove the core CLI.This PR does not raise the store peer floor in the manifest. It cannot yet:
release:checkrequires the in-repo core version to satisfy every peer range, and the in-repo core is still 0.4.2, so a floor of>=0.4.3failsrelease:checkfor the current set. The floor is raised during release preparation, by the tooling, once core 0.4.3 is in the checkout (how ui/auth/admin floors have risen:release-preparesets>=<version> <nextMinor>for selected peers).Changes:
scripts/peer-api.ts(new): records the first core release for eachScaffoldRequest/ScaffoldResultmember added after 0.4.2 (acknowledgements,acknowledged,routeNotes,provides,requires,after,conflicts) and for the extensionauthoringnames. It scans a package'ssrc/with the TypeScript AST (comments and strings ignored) and compares the uses with the package's core peer floor.release-prepare: when a package is selected without core, its core floor is raised to what it uses if the in-repo core already has it (upper bound kept), and refused with the reason if not. Every selected package's resulting floor is asserted.release.ts preflight(runs in the tag workflow before publish): refuses a package whose floor falls short.test/peer-api.test.ts: a completeness test that fails when a new scaffold contract member has no recorded release, plus the scan, violation and raise logic;release-prepare.test.tscovers the refusal.packages/store/test/core-contract.test.ts: drives the installed core's owninit --with store --ack store:public-write.release:peersruns it against the published core at the floor, so a floor without the flag fails there.--ack store:public-writecommand), so the scaffold cannot detect it without a core change. Documented in the store README andVERSION-ALIGNMENT.mdinstead.Tooling bugs found (first release of a new package)
release:peerscrashed for the store: it unconditionally ranscripts/check-sqlite.mjs, which only auth/admin ship. It now runs it only if the package has it. The store release workflow callsrelease:peers, so the store's first pipeline release would have failed at that step. With the fix,PACKAGE_DIR=packages/store npm run release:peersfails at the floor's build (acknowledgements,providesandExtensionAuthoringContractdo not exist in core 0.4.2), which is the bug.packages/store/CHANGELOG.mddid not exist andrelease-preparereads it unconditionally, sorelease:run --version X(scope all or store) crashed with ENOENT. Added, with a 0.4.2 entry recording the manual publication.tagSha: null), sopackageStateasserts "Published version has no release tag" andnpm run release:run(all scopes, no flags) and--package storeabort. Any other scope works. The fix by the script's own instruction is a tag@jimhoyd/[email protected]at7972185, which needs the maintainer identity. I did not weaken that assertion..changeset/clean-release-packages.mdnames core, ui, auth and admin, sorelease:prepare --package corerefuses ("changeset spans selected and unselected packages"). Core alone cannot be released until that changeset is split or its packages are released together.Release plan (maintainer; nothing here was executed)
All of this ran without
--execute.release:planreports every package published at 0.4.2 withreleaseNeeded: false, tags at0f9cf07for core/ui/auth/admin andtagSha: nullfor the store.release:runwith no flags states: core, ui, auth, adminunchanged, then aborts on the store (bug 3).Recommended path, given bug 4: one coordinated release of all five, which is also the only path that needs no manual floor edit.
@jimhoyd/[email protected]at7972185(bug 3), if you wantrelease:runwithout flags to work.npm run release:run -- --version 0.4.3(dry run; prints the proposal). Files it would change includepackages/store/package.jsonandCHANGELOG.md,package-lock.json, the version markers, and.changeset/pre/coordinated-0.4.3.md. The store's core peer becomes>=0.4.3 <0.5.0here.npm run release:run -- --version 0.4.3 --execute(maintainer): release PR, required checks and merge, exact-SHA CI plus candidate gates, then publishes in order core, ui, auth, admin, store, waits for installability of each, runsverifyPublishedTrain(installs all five, scaffoldsui,auth,adminandstore --ack store:public-writewith the published set), then the starter PR. Thereleaseenvironment approval and npm trusted publisher settings for the store (per the first-publish runbook) are yours.npm i @jimhoyd/urlcode @jimhoyd/urlcode-store,init site --with storerefuses and--ack store:public-writesucceeds.Alternative that matches the issue text (core first, store next): split or drop
clean-release-packages.md, then--package core --version 0.4.3, then--package store --version 0.4.3; with this PR the store step raises its own floor to>=0.4.3, or refuses if core 0.4.3 is not in the checkout. I could not dry-run this path because of bug 4.Caveats: the recorded
0.4.3inscripts/peer-api.tsassumes that number; if core ships as another version, update the table in the release PR (the guard then refuses a floor below it). I did not check whether the candidate train for a release that leaves the store at 0.4.2 would compare against the manually published bytes.Verification
npm ci,npm run verify(lint, typecheck, check, build, tests, workspace verify, audit, workspace integration): passes.npm run docs:llms(no change),npm run check:docs,npm run release:check: pass. Prose docs add no version numbers outside the markers.release:peersfor the store against published core 0.4.2 fails at the build with the missing APIs, as expected until the floor rises.scripts/package-audit.ts, not raised): core 428 files against the 440 cap, store 12 files, 15889 packed bytes. The new CHANGELOG is not packed.docs/FIRST-NPM-PUBLISH.mdis on open PR Document the first npm publish runbook; fix stale store publication claims #348, not main; this PR does not touch the lines that PR edits inVERSION-ALIGNMENT.mdand agrees with its description of the fix.Open decisions
@jimhoyd/[email protected]at7972185, or relax the "published without a tag" assertion for a manually published first version?🤖 Generated with Claude Code