Skip to content

test: format-1.1 cross-SDK fixture + coverage/scopes/digest tests; mem inspect shows 1.1 fields - #15

Merged
Krivoblotsky merged 1 commit into
mainfrom
test/manifest-1.1-coverage
Sep 14, 2026
Merged

Krivoblotsky merged 1 commit into
mainfrom
test/manifest-1.1-coverage

Conversation

@Krivoblotsky

Copy link
Copy Markdown
Contributor

Post-merge hardening of format 1.1 (everything on main was already green: 80/80, CI ✅).

New cross-SDK fixture

Conformance/fixtures/sample-1.1.mem (+ generate_sample_1_1.py): a format-1.1 bundle carrying every manifest field — specURL, coverage, scopes, bundleDigest — and three scoped context records so scopes proves the episode-contextID ∪ context-record union (ctx_root appears only via a context record). Written by Python; the Swift suite validates it (recomputing the Python-written digest), imports it, and re-exports byte-identical streams + CHECKSUMS — the first cross-implementation check of the 1.1 fields on real bytes. sample.mem stays at 1.0 as the backward-compat fixture.

New tests (+9 → 89)

  • test_fixture_1_1.py: validate + declared fields · per-file hashes · import/re-export byte-identity · drift guard (rebuilding the generator's store must reproduce the fixture bytes).
  • test_manifest_v11.py: evidence-pack manifest carries bundleDigest (no coverage/scopes) · incremental scopes = delta episodes ∪ all contexts · forward compatibility — unknown manifest keys from a hypothetical 1.2 bundle are ignored by validator and importer · seeded property test (coverage == min/max eventTime; scopes sorted+unique incl. a non-ASCII id; digest == sha256(CHECKSUMS)).
  • test_cli.py: mem inspect shows the 1.1 fields; mem validate exits 1 on a smuggled CHECKSUMS line via bundleDigest.

CLI

mem inspect now prints spec, coverage, scopes, digest — the 'what does this archive cover and is it whole?' answer at the terminal.

Pairs with the Swift PR (same fixture bytes).

🤖 Generated with Claude Code

…m inspect shows 1.1 fields

- Conformance/fixtures/sample-1.1.mem (+ generate_sample_1_1.py): a format-1.1 bundle with
  every manifest field (specURL, coverage, scopes, bundleDigest) and three scoped contexts;
  both SDKs validate it (recomputing the digest), import it, and re-export byte-identical
  streams + CHECKSUMS. sample.mem stays at 1.0 as the backward-compatibility fixture.
- tests/test_fixture_1_1.py: validates, hash-checks, imports/re-exports, and guards the
  fixture against drift by rebuilding it from the generator.
- tests/test_manifest_v11.py: evidence-pack digest, incremental scopes (delta episodes ∪
  all contexts), forward compatibility with unknown manifest keys, seeded property test
  (coverage == min/max eventTime, scopes sorted+unique incl. a non-ASCII id, digest ==
  sha256(CHECKSUMS)).
- cli: 'mem inspect' prints spec / coverage / scopes / digest; CLI test incl. a tampered
  CHECKSUMS caught via bundleDigest.

89 passed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Krivoblotsky
Krivoblotsky merged commit ce9eb09 into main Sep 14, 2026
9 checks passed
@Krivoblotsky
Krivoblotsky deleted the test/manifest-1.1-coverage branch September 14, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants