Conversation
test_committed_catalog_is_current_and_valid pinned the exact list of stripped period spellings in the committed catalog. Every resolver append that recorded the next weekly claims print added a spelling (week_2026-08-29, week_2026-09-05, ...) and failed the required "Arch checks" status, so proposals merged past it with the resolver's admin token (#240 on 2026-09-03, 598f394 on 2026-09-29) and the check stopped meaning anything. The list stood for one question: has a curator decided that this strip is a period label and not a statute, cohort, or edition label that happens to spell its row's period? The test now asks that per (spelling, concept) pair: - build_series_catalog.stripped_segment_review_problems audits the catalog's stripped_segments against a reviewed map (tests/fixtures/series_catalog/reviewed_stripped_segments.json, the catalog at 55bbf3d that #244 reviewed, with each strip's kinds). - A strip outside the map passes only if its concept already has a reviewed strip of the same period_spelling_template (the same way of writing a period) and every observation behind it spells its own declared period directly (kind derived). - New concepts, new templates, unreviewed overlap strips, reviewed strips that gain the overlap kind, reviewed strips that disappear, non-period spellings, and catalog/plan disagreements all still fail. A concept that starts stripping an already-listed spelling used to pass unseen; it now fails. build_catalog exposes each strip's classify_segments kinds as plan["stripped_kinds"]; catalog bytes are unchanged (--check green). week_2026-06-13 and week_2026_06_13 are not a naming bug: both come from the one 2026-06-13 initial-claims row (ledger line 44), whose source_record_id uses ISO hyphens and whose measure.concept uses underscores. Both strip as overlap because that row declares a month (the cadence defect in docs/catalog-curation-backlog.md). Documented in the fixture notes and the backlog, and asserted by the fixture test. Hypothesis joins the dev extras with the same pyproject and uv.lock change as #306. Co-Authored-By: Claude Opus 5.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.
Problem
test_committed_catalog_is_current_and_validpinned the exact list of stripped period spellings in the committed catalog. Every Thesis resolver append that records the next weekly claims print adds a spelling (week_2026-08-29,week_2026-09-05, …), so every append failed the required "Arch checks" status. The resolver merges through the API with an admin token (it waits only for "Append gate"), so the red check was ignored:What the list protected
The builder can't tell a real period label from a statute, cohort, or edition label that happens to spell the row's own period.
stripped_segmentsexists so a curator can catch that (build_series_catalog.pymodule docstring;classify_segments). The exact list forced a human look at every new spelling. It also failed when a spelling disappeared.It had a gap: only spellings were pinned, not concepts. A new concept starting to strip an already-listed spelling (for example
2026_07) passed unseen.The invariant now checked
build_series_catalog.stripped_segment_review_problems(stripped_segments, stripped_kinds, reviewed)audits every (spelling, concept) strip. The reviewed map istests/fixtures/series_catalog/reviewed_stripped_segments.json: the catalog at 55bbf3d that #244 reviewed, recorded with each strip'sclassify_segmentskinds.A strip that is not in the reviewed map passes only when both of these hold:
period_spelling_template(digits become9, month words become<month>, separators and literal words are kept), so it is the next week or month written the same way;derived, neveroverlap).Everything else is still reported:
week_ending_…where it usedweek_…)build_catalognow exposes each strip's kinds asplan["stripped_kinds"]. The catalog bytes do not change:--checkis green, the byte-regeneration assertion passes, and no catalog keys are added, so Thesis's frozenCATALOG_TOP_LEVEL_KEYS/CATALOG_ROW_KEYSare unaffected.week_2026-06-13vsweek_2026_06_13Not a naming bug. Both come from the one 2026-06-13 initial-claims row (ledger line 44):
source_record_idisus.dol.initial_claims.sa.week_2026-06-13(ISO hyphens);measure.conceptisus.dol.initial_claims.sa.week_2026_06_13(underscores).The builder strips period tokens from both fields and records each distinct spelling. Both strip as
overlapbecause the row declaresmonth 2026-06, the cadence defect already indocs/catalog-curation-backlog.md("Initial claims cadence metadata"). This is now documented in the fixture notes and the backlog, andtest_reviewed_stripped_segments_fixture_is_wellformedasserts it.Evidence on real data
I overlaid this PR's builder, test and fixture on each refused proposal head and ran
tests/test_build_series_catalog.py:78308f87917dbe(job 108675953661)7bc1595598f394(merged append)177c461'2026_08' on 'abs.labour.unemployment_rate': first '9999_99' strip for this concept+ the existing anchor test#289 is a real curation event. The docket placeholder
abs.labour.unemployment_ratetook its first print beside an already-observedabs.labour.unemployment_rate.australia, which looks like a concept-spelling duplicate. So a failure there is the check doing its job.Deliberately corrupted copies of #297's head all fail
test_committed_catalog_is_current_and_valid:treasury.debt_limit.suspension_act.2026_09.first_print(month 2026-09) and regenerated, so the catalog is current. Result:'2026_09' on 'treasury.debt_limit.suspension_act': first '9999_99' strip….us.dol.initial_claims.sa.week_2026-09-12with period month 2026-09 and regenerated. Result:'week_2026-09-12' on 'us.dol.initial_claims.sa': unreviewed overlap strip….after_mpc_june_2026fromstripped_segmentsfails the byte-regeneration assertion.Invariants (tested)
Property tests use Hypothesis, derandomized so this required check stays deterministic:
mayis both.Other tests:
test_stripped_kinds_match_an_independent_replayre-derives every strip's kinds from the ledger withclassify_segments. It resolves each observation to its catalog row through that row's concept and aliases, and requiresplan["stripped_kinds"]and the catalog'sstripped_segmentsto agree exactly.Scope and coordination
pyproject.tomlanduv.lockchange, so those hunks merge cleanly in either order. Resolve catalog supersede links against every row's effective assertion id #306 also re-pins the exact list (week_2026-08-29/09-05/09-12). Whichever PR lands second resolves that one hunk by keeping this PR's audit, since the new spellings pass as routine continuations.== 228),suspect_segments == ["LNU02374597"]andtest_identity_uuid_map_matches_reviewed_anchorfire only on identity events (mints, enrichments, supersedes). The repo documents those as needing curation. No routine append this month tripped them; only Record 8 first-print observation(s) via resolve_pending.py #289, a real curation question, did.build_series_catalog.py --check,pytest tests/test_build_series_catalog.py(171 passed, about 8s),--verify-registry-append-onlyagainst the base registry, and the full "Lint Arch surface" ruff list. I did not run the Arch-surface pytest list, the DB build or the wheel steps locally (the host was overloaded). No module outside this test imports the builder, and CI runs them.axiom: n/a: catalog test and tooling change, no policy logic.
🤖 Generated with Claude Code