fix(release): ensure all version surfaces stay in sync on changeset release - #70
Merged
Merged
Conversation
systemfsoftware-maker
force-pushed
the
feature/ensure-all-version-surfaces-sync
branch
from
August 26, 2026 20:08
fa8539d to
00f3d02
Compare
…elease Bump flake.nix, root package.json and .claude-plugin/plugin.json to 0.3.0 to match the npm/cargo 0.3.0 release (flake 0.1.5->0.3.0, root 0.1.0->0.3.0, plugin 0.2.0->0.3.0); refresh Cargo.lock. Extend release-version.ts to atomically bump flake.nix (via bumpNixVersion), root package.json and any .claude-plugin/plugin.json (via bumpJsonVersion / bumpPluginManifests) alongside the existing npm/cargo bumps. Extend check-versions.ts to gate flake.nix, root and plugin manifests (plus glob- discovered crates) so any divergence fails the PR gate. Verified: deno check, check-versions ok at 0.3.0 and fails on flake/root/plugin divergence, probe bump to 0.1.9->0.3.0 touches every surface before revert; rebased onto origin/master 0.3.0. Plan: docs/plans/2026-08-26-001-ensure-all-version-surfaces-sync-on-changeset-release.md
systemfsoftware-maker
force-pushed
the
feature/ensure-all-version-surfaces-sync
branch
from
August 26, 2026 20:09
00f3d02 to
5b96d8b
Compare
- Replace JSON.parse/stringify with regex text replacement and arktype
Semver validation (type('string').assert) for all version reads/writes
in release-version.ts and check-versions.ts per architecture rule:
deserialize into arktype, no instanceof.
- Replace instanceof Deno.errors.NotFound / SyntaxError checks with
isNotFound helper using Reflect.get('name') to avoid instanceof.
- Refresh Cargo.lock to 0.3.0 to match bumped manifests.
Fixes F- FAIL: instanceof and not deserializing into arktype
Trash the arktype/Deno.errors/JSON.parse version tools. Shared scripts/lib/version-sync.ts uses Schema.TaggedError + Schema.decodeUnknownEffect for Semver/Bump. release-version.ts and check-versions.ts are Effect.gen programs run with DenoRuntime.runMain provided DenoServices.layer (imported as DenoPlatform). FileSystem reads/writes via Effect FileSystem; version fields are regex-replaced in place — no JSON.parse/stringify, no instanceof. Pinned effect and @effect/platform-deno to 4.0.0-rc.108 to match the npm wrapper. Probe patch bump 0.3.0 → 0.3.1 keeps every surface in lockstep.
Replace the line-scanner that pretended to parse TOML. extractTomlVersion and replaceTomlVersion now parse with @std/toml, locate workspace.package / package via Schema.Record, decode version with Schema.decodeUnknownEffect(Semver), mutate the table, and stringifyToml. Nix/JSON stay text; they are not TOML. Probe 0.3.0 → 0.3.1: cargo test accepts the stringified manifests.
version-sync.ts no longer imports FileSystem. Semver, TomlHeader literals,
PackageTable (Struct { version: Semver }), extract/replace, and nextVersion
are data-in/data-out. Filesystem bump lives in version-files.ts, consumed
only by the CLI interpretation edges.
Fixes I1 (core imported the filesystem) and I5 (untyped header strings;
leaf table now Schema.Struct version: Semver).
JSON goes through Schema.fromJsonString. Cargo.toml is parse/stringify via @std/toml and Schema.Struct workspace.package / package. Changesets are @std/yaml frontmatter decoded as Record<string, Bump>. Nix keeps a single version-binding grammar (exactly one `version = "<semver>"` line). Filesystem stays in version-files.ts. CLIs only runMain + inventory. No JSON.parse, no instanceof, no `as ReleaseBump`.
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.
Summary
Extends
release-version.tsandcheck-versions.tsso every version-bearing surface stays locked onchangesetrelease.Drift repaired (U1):
flake.nix0.1.5→0.1.8package.json(root,private: true)0.1.0→0.1.8Cargo.lockrefreshed viacargo update -w(0.1.7→0.1.8)Pipeline fix (U2):
release-version.tsnow atomically bumpsflake.nix(bumpNixVersion), rootpackage.jsonand any.claude-plugin/plugin.json(bumpJsonVersion/bumpPluginManifests) alongside the existing npm /Cargo.tomlbumps. Missing literal → non-zero; plugin absent →none tracked — skippedlog.Gate (U3):
check-versions.tsnow gatesflake.nix, rootpackage.json, and plugin manifests (plus glob-discoveredcrates/*/Cargo.toml). Divergence on any surface fails with a named message.Verification
cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo test --all-targets— greendeno check scripts/tools/release-version.ts scripts/tools/check-versions.ts— greendeno run --allow-read scripts/tools/check-versions.ts—ok npm=0.1.8 workspace=0.1.8 (plugin manifest: none tracked); divergence probes onflake.nixand root both fail with the expected mismatch message, revert → ok.changeset/probe-sync.md(patch) →deno run --allow-read --allow-write --allow-env scripts/tools/release-version.tsbumped every surface to0.1.9(flake.nix,package.json,Cargo.toml,crates/comment-checker/Cargo.toml,npm/packages/comment-checker/package.json,CHANGELOG.md) andcheck-versionspassed at0.1.9; reverted to0.1.8Plan
docs/plans/2026-08-26-001-ensure-all-version-surfaces-sync-on-changeset-release.mdLifecycle
read '/root/.omp/plugins/cache/plugins/compound-engineering-plugin___compound-engineering___3.21.4/skills/ce-simplify-code'— reviewed diff; no behavior-preserving simplifications warranted beyond the narrowversion = "scoped helpers already appliedread '/root/.omp/plugins/cache/plugins/compound-engineering-plugin___compound-engineering___3.21.4/skills/ce-code-review'— verified R1–R5 and KTD1–KTD6 against the branch diff; no actionable findings