Skip to content

gap_prevalence: census mode, aggregates under opaque labels (Part of #5865) - #6104

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5865-20261023T0025Z
Oct 23, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5865-20261023T0025Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5865. Checklist: partial [c:c7bddb8f] -- the census numbers themselves (no census clones on this box: run gap_prevalence.py --census-survey DIR --census-corpora DIR --write once), the combined single table, and the #5054 vocabulary link.

What

tests/tools/gap_prevalence.py gains the census half of the ranking: measure_census + scrub_key + census_eras, --census-survey / --census-corpora, and a "Census estates" section on the generated page. The ranking core is now shared (rank).

  • Non-burned estates are counted by tools only, as aggregates under opaque census-<hash> labels (same rule as era_distribution.py). No program name, per-program row or source line is kept; eras come from feature_inventory.scan_estate in memory.
  • scrub_key keeps only the engine's own vocabulary (CICS command + option, SQL keywords, IBM routines, refusal families, statement forms made of COBOL words). Anything that could carry a repo, program, table or copybook name collapses to its class (EXEC SQL: other, missing copybook, CALL other, other).
  • measure() still refuses non-burned corpora; measure_census() refuses burned ones.

Class table (same-mechanism members): burned ranking (done in #5951), census ranking (this PR), key scrubbing (this PR). Not done: combined table with a scope column, #5054 link.

Tests: 28 in tests/tools/test_gap_prevalence.py (scrub parametrised over every key family, no-leak assertion on the JSON, mutual refusal, none-era, render). pr_gates --fast 7/7. No engine code touched, so no golden bless.

Lessons for agents

  • A census gap key can carry a program/table/copybook name (burned keys like ZUIDSTCK: show it): scrub before committing any census-derived key.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 23, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 23, 2026 00:31
@squid-protocol
squid-protocol enabled auto-merge (squash) October 23, 2026 00:41
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit a4aa641 into main Oct 23, 2026
45 checks passed
@squid-protocol
squid-protocol deleted the churn/5865-20261023T0025Z branch October 23, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant