Skip to content

fix(Nigeria): correct the assets KNOWN OPEN DEFECT note — its edit 1 is inert#656

Merged
ligon merged 1 commit into
developmentfrom
fix/nigeria-assets-note-correction
Jul 22, 2026
Merged

fix(Nigeria): correct the assets KNOWN OPEN DEFECT note — its edit 1 is inert#656
ligon merged 1 commit into
developmentfrom
fix/nigeria-assets-note-correction

Conversation

@ligon

@ligon ligon commented Jul 22, 2026

Copy link
Copy Markdown
Owner

A tracked file currently prescribes a fix that provably cannot work. Comment-only correction.

What was wrong

Nigeria/_/data_scheme.yml’s KNOWN OPEN DEFECT note (merged via #625) prescribes two edits. Its diagnosis is correct and is kept verbatim — wave 2 is a per-unit roster, item_seq is exactly the level the canonical (t,i,j) grain drops, and first() 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_seq was declared in 2012-13’s idxvars and final_index, the wave rebuilt cold, and the frame comes back on index [i,t,j] regardless — identical rows, identical 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.

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:

Adding a table to _ADDITIVE_MEASURE_COLUMNS also silences its grain audit wholesale.

Harmless while food_acquired was the sole entry — its collapse reconciles every column it carries. But assets carries Age, 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_scheme parses unchanged (24 tables). Note yaml.safe_load cannot read this file at all — it carries !make tags — so validate with the library loader, not plain YAML.

Refs #323, #498, #625, #627, #629.

…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>
@ligon
ligon merged commit b8b772f into development Jul 22, 2026
10 checks passed
@ligon
ligon deleted the fix/nigeria-assets-note-correction branch July 22, 2026 04:54
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.

1 participant