Repository navigation
Enforce the stable release publication contract - #202
Merged
Pepps233 merged 2 commits intoSep 13, 2026
Merged
Conversation
- Validate announced and stored records against the Worker contract before trusting release identity - Share publisher and consumer fixtures for stable versions and canonical package responses
Pepps233
commented
Sep 10, 2026
Contributor
Author
There was a problem hiding this comment.
large diff due to this test file.
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
Make release publication enforce the stored-record contract and add matching fixtures for the future Diffex latest-version consumer.
Companion cloud PR: https://github.com/diffexai/diffex-cloud/pull/144.
Reasoning
The real publisher command previously accepted
--source-commit not-a-commitand wrote release records in the controlled reproduction.It now rejects malformed release identities before writing and validates existing records before trusting their versions or reusing immutable records.
The public contract means verified npm availability, without claiming that GitHub binary assets are already public.
Changes
This deliberately tightens acceptance of malformed stored records; it adds no dependency or schema migration.
The production checker still uses its existing endpoint and parsing until the separately planned consumer migration connects the new validator.
Existing update-note behavior is preserved.
Testing
node --test --test-name-pattern='noncanonical source commit' scripts/publish-release-announcement.test.mjsfailed because the publisher exited successfully.node --test scripts/release-contract.test.mjs scripts/publish-release-announcement.test.mjs: 130 tests passed, including actual publisher output and rejection of every invalid stored-record fixture.packages/coding-agent,node ../../node_modules/vitest/dist/cli.js --run test/release-contract.test.ts: 23 tests passed.npm run checkand./test.sh: passed.The controlled publisher uses mocked npm and intercepted storage, with temporary-fixture cleanup.
There is no deployed R2-to-HTTP-to-CLI E2E path in this contract change, and no real release or remote storage write was performed.