fix(Nigeria): correct the assets KNOWN OPEN DEFECT note — its edit 1 is inert#656
Merged
Merged
Conversation
…inert The note's diagnosis is right and is kept verbatim: wave 2's asset module is a PER-UNIT roster, `item_seq` is exactly the level the canonical (t,i,j) grain drops, and `first()` destroys N147,297,485 (25.6%) in each quarter. Its PRESCRIPTION was wrong, and is now a tracked file telling the next reader to do something that cannot work. Edit 1 -- `index_info assets -> (t,i,j,item_seq)` -- is INERT FOR NIGERIA. Verified by experiment (PR #629, 2026-07-22): `item_seq` declared in 2012-13's `idxvars` AND `final_index`, wave rebuilt cold, and the frame still returns index ['i','t','j'] with identical rows and Value. The `dfs:` merge in `Wave.grab_data` drops the level BEFORE `final_index` applies -- that is GH #323 SITE 4 (PR #627), not Site 1. Nigeria cannot emit `item_seq` at all today. Worse than inert: making it canonical would leave edit 2 as dead code AND silently disable the GH #498 guard for all 25 assets countries, none of which carry the level either. Edit 2 -- `_ADDITIVE_MEASURE_COLUMNS['assets'] = ('Value',)` -- is correct and is implemented in PR #629. The note now also records the trap found while doing it, because it generalises to any future registration: adding a table to that dict ALSO SILENCES ITS GRAIN AUDIT. Harmless while `food_acquired` was the sole entry (its collapse reconciles every column it carries); `assets` carries `Age`, which no reducer reconciles at (t,i,j), so the naive registration converted a loud 13,447-destroyed-rows-per-round report into silence -- #323 reintroduced by its own fix. "Age wants mean" is SUPERSEDED and marked so: the grain contract's P2 requires every cell to hold an OBSERVED value or NA (a mean is neither), and core's last aggregation was retired at Site 2. Both are 2026-07-13 decisions that postdate the note. Comment-only; `Country('Nigeria').data_scheme` parses unchanged (24 tables). Co-Authored-By: Claude Opus 4.8 (1M context) <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.
A tracked file currently prescribes a fix that provably cannot work. Comment-only correction.
What was wrong
Nigeria/_/data_scheme.yml’sKNOWN OPEN DEFECTnote (merged via #625) prescribes two edits. Its diagnosis is correct and is kept verbatim — wave 2 is a per-unit roster,item_seqis exactly the level the canonical(t,i,j)grain drops, andfirst()destroys ₦147,297,485 (25.6%) in each quarter.Edit 1 —
index_info assets -> (t,i,j,item_seq)— is INERT for Nigeria.Verified by experiment (PR #629, 2026-07-22):
item_seqwas declared in 2012-13’sidxvarsandfinal_index, the wave rebuilt cold, and the frame comes back on index[i,t,j]regardless — identical rows, identical Value. Thedfs:merge inWave.grab_datadrops the level beforefinal_indexapplies. That is GH #323 Site 4 (PR #627), not Site 1. Nigeria cannot emititem_seqat all today.And it is worse than inert: making it canonical would leave edit 2 as dead code and silently disable the GH #498 guard for all 25 assets countries, none of which carry the level either.
What is right
Edit 2 —
_ADDITIVE_MEASURE_COLUMNS[assets] = (Value,)— is correct, and is implemented in #629.The note now also records a trap found while implementing it, because it generalises to any future registration:
Harmless while
food_acquiredwas the sole entry — its collapse reconciles every column it carries. ButassetscarriesAge, which no reducer reconciles at(t,i,j), so the naive registration turned a loud 13,447-destroyed-rows-per-round report into silence — #323 reintroduced by its own fix. #629 re-audits on the unreconciled columns instead.“Age wants mean” is superseded and marked so: the grain contract’s P2 requires every cell to hold an observed value or NA, and a mean is neither; and core’s last aggregation was retired at Site 2. Both are 2026-07-13 decisions postdating the note.
Scope
Comment-only.
Country("Nigeria").data_schemeparses unchanged (24 tables). Noteyaml.safe_loadcannot read this file at all — it carries!maketags — so validate with the library loader, not plain YAML.Refs #323, #498, #625, #627, #629.