Repository navigation
Freeze the surfacepin-jcs-v2 format; release 1.6.1 - #7
Merged
Merged
Conversation
added 5 commits
October 20, 2026 12:32
SPEC.md now opens with the freeze: jcs-v2 in lockfile v3 is exactly what SurfacePin 1.6.0 writes and will not change; any future need ships as a new, separately named profile; existing jcs-v1 and jcs-v2 lockfiles stay verifiable; unknown profiles are rejected. The spec also states the string rules exactly, both existing differences from RFC 8785 (repeated member names keep the last value; unpaired surrogates hash as U+FFFD), the 1.4 change in what jcs-v1 hashes, that the instructions source is transport, and that new lockfile sections arrive only with a new profile. Internal shorthand is replaced with plain wording. README links to the promise and says Node 22+, matching engines.
testdata/golden/jcs-v2 holds the byte-exact canonical bytes, lockfiles and SHA-256 hashes SurfacePin 1.6.0 writes for two representative surfaces, plus ten value-level encoding vectors. The test pins the roots, lockfile hashes, input hashes and the hash of golden.json itself, so regenerating fixtures cannot hide a change. testdata/basic.v2.lock.json is a real lockfile v2 written by the published surfacepin@1.2.0. A new test pins its root and those of the other jcs-v1 fixtures and verifies each through the library and the CLI.
…nknown canonicalization A lockfile with version "3" (a string) now reports got "3" instead of got 3, and an unknown profile such as "surfacepin-jcs-v2 " (trailing space) is shown quoted. Canonical JSON errors name both profiles that share the encoder. Exit codes and pass/fail are unchanged.
SPEC.md and README.md ship in the npm package, so the package content changes. Behavior, lockfile format and digests do not.
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.
Freezes the lockfile format at canonicalization
surfacepin-jcs-v2in lockfile v3 and prepares release 1.6.1. No change to behavior, the lockfile format or any digest.testdata/golden/jcs-v2/holds the byte-exact output of SurfacePin 1.6.0 for two surfaces, plus 10 value vectors. Roots, lockfile hashes, input hashes and the hash of golden.json are pinned in the test.21e88a5125e9d687ef27d1fbe4e3259c20a0fd6b0b8a0300d5cc3d5fbb371317). The other jcs-v1 fixture roots are pinned too.Local checks on the head
eafea07:Please merge with rebase or a merge commit, not squash, so the five commits stay.