Add Level-1 document/part conformance track (B1b-1) - #99
Merged
Conversation
Extends the Level-1 fixture track from the archive (container) layer to the document/part layer: a strict-JSON part loader reads the manifest and content parts out of the in-memory archive, and a mapper assigns the State Machine 5.4.2/5.4.3 load-time dispositions. Covers the draft/review and state-invariant part rows: duplicate keys in any part and non-representable hashed numbers (REJECT in every state); manifest absent/unparseable/malformed-field and off-enum state; major/minor version support; required/optional extension support; and the content part's presence and parseability (a present-but-unparseable content part REJECTs under 5.4.1/4.3.2). The frozen/published INTEGRITY-ERROR ceilings and the document-ID/file-hash recompute are gated on trust material (B2/B3). Reuses existing machinery rather than reinventing it: extracts validateManifestCore from projectManifest (which refuses pending-id drafts), a shared non-representable-number rule, and a shared verdict resolver now backing both the container and document mappers. Adds 22 document fixtures with an independent Python oracle, 10 errors.json codes, and a document capability. Zero runtime dependencies preserved.
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
validateManifestCorefromprojectManifest(which refuses pending-id drafts), a shared non-representable-number rule, and a sharedverdict.tsresolver now backing both the container and document mappers.errors.jsoncodes, and adocumentcapability. Zero runtime dependencies preserved.Test plan
tsc --noEmit+ all 26check:*gates +generate:templategreen locally (CI-parity)check:conformance245/245 (199 vectors + 46 fixtures: 24 container + 22 document)check:document-oracleindependently confirms every injected document defect