feat(wire): S4/#109 — §5 GAUL sidecar builder + delivery/parity invariant#119
Merged
Conversation
build_sidecar: pyarrow-only, lookup injected (DIP — production passes the ADR-011 gaul_lookup table, tests inject synthetic); restricted to the declared forecast gid set with absent-gid fail-loud (§5.2 direction); 10-column pinned schema with priogrid_id as a real first column, *_code always float64 with missing codes as NaN VALUES (matching canonical bytes), dictionary strings flattened, rows ascending. Column lists come from gaul_schema (SSOT), never restated. delivery/parity.py: assert_gid_set_parity names the symmetric difference; separate file from coverage.py (different closure: wire contract vs region product). Byte parity proven against the fixture sidecar via a synthetic lookup shaped like the REAL one (int64-with-null codes, dictionary strings) — proving the casts, not echoing the output. Part of epic #105. Closes #109. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Story S4 of epic #105.
What
unfao/wire/sidecar.py—build_sidecar(lookup, gids)/write_sidecar(...) -> (name, sha256): pyarrow-only; lookup injected (DIP); restricted to the declared gid set, absent gid fails loud (§5.2 — geography never silently vanishes); 10 columns withpriogrid_idfirst;*_codealways float64, missing codes as NaN values (canonical-byte match); dictionary strings flattened; ascending rows. Column SSOT:gaul_schema.delivery/parity.py—assert_gid_set_parity(§5.2), pandas-free, names missing/extra gids; lands under the existing delivery/ design-contract enforcement automatically.AC (all met)
gaul_lookup.parquetproperty tests: pinned schema, float64 codes, plain strings, subset+ascending.Closes #109. Epic #105 · Tracking #114.
🤖 Generated with Claude Code