feat(frames): dense-grid fill primitive — reindex_fill + cartesian + conformance law (ADR-026) → v1.10.0 - #204
Merged
Conversation
…assert_reindex_fill_law (ADR-026, #203) → v1.10.0 Adds the structural dense-grid fill the faoapi ingestion edge is blocked on (faoapi #242; receipt: dense_grid.py:3 'views-frames has no fill primitive'): - frame.reindex_fill(other, *, fill_value) on all three siblings (WET, ADR-011): align with NO superset requirement — present rows bit-exact, absent rows filled (keyword-only, required; NaN legal); result index IS the target; owns the -1-sentinel scatter once (a hand-rolled values[pos] silently picks the last row for absent cells). - SpatioTemporalIndex.cartesian(times, units, level): time-major dense product index, explicit arrays only (derivation rules stay consumer policy); fails loud on duplicated inputs (C-21). - assert_reindex_fill_law joins the published conformance suite (ADR-016). - Governance: ADR-026 (+ rejected alternatives: reindex mode-kwarg, index-only, decline), 4 CIC updates, register C-71 (grid-scale allocation awareness) + C-21 inheritance note. Additive MINOR per ADR-018; CONFORMANCE_FLOOR stays 1.0.0. 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.
Closes #203.
What
The structural dense-grid fill primitive the faoapi ingestion edge is blocked on (views-platform/views-faoapi#242; receipt: faoapi
dense_grid.py:3— "views-frames has no fill primitive"). Design reviewed via an 8-lens expert review before implementation (verdict: sound, three amendments adopted — keyword-onlyfill_value, duplicate-input validation incartesian, the published law).frame.reindex_fill(other, *, fill_value)on all three sibling frames (WET per ADR-011): align to a target index with no superset requirement — present rows pass through bit-exact, absent rows get the caller's fill (keyword-only + required, ADR-009;NaNlegal). The result's index is the target (shared, immutable). Owns the-1-sentinel scatter once — a consumer hand-rollingvalues[pos]silently picks the last row for absent cells (the silent-corruption class this leaf exists to remove).SpatioTemporalIndex.cartesian(times, units, level): canonical time-major dense product index from explicit arrays only (faoapi's last-step-entity rule + C-87 check stay consumer-side); fails loud on duplicated inputs (a duplicated product input manufactures duplicate rows → undefined joins, C-21).assert_reindex_fill_lawin the published conformance suite (ADR-016): result index == target row-for-row; present rows bit-exact; absent rows == fill (NaN-safe); superset ⇒ degenerates toreindex.Governance
ADR-026 (incl. rejected alternatives:
reindexmode-kwarg [D-09 precedent], index-only, decline, derivation rule [C-52 camel's nose]); 4 CIC updates; ADR index + README banner/chronicle + CHANGELOG[1.10.0]; register: C-71 new (grid-scale allocation awareness, Tier 3), C-21 inheritance note, C-32 staletip_massresidual corrected to 0.25. Additive MINOR under ADR-018;CONFORMANCE_FLOORstays1.0.0.Verification
ruff checkclean;mypy src/strict green on 3.10 and 3.11pytest --cov --cov-fail-under=100: green, 100% line+branch (27 new tests: green/beige/red incl. NaN fill, empty self/target, duplicate targets, level mismatch, and 3 adversarial lying-implementation tests for the law per C-51)validate_docs.shPASSED (banner guardv1.10 ~ 1.10.0 OK)Secondary ask from #203 (confirm
select/reindex/cross_level_aligncover the FAO joins): confirmed — the only genuine structural gap was the fill itself; no other primitive added. faoapi's delegation + pandas removal is verified consumer-side in faoapi #242 (never from this repo).🤖 Generated with Claude Code