GT schema v2: four-axis inventory, deterministic generators, supply-chain manifest - #4
Conversation
…pply-chain manifest - types.py: add SourceIntegrity, FormatValidity, GroundTruthEvidence dataclasses with bidirectional claim==evidence coverage validation - inventory.py: parse schema v1/v2, enforce truth-axis gates on verified records - generators/_deterministic.py: fixed-timestamp ZipInfo + GzipFile helpers - certificates.py: committed test key + fixed serial/validity (byte-reproducible) - archives/documents/data_formats: replace writestr/gzip with deterministic helpers - images.py: fix jxl KeyError (import pillow_jxl for codec registration) - tests/truth/source_manifest.json: per-fixture provenance manifest - docs/reference/fixture-sources.md: human-readable source document - tests/conformance/test_inventory_v2.py: 9 unit tests for four-axis gate Verified state: 11 authoritative records pass all three truth axes; 587 candidates excluded with documented reasons; require-complete PASS.
…ontainer detection - exact: direct or canonical-alias intersection with GT - alias: documented true aliases (debian, pkix-cert, markdown) - container: parent wrapper identified (reported, not counted as overall_match) - audio/3gpp vs video/3gpp are NOT aliased (IANA separate types) - new match_level field for diagnostic reporting - 7 new unit tests + 5 existing collector tests updated
…t/der, fix probe invariant - sample-pcap: remove .pcapng from GT extensions (separate format, different magic) - sample-parquet: remove .pqt (no verifiable authority for this extension) - sample-crt/der: excluded (RFC 2585 only registers .cer/application/pkix-cert) - inventory.py: add invariant probe_extension ∈ ground_truth.extensions for verified records - test_inventory.py: fix test data to satisfy new invariant - test_seeded_inventory.py: update counts to 9/589
- MIME_ALIASES: remove application/x-x509-ca-cert (it's a sub-class-of, not a true alias per shared-mime-info) - Add SUBCLASS_OF: directional child→parent hierarchy - x-x509-ca-cert → pkix-cert detected as child = subtype (PASS) - pkix-cert → x-x509-ca-cert detected as parent = container (NOT overall_match) - match_level now distinguishes: exact / alias / subtype / container / miss
- sample-cer: regenerated with fixed test key - sample-zip: regenerated with fixed ZipInfo timestamp - sample-gz: regenerated with GzipFile mtime=0 - sample-pcap: regenerated with PcapWriter + fixed epoch - inventory/candidates sha256 updated for all four
…gate - source_manifest.json: sha256s synced with regenerated fixtures - sample-avif: tier corrected from exact-byte to pinned-sha-roundtrip - .audit/exact_byte_gate.py: asserts Tier1 generator output == committed fixture, manifest/inventory sha256 consistency; exits non-zero on any mismatch
- 108 observations from ubuntu/macos/windows × 4 backends - inventory_sha256 verified against tracked schema v2 inventory - report-only mode: no strict comparison yet; enables drift detection going forward
- supertype: detected parent whose children include GT entry (partial, NOT overall) - container: physical wrapper containment (zip→apk etc), separate level - x509 reverse direction now correctly reports 'supertype' not 'container'
…flow - determinism-gate job: runs exact_byte_gate.py + nondet_scan_slow.py before collect - FAIL conditions: generator errors, Tier1 byte mismatch, non-Tier2 nondeterminism - runs before the expensive 3-OS matrix so failures surface early
- render per-backend accuracy sliced by content_identifiability tier - tiers: distinctive, ambiguous, generic-container, not_applicable - shows where backends struggle with generic containers vs distinctive formats - restore _render_reproduction call and Baseline section that were accidentally removed
…odule - scripts/conformance/determinism_scan.py: slow scan with error collection and Tier2 allowlist enforcement; exits non-zero on errors or unexpected diffs - workflow: exact-byte pytest + slow determinism scan in determinism-gate job
sqlite3 module embeds nondeterministic metadata (change counter, version-valid-for) making byte-exact reproduction impossible. These records use independent parser validation (PRAGMA integrity_check) instead.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Summary
InventoryRecordgains three truth axes (source_integrity,format_validity,ground_truth_evidence) plus a quality axis (content_identifiability). Verified records require all three truth axes.write_zip_str/gzip_compress_dethelpers. jxl KeyError fixed by importingpillow_jxlcodec.tests/truth/source_manifest.json(machine) +docs/reference/fixture-sources.md(human-readable).--require-completepasses.Verified state
Key GT corrections
.dblacks registered MIME mapping to vnd.sqlite3Supply-chain manifest
Remaining work (follow-up PRs)