[CTX-0027] fix(registry): distinguish raw manifest digests from canonical H-B - #59
Merged
Merged
Conversation
…ical H-B (#53) Fixes #53 (PLUG-REG-006): Clarify manifest_hash contract as H-A (raw bytes) for Phase 1 Changes: 1. Updated schema.json to explicitly describe manifest_hash as H-A (raw-bytes digest) over fetched bitty-plugin.toml bytes, not H-B (semantic canonical hashing) 2. Added forward compatibility note that future phases will use version tagging to distinguish H-A from H-B (e.g., "sha256-canonical-v1:") 3. Updated README to clarify manifest_hash is SHA-256 over transport bytes (H-A) 4. Updated all official registry entry comments to consistently describe H-A 5. Added tests to verify: - H-A produces different digests for semantically identical but differently formatted manifests (as expected for raw bytes) - Algorithm prefix allows future H-B migration via version tagging - Phase 1 rejects future canonical digest prefixes until implemented This establishes an explicit versioned digest contract as required by the package-lifecycle-rfc.md, allowing safe future migration to H-B without breaking existing H-A entries.
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.
Priority: P2 | Area: package | Labels: fix, P2, area:package | Milestone: v0.1.0 | RFC: OQ-053 | Task: CTX-0027
Closes #53
Summary
Implements #53 (PLUG-REG-006): Clarify manifest_hash contract as H-A (raw bytes) for Phase 1.
The schema.json incorrectly described
manifest_hashas "canonical H-B" but the implementation and README use raw SHA-256 over bytes (H-A). This creates a contract ambiguity where future consumers cannot safely distinguish semantic canonical hashing from transport bytes.Changes
manifest_hashas H-A (raw-bytes digest) over fetchedbitty-plugin.tomlbytes, not H-B (semantic canonical hashing)sha256-canonical-v1:)manifest_hashis SHA-256 over transport bytes (H-A)Testing
just checkpassesThis establishes an explicit versioned digest contract as required by the package-lifecycle-rfc.md, allowing safe future migration to H-B without breaking existing H-A entries.