feat(cli): surface migration guide when specVersion trails the installed platform#2914
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…the platform os validate, os build/compile, and os doctor now emit a non-blocking advisory when an app's authored manifest.specVersion declares an older major than the @objectstack/spec installed in its node_modules, linking the curated per-major migration guide at https://docs.objectstack.ai/docs/releases/v<major>. Downstream apps upgrading the platform previously had no on-disk pointer to the release notes — they had to reverse-engineer breaking changes from per-package CHANGELOG.md files. This surfaces the guide at the moment the upgrade is exercised. Every major from v12 on is guaranteed a releases page by scripts/check-release-notes.mjs, so the URL never 404s. - New shared util checkSpecVersionGap() (installed version injectable for tests). - Advisory is never gated by --strict and also appears in --json as specVersionGap. - Unit-tested (8 cases) and smoke-verified end-to-end against a real app whose installed spec (14.7.0) leads its declared specVersion (^12). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YV2dfQ9eR8NYKLSTVLKavY
os-zhuang
force-pushed
the
feat/cli-spec-version-advisory
branch
from
July 14, 2026 13:44
deca531 to
a43312b
Compare
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 17 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 14, 2026 13:45
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
When a downstream/third-party app upgrades the ObjectStack platform, the curated per-major migration guide is effectively undiscoverable from the app's side. An agent (or human) doing the upgrade naturally reaches for the on-disk
node_modules/@objectstack/*/CHANGELOG.mdfiles and reverse-engineers the breaking changes from them — never findingdocs.objectstack.ai/docs/releases/v<major>, which has the before/after examples and migration checklist. Nothing on disk points there.Change
os validate,os build/os compile, andos doctornow emit a non-blocking advisory when an app's authoredmanifest.specVersiondeclares an older major than the@objectstack/specactually installed in itsnode_modules— i.e. the platform moved ahead of what the app declares. The advisory links the curated guide for the installed major:Every major from v12 on is guaranteed a
content/docs/releases/v<major>.mdxpage byscripts/check-release-notes.mjs, so the URL never 404s. Once the app bumps itsspecVersionto match the platform, the advisory goes silent.Details
packages/cli/src/utils/spec-version.ts→checkSpecVersionGap(manifest, installedVersion?). Resolves the installed spec from the app on disk via@objectstack/spec/package.json(allowed by itsexportsmap), with the version injectable for tests.validate.ts,compile.ts(whichbuildextends), anddoctor.ts, following each command's existing warning/health-check idiom.--strict. Also surfaced in--jsonoutput asspecVersionGap.declared < installed). Adeclared > installedmismatch is a stale/mismatched install — a different problem, left out.Testing
packages/cli/src/utils/spec-version.test.ts— 8 cases (older/matching/newer declared major, two-major jump points at the installed major, missing/ non-string specVersion, unresolvable install). All pass.tscerror signatures (pre-existing errors in this partial build are unbuilt sibling packages + pre-existing implicit-anyinvalidate.ts/compile.tsthat this PR does not touch); the new file is clean.@objectstack/spec@14.7.0installed — a manifest declaring^12fires with the correct/docs/releases/v14URL;^14and a manifest-less config stay silent.Notes
@objectstack/cliis in thefixedchangeset group, so the includedminorchangeset versions it in lockstep with the rest of the platform train, as usual.🤖 Generated with Claude Code
https://claude.ai/code/session_01YV2dfQ9eR8NYKLSTVLKavY
Generated by Claude Code