Skip to content
This repository was archived by the owner on Aug 8, 2026. It is now read-only.

docs: close out the coverage handoff, and measure the lumber split rather than assume it - #28

Merged
mspinola merged 1 commit into
mainfrom
claude/close-coverage-handoff
Aug 2, 2026
Merged

mspinola merged 1 commit into
mainfrom
claude/close-coverage-handoff

Conversation

@mspinola

@mspinola mspinola commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Closes out docs/handoffs/2026-08-02-coverage-reporting.md. The body is preserved verbatim; only the Status: line is replaced, per the append-only rule.

1. The status line was missing a correction

It read complete (PR #15), corrected same day (PR #17). There was a third, PR #19 (7ff5d06), and it is the only one of the three that changed what the module says about itself: the docstring table still claimed 058643 "dies at the price join", when drops_at returns extremity_z and price is 37 of 880 rather than 0.

It also settled a contradiction a reader would otherwise hit head-on. §B18 says the two lumber codes "fail at the SAME rung" — true of the terminal rung, false of drops_at, which is two rungs earlier for 058643.

2. §B30: the rename trap has a mirror image

coverage keys on market_code, which kills the four phantoms (one code, several names). It does not handle the opposite shape, and nothing had checked:

shape handled by
phantom one code, several names coverage, by keying on the code
split one instrument, several codes continuity, merge_migrated_codes, not coverage

§B26 and §B27 established after this handoff closed that the two unscoreable markets are the two halves of one migrated contract: 058643 and 058644 overlap in 7 weeks of 1051 and both carry contract symbol LBR. Nobody re-ran the coverage report afterwards.

So is "2 of 27 score nothing" real, or an artifact of the split? The suggestive number says artifact: separately the codes hold 37 and 178 priced weeks, but merged they hold 208 contiguous priced weeks, twice the 104-week extremity window.

Measured end to end, it is real:

rung 058643 058644 merged
price 37 178 208
extremity_z 0 75 96
illiquidity 0 75 92
crowding 0 0 0
damage_sell non-null 0 0 0

Every rung rises substantially and the verdict does not move. C = pct(z) stacks a second three-year window on the 96 z values and 96 does not fill it. Lumber is unscoreable because it has four years of prices against a measure needing six, not because its code changed. The headline moves from "2 of 27" to "1 of 26" purely by counting one instrument once.

Recorded because the wrong answer survives one round of checking: merging only the per-category half also returns crowding=0, for the unrelated reason that build() still reads the unmerged store and every per-market rung reports 058644 alone. Two routes to the same number, one of them meaningless.

This also vindicates §B18 on the point it was least sure of: coverage and the PCA disagreeing about lumber "is correct rather than a contradiction". That was an argument; this is the measurement behind it.

No code change follows. Teaching coverage to merge migrated codes would change the report's row count and no conclusion in it, and this handoff's own Scope puts "changing any window, minimum or threshold" out of bounds. It is a build item for whoever wants it, now backed by a measurement of what it would and would not buy.

3. Fixed a breakage I caused

Merging cotdata#93 deleted the function reproduce.py's flow_equivalence block calls, so §B29's figures had a reproducer that raised AttributeError. Found by running the full reproducer rather than only the new block.

It now detects the removal and prints the figures as historical with the reason, matching what test_flow_equivalence.py already does. A reproducer that crashes once the change it recommended lands reads as a broken measurement rather than a completed one.

Both flagged decisions stand

The two decisions the handoff refused to default are unchanged four PRs later: a zero-scoring market still stays in the panel, and LADDER is still a hand-written list guarded by test_the_ladder_covers_every_column_the_composite_consumes. That guard has earned its place since: §B18 found the ladder skipping three rungs, and the test now checks the columns add_composite computes, not only those it emits.

Checks

  • 433 tests pass, ruff clean
  • Prior reproducer output byte-identical; the new lumber_is_one_instrument block is additive
  • Handoff body preserved verbatim, only Status: replaced
  • No em dashes in added prose; every quoted figure has a reproducer

🤖 Generated with Claude Code

…ther than assume it

STATUS LINE WAS MISSING A CORRECTION. It read "complete (PR #15), corrected
same day (PR #17)". There was a third, PR #19 (7ff5d06), and it is the only one
of the three that changed what the module says about ITSELF: the docstring table
still claimed 058643 "dies at the price join" when drops_at returns extremity_z
and price is 37 of 880 rather than 0. It also settled a contradiction a reader
would hit head-on, since B18's "both fail at the SAME rung" is true of the
terminal rung and false of drops_at, which is two rungs earlier for 058643.

B30: THE RENAME TRAP HAS A MIRROR IMAGE. coverage keys on market_code, which
kills the four phantoms (one code, several names). It does not handle one
INSTRUMENT carrying several codes, and B26/B27 established after this handoff
closed that the two unscoreable markets are the two halves of one migrated
contract: 058643 and 058644 overlap in 7 weeks of 1051 and both carry symbol
LBR. Nobody re-ran coverage afterwards.

So: is "2 of 27 score nothing" real, or an artifact of the split? The suggestive
number says artifact. Separately the codes hold 37 and 178 priced weeks; merged
they hold 208 CONTIGUOUS priced weeks, twice the 104-week extremity window.

Measured end to end, it is real:

  rung           058643   058644   merged
  price              37      178      208
  extremity_z         0       75       96
  illiquidity         0       75       92
  crowding            0        0        0
  damage_sell         0        0        0

Every rung rises substantially and the verdict does not move. C = pct(z) stacks
a second three-year window on the 96 and 96 does not fill it. Lumber is
unscoreable because it has four years of prices against a measure needing six,
not because its code changed. The headline moves from "2 of 27" to "1 of 26"
purely by counting one instrument once.

Worth recording because the wrong answer survives one round of checking: merging
only the per-category half also returns crowding=0, for the unrelated reason
that build() still reads the unmerged store and every per-market rung reports
058644 alone. Two routes to the same number, one meaningless.

No code change. Teaching coverage to merge would change the row count and no
conclusion, and this handoff's own Scope puts thresholds out of bounds.

ALSO FIXED, a breakage I caused. Merging cotdata#93 deleted the function
reproduce.py's flow_equivalence block calls, so B29's figures had a reproducer
that raised AttributeError. It now detects the removal and prints the figures as
historical with the reason, matching what test_flow_equivalence.py already does.
A reproducer that crashes once the change it recommended lands reads as a broken
measurement rather than a completed one.

433 passed, ruff clean, prior reproducer output byte-identical. The handoff body
is preserved verbatim; only the Status line was replaced.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mspinola
mspinola merged commit b420a7f into main Aug 2, 2026
5 checks passed
@mspinola
mspinola deleted the claude/close-coverage-handoff branch August 3, 2026 21:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant