Skip to content

test(release): derive suite simulation version - #313

Draft
davida-ps wants to merge 1 commit into
davida-ps/catalog-installability-projection-v1from
davida-ps/release-simulation-version-fixture-v1
Draft

test(release): derive suite simulation version#313
davida-ps wants to merge 1 commit into
davida-ps/catalog-installability-projection-v1from
davida-ps/release-simulation-version-fixture-v1

Conversation

@davida-ps

@davida-ps davida-ps commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

User description

Summary

  • derive the Suite tag-release simulation input from the current skill.json version
  • require a canonical final major.minor.patch version before simulating a stable patch release
  • compute the expected next patch with a test-local regex and BigInt, independent of production increment logic

Why

The shared release simulation hard-coded clawsec-suite as 0.1.16 -> 0.1.17. Any legitimate Suite version bump made the shared test fail even though the production simulator correctly derived the next patch. This keeps the test meaningful without requiring version-specific churn in every changed-skill PR.

Scope

This changes one shared test file only. It does not change a skill, release workflow, simulator, SemVer helper, tag, publication, or catalog.

Remote validation

  • fresh detached checkout at ffe6281d809d980521a5375b7bf16777838cbe40
  • transferred file SHA-256: e84d35ea1400b516e693b5e45bb4eaae588eb4a4a2a54beda5cada4027d16cb8
  • node scripts/test-skill-release-semver.mjs
  • node scripts/test-skill-tag-release-simulation.mjs
  • every scripts/test-skill-*.mjs regression, using a narrowly scoped test-only zip -qr <archive> . wrapper because the remote host has 7z but no zip
  • npx eslint scripts/test-skill-tag-release-simulation.mjs --max-warnings 0
  • combined proof with the dependent Suite 0.1.17 candidate: all shared skill-release regressions passed and the simulator advanced it to 0.1.18

Generated description

Below is a concise technical summary of the changes proposed in this PR:
Derive the shared Suite tag-release simulation input from skill.json so the release simulator validates the current stable version instead of a hard-coded patch. Add a test-local final-SemVer check and compute the next patch with regex plus BigInt before running runSimulation.

Latest Contributors(2)
UserCommitDate
David.a@prompt.securitytest(release): derive ...July 22, 2026
david.a@prompt.securityfix(release): publish ...July 14, 2026
Review this PR on Baz | Customize your next review

Comment on lines +38 to +41
return {
expectedOriginal: version,
expectedSimulated: `${match[1]}.${match[2]}.${BigInt(match[3]) + 1n}`,
};

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.

BigInt expectedSimulated diverges from simulator

stablePatchFixture() computes expectedSimulated with BigInt(match[3]) + 1n, but nextSimulatedReleaseVersion() turns match[3] into a Number, so large valid patch values can round and make simulated_version disagree with the test expectation. parseSemver() accepts arbitrarily long core digit sequences, so should we keep the patch increment in BigInt or avoid Number(match[3])?

Severity

Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents
Before applying, verify this suggestion against the current code. In
`scripts/test-skill-tag-release-simulation.mjs` around lines 38-41, in
`stablePatchFixture()`, `expectedSimulated` is computed with `BigInt(match[3]) + 1n`,
which will not match the simulator when it increments the patch via `Number(match[3])`
(precision loss for large digit sequences). Fix this by updating the simulator logic
`nextSimulatedReleaseVersion()` (and any related semver parsing used there) to compute
the patch bump using `BigInt` rather than `Number`, then convert back to a string in the
same `${major}.${minor}.${patch}` format. After refactoring, rerun the simulation tests
to confirm the expected and simulated versions match for large semver patch values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant