diff --git a/.gitattributes b/.gitattributes index bed0738c7eeb449bca98b5d2f33c89a1ee56349a..51d869ac468eefe05771fe3efd11a56d79175452 100644 --- a/.gitattributes +++ b/.gitattributes @@ -58,3 +58,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text # Video files - compressed *.mp4 filter=lfs diff=lfs merge=lfs -text *.webm filter=lfs diff=lfs merge=lfs -text +exact/10k.fst filter=lfs diff=lfs merge=lfs -text +exact/25k.fst filter=lfs diff=lfs merge=lfs -text +exact/397k.fst filter=lfs diff=lfs merge=lfs -text diff --git a/PUBLICATION_SHA256.txt b/PUBLICATION_SHA256.txt new file mode 100644 index 0000000000000000000000000000000000000000..b08d4c5d15e1d562ee7f382d5f734256ac60836b --- /dev/null +++ b/PUBLICATION_SHA256.txt @@ -0,0 +1,53 @@ +cdffbd89a28e6dac0ad9d857003dd21cf2010a3319782b9b02bcff505d2fdfff ./address/10k/aliases.jsonl.gz +2c693340c192a14e88309bbeb250b9dad507c5c5ef0daa65818de46cd4cbdb5d ./address/10k/entities.jsonl.gz +07eb4a8796bacbb1fd5de08e96f9a0303ba2e792e3434d003e21559d8862404f ./address/10k/manifest.json +5027fdc509223c60c988d34da15e5700efe88b55c5d164c4b63c8776a32f70ca ./address/10k/occurrences.jsonl.gz +81a3df61313c24898bc1772194c7c0f946341ec55676e047f6e245a495d749f7 ./address/10k/quarantine.jsonl.gz +e24579a285f6cc546d85a1179bbb5e0c5e9d8b7e77610547584c0ebf65857dac ./address/10k/redirects.jsonl.gz +62da348c4b0838b4f94709096bc83bbba3d6a8cb909d16c6190159410ea0646a ./address/10k/surface_statistics.jsonl.gz +dfc292ce8636d029e35f184beee91489b1397df06e60fb6b2748102db4ab7359 ./address/25k/aliases.jsonl.gz +1b9ef33732779908ccbe9a60f2d2c3df37494d82ceb355a4324250523738a3cf ./address/25k/entities.jsonl.gz +80b81ab8e4c743b8bb3f94d25127f5c7510f9c51e2bf61dd22cf22c7336b9aac ./address/25k/manifest.json +df64cc024f3e1a2be1a7602ac5507a322cfc951cdfab1bbf6455147f7cea184a ./address/25k/occurrences.jsonl.gz +3d1ce308030ec0a4023a8180f729c5e144eb3582f0b82a6dd0882e7634673e2c ./address/25k/quarantine.jsonl.gz +106a90ff1f2b3839e83435f1606116a5711a3c19e68f233f8d8905e484274124 ./address/25k/redirects.jsonl.gz +002b2006dc74c93e92279a731a8c7b705af84b1ee2c797df2aa24e517c18b4af ./address/25k/surface_statistics.jsonl.gz +157dc7afcf59f0a758c5df2835b1863fa7a74cc8d778eee7adc80fbef9ca024a ./address/397k/aliases.jsonl.gz +9e373c7fe1b7d16e79a4f9a82a73ce65e94510c8f9dd21276fa2283384eded6d ./address/397k/entities.jsonl.gz +8c1d20c20a2ffa2c79a6e4b541a143da6b38f2da414c00a10159b3b4b30a2c21 ./address/397k/manifest.json +4dbeaa076f23726818bb111e5c9e8b24be74b2abdbfd3b442bf8324cf6700db1 ./address/397k/occurrences.jsonl.gz +af3c3974924ca19a86d3f3997376ffcfc938ab52daeca92bbe310185fe2de971 ./address/397k/quarantine.jsonl.gz +57feef8ccde4dc219ce8279c464ae01bf7ebd600cdb0cf423ccffc2f6454aec6 ./address/397k/redirects.jsonl.gz +406a18e6b1738ff38ae44ecb1bb8fcaf9de0bd2b9f244c87a40d6eb16b6e1dfe ./address/397k/surface_statistics.jsonl.gz +565a784e25cb3e30460d2f61a3f8099a96471759e85e92764a7d5a47e937e033 ./benchmark/10k/benchmark-manifest.json +66b3600c5383d9e9331728830534819d86d0de34e7e4c6d50a77271d34f8aa3e ./benchmark/10k/development_labels.jsonl.gz +f89d15632eede65c6494a0d25fad20696b40b5d16519c03773f02c5bf34c5783 ./benchmark/10k/quarantine.jsonl.gz +1e599369b71a0e94a3a65953d872a021732be8bcb4ba3bdcacbbd8c24b64f6f2 ./benchmark/10k/runtime.jsonl.gz +ac7a0f626c7c8545620ae37cb96103958731119fc255e37ea0dd139dc63d35cd ./benchmark/10k/tuning_labels.jsonl.gz +f5231357da14c94fd777a26751820889d573083776dbdb50b99398d6994697df ./benchmark/25k/benchmark-manifest.json +69d23e09409a21925273d0649cc67c6a09625e0b2df8c68ef3d0e88f8d488302 ./benchmark/25k/development_labels.jsonl.gz +57285abbda2575f1be1d5c87bdfcbf44410e5c4297fdb931d20e839658c53c8f ./benchmark/25k/quarantine.jsonl.gz +e42f76abe5992fe8c32a73d48b518aac1b7e6bf161b05783e1a9e0e46e4e3ee1 ./benchmark/25k/runtime.jsonl.gz +90efb0784fc3711ce900116b2183a8af2605c5172c74a6df8f9efd4a98730df7 ./benchmark/25k/tuning_labels.jsonl.gz +889991893f85f6c9ef867b4f4c8ade796315fc0ccfe4bec5a0326d0058dbf323 ./benchmark/397k/benchmark-manifest.json +069aa6e9d78fc9c5fc892bd06ce94a5d7846933476e731c8137fbe18c54bdfeb ./benchmark/397k/development_labels.jsonl.gz +c485faff001b4d1f680241fcf104cdbc07115ef564aa1f4fb832de10aa0bb0d7 ./benchmark/397k/quarantine.jsonl.gz +c6cd9b08501fd315178be16f3fe777d8c39bef4321ff718774d3862ab64262b6 ./benchmark/397k/runtime.jsonl.gz +5739985dfdb7ddde354320cc6e7002f3094fefc3a705a5a7cedf63ac06573272 ./benchmark/397k/tuning_labels.jsonl.gz +55bdb50a674b317540cd22fff6acacf4188d4f7b45081165e822a9f32b99396b ./capture/10k.jsonl.gz +5b0fe06b2729e289cd0567d0c2bbd5a8d21d10d689e5bde3e0331708092654e9 ./capture/10k.jsonl.gz.manifest.json +2da5e1a752af2b54d35f30d6be3b7b9cf8b7b8a1979494f752f48c8a67e77ac4 ./capture/25k.jsonl.gz +cc007562e7d253fc0ff7461d60ef790633b974b19d09cce27d206e981debd52c ./capture/25k.jsonl.gz.manifest.json +df9dcb89b265097869544162007e3e2cc33175b5f340b0a6bdf79a86c3fb5453 ./capture/397k.jsonl.gz +da5d0c0b577f5bf00eeab8400f6b2cdbcd055c5a226b407c2ea871b752012ee8 ./capture/397k.jsonl.gz.manifest.json +7e68da960ab828ceccf08eab7ff08162aa90c914541a75c3ba8484046f433e76 ./exact/10k.fst +78e71800c167564df9005cae9c41ca61c78e7b6bddf3b1429a472cd0e3127992 ./exact/10k.fst.manifest.json +8c475118384a0feeeeac8ea8296100674e55716d838d1eb3397b3e758efbb095 ./exact/25k.fst +adfe52056d3a5536bb4681afa0d6d8e881f44d481592cec4cfa7a0f979e3b331 ./exact/25k.fst.manifest.json +a97990708f6fe6e0d3904b531a748f1f9a8e873607caaa5ef77cc5cab916acae ./exact/397k.fst +a8e6b922f20c0b059d8b2cb231d407315aedef2fe4830110a01cbfb6170b6c72 ./exact/397k.fst.manifest.json +08a6607c43615c909b7f2d0453374dd726ce730fbb758f1e9c169248613a8a38 ./README.md +3aa99cf5b7d0088e770491ae3990b8bc6287a8013101b6a71c5964dc3e8cd682 ./semantic-address-v2-targeted.manifest.json +3b064accbfcdc69c759a4739696acefa21eb849eaa9239a31f3cf8c68c3219fb ./source-patch/0001-0004-v12-factory-repairs.patch +af99712fa1e8bd7c799359dd431f2b122244932421ecdd18a9788c85e9dd9a04 ./source-patch/COMMIT.txt +e7c97ac5506f5757864e3e825d51f2397fccc6e9ee27058cea8f85f517b383d2 ./V12_FACTORY_COMPLETION_REPORT.md diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9f0d75fb15ee91b24b687a1cb96a364d0373d6a8 --- /dev/null +++ b/README.md @@ -0,0 +1,130 @@ +--- +pretty_name: AetherSparse V12 Semantic Address v2 Factory Substrate +license: cc-by-sa-4.0 +tags: + - wikipedia + - entity-linking + - knowledge-graph + - semantic-addressing + - aethersparse +--- + +# AetherSparse V12 Semantic Address v2 Factory Substrate + +## Purpose + +Derived data substrate for Semantic Address Plane v2 qualification and +training/selection under the split constraints recorded by the manifests. This +is the completed V12 Work-consumer handoff: compiled, hash-verified artifacts +produced by the AetherSparse Factory pipeline over the canonical v0.5 corpus +series, at three corpus tiers (10k / 25k / 397k articles). + +## Source + +Corpus-derived content is derived **solely** from the verified Wikipedia dump +used by the AetherSparse v0.5 canonical corpus series: + +- Dump: `simplewiki-20260701-pages-articles.xml.bz2` (Simple English Wikipedia, + 1 July 2026, namespace-0 articles) +- Source dump SHA-256: + `541a2547b6cc72e91449719226d05181234cfadb2531a69faca1969245c8cb5d` +- Corpus series: `simplewiki_real_corpus_v050_20260701_e7a60c622d86dd01` +- Pack normalization ID: `nfkc-html-punctuation-whitespace-v050-v1` + (NFKC + HTML-unescape + punctuation fold incl. U+2013→hyphen + whitespace) +- Tiers: 10,000 / 25,000 / 397,196 (full dump) articles; canonical pack SHA-256 + identities are recorded in `V12_FACTORY_COMPLETION_REPORT.md` (the raw packs + themselves are **not** part of this dataset). + +## Contents + +- `address/{10k,25k,397k}/` — canonical address registries (entities), + aliases, redirects, copied-span hyperlink/anchor occurrence representations, + split-safe surface statistics, quarantine streams, per-tier manifests + (Semantic Address v2 schema). +- `exact/{10k,25k,397k}.fst` (+ manifests) — exact-address FST indexes over the + fit split. +- `capture/{10k,25k,397k}.jsonl.gz` (+ manifests) — lawful + development/tuning factory captures derived from the checked-in v11 entity + freeze (sealed partitions excluded at source). +- `benchmark/{10k,25k,397k}/` — runtime and development/tuning label streams, + alignment quarantine, benchmark manifests. +- `source-patch/` — AetherSparse Factory repair patch series + (`0001-0004-v12-factory-repairs.patch`, tip commit in `COMMIT.txt`) required + by Work to reproduce/consume this substrate. +- `V12_FACTORY_COMPLETION_REPORT.md` — repair log, pack identities, per-tier + counts, revalidation results, verification record. +- `semantic-address-v2-targeted.manifest.json` — authoritative outer manifest + (SHA-256 + size for every payload file). + +## Exclusions (deliberate) + +- Raw canonical SQLite packs (the 11.2 GB 397k pack and its siblings) — not + included. +- Evaluation / final-held labels or candidate bodies — excluded at source; + only development/tuning material authorized by Mission 7 is present. +- Credentials, secrets, tokens, environment files, shell history, SSH + material — none present (see Sanitation). +- Private user data and unrelated local files — none present. + +## Integrity + +`semantic-address-v2-targeted.manifest.json` is authoritative and **must be +verified before use**: re-hash every listed file and confirm zero mismatches +and no unlisted files. `PUBLICATION_SHA256.txt` is an additional publication +audit (it covers the whole published tree including this README; it +deliberately excludes itself and is **not** a replacement for the Factory +manifest). All payload files are byte-identical to the completed, verified +Factory tree. + +## Upstream attribution and license + +The corpus-derived payload is derived from +[Simple English Wikipedia](https://simple.wikipedia.org/) dump +`simplewiki-20260701-pages-articles.xml.bz2` +([Wikimedia Downloads](https://dumps.wikimedia.org/simplewiki/20260701/)), +created by Wikipedia contributors. Wikipedia text is available under the +[Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA +4.0)](https://creativecommons.org/licenses/by-sa/4.0/) (with older revisions +additionally under the +[GNU Free Documentation License](https://www.gnu.org/licenses/fdl-1.3.html)); +see the [Wikimedia Foundation Terms of +Use](https://wikimediafoundation.org/legal/terms-of-use/). Attribution: +"Wikipedia contributors, Simple English Wikipedia, dump of 1 July 2026." +This dataset republishes derived representations of that text; CC BY-SA 4.0 +applies to the Wikipedia-derived content. No new license is asserted over +Wikipedia-derived content. + +## AetherSparse material + +Project-specific files — manifests, the completion report, benchmark +projections, and the Factory repair patch series — are AetherSparse-owned +materials and retain the ownership/license status of the +[AetherSparse repository](https://github.com/ag1357/AetherSparse). This +dataset card does not modify the repository's LICENSE or NOTICE. + +## Sanitation summary (publication audit) + +- Corpus-derived payload confirmed to trace solely to the verified Wikipedia + source lineage recorded above; remaining files are AetherSparse-owned + derived metadata, reports, manifests, benchmark projections, and source + patches. YES (verified). +- Unrelated/private user data found: NO. +- Accidental credentials/secrets found: NO. (Pattern sweeps matched only + dictionary words and upstream Wikipedia citation-URL query parameters — + e.g. `CFTOKEN=`, `api_key=`, one `secret_password=` — that are public in + the source dump itself; none are publisher or user credentials. The payload + is kept byte-identical to the verified Factory tree; scrubbing upstream + source content would break the manifest integrity boundary.) +- Raw SQLite packs published: NO. +- Evaluation/final-held labels published: NO (zero sealed-partition rows in + any payload; verified by scan). + +## Limitations + +This is a compiled research substrate for Semantic Address v2 qualification, +not an independent general-purpose Wikipedia dump and not a final trained +model. Occurrence representations are copied spans with resolution metadata +under the declared pack normalization; consumers must apply the manifests and +the repair patch series for correct interpretation. Missing-resolution rates +(54.4% / 48.4% / 30.7% by tier) reflect genuine red-link structure of the +source corpus at each tier. diff --git a/V12_FACTORY_COMPLETION_REPORT.md b/V12_FACTORY_COMPLETION_REPORT.md new file mode 100644 index 0000000000000000000000000000000000000000..b02df219411072208d2c2be8177b29d76ccd7403 --- /dev/null +++ b/V12_FACTORY_COMPLETION_REPORT.md @@ -0,0 +1,198 @@ +# V12 Semantic Address v2 — Factory Completion Report + +Mission 7 continuation: complete real-corpus 10k/25k/397k Semantic Address v2 substrate. +Base branch: `work/aethercore-v12-semantic-address-v2` @ `ae29e99` plus three local repair +commits (see `source-patch/`; tip commit in `source-patch/COMMIT.txt`). + +## 1. Repaired Work defects (generic, regression-tested, fail-closed) + +### 1.1 Canonical registry / compiler normalization authority +The compiler created canonical IDs from the pack's stored `normalized_title` (v0.5 +normalization: NFKC + HTML-unescape + punctuation fold incl. U+2013→hyphen + whitespace +collapse + casefold), while `load_canonical_registry` re-derived IDs from raw titles via +`contracts_v2.normalize_surface` (no punctuation fold). 9 of 7,455 10k entities (all +en-dash titles: Castilla–La Mancha, Hindu–Arabic numeral system, Index of Soviet +Union–related articles, Joint Base Pearl Harbor–Hickam, Mexican–American War, National +Women's Hockey League (1999–2007), Obsessive–compulsive disorder, Spanish–American War, +World Trade Center (1973–2001)) failed verification, blocking compile-exact entirely. + +Repair: +- `contracts_v2.pack_lookup_normalizer(normalization_id)`: returns the declared v050 + normalizer; any undeclared normalization fails closed. +- `compiler_v2`: reads and requires `corpus_meta.normalization_id`; records it in the + address manifest; threads the declared normalizer through `_resolve_target` + (title lookups and redirect follows). Stored `normalized_title` is used as-is. +- `bundle_v2.load_canonical_registry`: verifies the bundle normalization_id (via + `verify_address_export`, which now requires the field), recomputes canonical IDs from + the stored `normalized_title`, and additionally checks title↔normalized consistency + under the *declared* normalization (drift remains fail-closed). +- `schemas/semantic-address-v2-manifest.schema.json`: `normalization_id` added as + required (const `nfkc-html-punctuation-whitespace-v050-v1`). +- Same repair applied to `CanonicalAddressRegistry.__post_init__` and to + `factory_export_v2._proposals` (alias/anchor_text lookups use the declared + normalization). + +Demonstration: all 7,455 10k entities load and are present in the compiled exact index +(`entity_count: 7455` in `exact/10k.fst.manifest.json`). + +### 1.2 Empty-normalizing exact surfaces +`AddressEvidence` rejects surfaces that normalize to empty. The real corpus contains +whitespace-only piped-link displays (`[[target| ]]`): 7 occurrences at 10k (all +unresolved), more at 25k including *resolved* ones. An empty-normalizing surface is +unqueryable for any resolution state, so `iter_exact_address_evidence` now skips such +anchor evidence uniformly. Rows remain fully preserved in `occurrences.jsonl.gz` and +their support/unresolved mass stays in `surface_statistics`; resolved entities remain +reachable via title/alias/redirect/other anchor surfaces. + +### 1.3 Cross-tier benchmark export +`export_v11_benchmark_capture` required every freeze case to have exactly one replica at +the requested tier; the checked-in cross-tier freeze (175 cases; per-tier unique-replica +counts 84/118/144 at 10k/25k/397k) failed on every tier. The exporter now selects the +unique requested-tier replica internally; cases with absent or duplicate requested-tier +replicas are excluded and counted (`cases_excluded_absent_requested_tier_replica`, +`cases_excluded_duplicate_requested_tier_replica`); case ID and partition are preserved; +no alignment is ever guessed; no external projection file is required. The Mission-7 +projection (`v12/ENTITY_HARD_NEGATIVES_V11.tier-10k.json.gz`) is retained as historical +evidence only; the production path consumes the checked-in freeze `b544edbb…` directly. +Byte-proof: the repaired exporter's 10k capture is byte-identical to the accepted +checkpoint capture (`55bdb50a…`). + +### 1.4 Builder CLI tier pin +`build_simplewiki_pack.py --articles` was pinned to the frozen series (10000/50000). +Extended to admit 25000 and 397196 (the exact full-dump namespace-0 article count for +simplewiki 20260701, measured by streaming the verified dump with the builder's own +`iter_pages`). The limit remains exact; the builder fails closed if the dump ends early. + +### Regression tests +`tests/addressing/test_v050_pack_normalization.py` (6 tests): en-dash entity loads and +resolves canonical; tampered/raw-derived entity IDs rejected; missing normalization_id +fails closed; undeclared normalization rejected; unique-tier replica selection with +absent/duplicate exclusion counts; empty-surface skip (unresolved) and resolved-empty +compile. Full addressing + real_corpus suites pass (see §6). + +## 2. Canonical pack identities (all built from the verified local dump) + +Source dump: `simplewiki-20260701-pages-articles.xml.bz2`, sha256 +`541a2547b6cc72e91449719226d05181234cfadb2531a69faca1969245c8cb5d` (matches the repo +source manifest; present locally — no network needed). +series_id `simplewiki_real_corpus_v050_20260701_e7a60c622d86dd01`; +normalization_id `nfkc-html-punctuation-whitespace-v050-v1`; +pack_format_id `aethersparse-flat-structured-sqlite-v050-1`; schema_version 500. + +| tier | file | sha256 | bytes | documents | aliases | anchors | redirects | chunks | +|---|---|---|---|---|---|---|---|---| +| 10k | simplewiki-v050-20260701-10k.sqlite | 8e2e03d35b847a67364256afd1144c908128765ed02280c059a3d3299d542521 | 725,901,312 | 10,000 | 10,000 | 779,447 | 2,349 | 147,549 | +| 25k | simplewiki-v050-20260701-25k-final.sqlite | d62604610807b3ddfbd48198d7949cac26dfc104b103fa314660e3cb18a51133 | 1,237,024,768 | 25,000 | 25,000 | 1,148,607 | 7,130 | 265,964 | +| 397k | simplewiki-v050-20260701-397k-final.sqlite | 0061fa8d50f56434edb229d424d38a8ae8cdb417cc5d6f981bd199cd59ff971e | 11,189,653,504 | 397,196 | 397,196 | 7,627,708 | 114,296 | 2,799,775 | + +10k provenance addendum: the pre-existing local 10k pack (`8e2e03d3…`) was validated by +rebuilding from the verified dump with the deployed builder: all content tables +(documents/aliases/redirects/anchors/chunks) are logically byte-identical; the only +difference is `corpus_meta.source.status_url` (local path vs URL string). Work's +repo-manifest records a byte-different build (`cb93db73…`, SQLite 3.50.4 vs local +3.46.1) with identical counts, size, series, and normalization. The 10k substrate here +is compiled from `8e2e03d3…` (same logical corpus as the accepted first-run checkpoint). + +## 3. Per-tier compile counts + +### 10k (revalidated with repaired code; Δ vs accepted checkpoint) +- occurrences 779,447 (unchanged): canonical 350,358 (Δ−23), missing 423,858 (Δ+85), + ambiguous 5,136 (Δ−61), redirect_cycle 95 (Δ−1) +- entities 7,455 (=), aliases 10,000 (=), redirects 2,349 (=), quarantine 568 (Δ−6) +- surfaces 198,511 (=); statistics rows fit 171,842 / fit+calibration 184,129 / all + 198,511 (all =); unseen_holdout_surfaces 14,972 (=) +- exact index: 173,797 surfaces, 15,132 postings, file sha256 7e68da96… (fit split only) +- capture: 84 cases (91 excluded: absent 10k replica), 123 mentions, 30 exact + single-mention alignments, 6 cases without detected mentions +- benchmark: runtime 64 dev + 59 tuning; exact labels 15 dev + 15 tuning; alignment + quarantine 93; failure_correct_candidate_absent 28; failure_candidate_misranked 2 + +Changed-count explanation (all from lookup-side normalization now matching the pack's +declared normalization; the pack's own `RealCorpusPack` lookup interface uses the same +normalizer): (a) six en-dash redirect targets recovered from quarantine — the entities +loop now follows raw redirect targets with the declared normalization, consistent with +the redirects stream (e.g. OCD → Obsessive–compulsive disorder); (b) wikitext targets +containing underscores no longer resolve via the generic contract's underscore→space +folding (missing-with-underscore 440→533), matching the pack's own lookup semantics; +(c) residual ambiguous/cycle shifts are the same class. The 54.4% missing rate stands +as genuine red-link evidence: zero missing occurrences involve en/em-dash targets. + +### 25k (new canonical tier) +- occurrences 1,148,607: canonical 577,549, missing 555,603, ambiguous 13,361, + redirect_cycle 2,094 +- entities 17,456, aliases 25,000, redirects 7,130, quarantine 1,216, + duplicate_title_groups 513 +- surfaces 287,712; statistics rows fit 250,295 / fit+calibration 268,366 / all 287,712; + unseen_holdout_surfaces 20,093 +- exact index: 255,993 surfaces, 38,449 postings, file sha256 8c475118… (fit only) +- capture: 118 cases (57 excluded), 168 mentions, 54 exact alignments, 7 without mentions +- benchmark: runtime 82 dev + 86 tuning; exact labels 23 dev + 31 tuning; quarantine 114; + failure_correct_candidate_absent 53; failure_candidate_misranked 1 + +### 397k (full dump) +- occurrences 7,627,708: canonical 4,747,498 (62.2%), missing 2,342,634 (30.7%), + ambiguous 537,575, redirect_cycle 1 +- entities 275,989, aliases 397,196, redirects 114,296, quarantine 16,977, + duplicate_title_groups 9,058 +- surfaces 1,381,698; statistics rows fit 1,196,689 / fit+calibration 1,296,593 / all + 1,381,698; unseen_holdout_surfaces 89,676 +- exact index: 1,334,801 surfaces, 568,940 postings, file sha256 a9799070… (fit only) +- capture: 144 cases (31 excluded: absent 397k replica), 237 mentions, 50 exact + single-mention alignments, 5 cases without detected mentions +- benchmark: runtime 101 dev + 136 tuning; exact labels 19 dev + 31 tuning; alignment + quarantine 187; failure_correct_candidate_absent 38; failure_candidate_misranked 9; + failure_candidate_outside_cap 3 + +Scale note: the missing (red-link) rate falls from 54.4% (10k) to 48.4% (25k) to 30.7% +(397k) as the corpus grows — the unresolved population is genuine and visible at every +tier; nothing was renormalized away. + +### 3.1 Performance repair discovered at 397k scale +`CanonicalAddressRegistry.require_pair` rebuilt an O(entries) mapping on every call, +making exact-evidence adaptation O(rows × entities) — at 397k (~276k entities, ~6.6M +calls) the first attempt pinned a core for 3.2 h inside the aliases loop with no I/O +(projected ~a day). The immutable registry now builds its mapping once in +`__post_init__` (commit a3ae7f9). Semantics unchanged: the 10k/25k exact FSTs rebuilt +under the final code are byte-identical (7e68da96…, 8c475118…). The 397k exact compile +then completed in ~17 minutes. + +## 4. Split integrity +All exports derive fit/calibration/holdout by hashing `source_document_id` +(benchmark partitions unused). Captures consume only development/tuning freeze cases; +`sealed_partitions_excluded: [evaluation, final_held]` is recorded in every capture +manifest. No evaluation/final-held labels entered fit/calibration/feature design. + +## 5. Payload layout +`v12-final/`: address/{10k,25k,397k}/ (entities, aliases, redirects, occurrences, +surface_statistics, quarantine + manifest.json), exact/{10k,25k,397k}.fst(+manifest), +capture/{10k,25k,397k}.jsonl.gz(+manifest), benchmark/{10k,25k,397k}/, +source-patch/ (git format-patch + COMMIT.txt), this report, and the sibling +`semantic-address-v2-targeted.manifest.json` (finalize-handoff output). + +## 6. Verification +- Regression suites: `tests/addressing/` + `tests/real_corpus/` — **55 passed** + (includes the 6 new v050-normalization/tier-selection regression tests; + the pre-existing registry-drift test still fails closed under the repaired check). +- 10k revalidation cross-checks: capture byte-identical to the accepted checkpoint + (`55bdb50a…`) while consuming the checked-in freeze directly (`b544edbb…`); + entities/redirects streams byte-identical to the checkpoint; occurrences/aliases/ + surface_statistics/quarantine deltas fully accounted for by the repair classes + (en-dash redirect recovery −6 quarantine; underscore-target pack-faithful misses). +- Exact FST provenance: all three FSTs compiled by the final repair tip (a3ae7f9); + 10k/25k rebuilds byte-identical to their pre-performance-fix outputs. +- Outer manifest: `semantic-address-v2-targeted.manifest.json` (schema + `aethersparse.semantic-address-v2-factory-handoff.v1`) produced by + `finalize-handoff` over this directory after this report's final content edit; + every listed file re-hashed and verified against it (result: PASS, 51 files, + 0 mismatches, no unlisted files). +- No raw packs, dumps, trace caches, or sealed-partition labels are present in this + payload (finalize-handoff rejects .sqlite payloads and symlinks by construction). + +## 7. Source identity +- Base: `work/aethercore-v12-semantic-address-v2` @ ae29e99. +- Repairs: four local commits 9476191, c18a456, 937255a, a3ae7f9 (tip a3ae7f9), + exported as `source-patch/0001-0004-v12-factory-repairs.patch`; tip hash in + `source-patch/COMMIT.txt`. Commits are local to the Factory worktree and were not + pushed to Work's branch. +- Runtime: Python 3.11 venv, `PYTHONPATH=src` at the patched worktree; all builds and + compiles ran locally on the CM5; no network access was required. diff --git a/address/10k/aliases.jsonl.gz b/address/10k/aliases.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..225df3b0a5b08276a96f4d870d4416c47a912f76 --- /dev/null +++ b/address/10k/aliases.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cdffbd89a28e6dac0ad9d857003dd21cf2010a3319782b9b02bcff505d2fdfff +size 815991 diff --git a/address/10k/entities.jsonl.gz b/address/10k/entities.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..d455693eb057c0ec447114d6b8109d829b2c6776 --- /dev/null +++ b/address/10k/entities.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c693340c192a14e88309bbeb250b9dad507c5c5ef0daa65818de46cd4cbdb5d +size 903076 diff --git a/address/10k/manifest.json b/address/10k/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..a951aa0328c8243baff3968d37c21cdfcd2c0d61 --- /dev/null +++ b/address/10k/manifest.json @@ -0,0 +1,138 @@ +{ + "corpus_tier": "10k", + "counts": { + "aliases_rows": 10000, + "duplicate_title_groups": 232, + "entities_rows": 7455, + "occurrence_resolution_ambiguous": 5136, + "occurrence_resolution_canonical": 350358, + "occurrence_resolution_missing": 423858, + "occurrence_resolution_redirect_cycle": 95, + "occurrences": 779447, + "occurrences_rows": 779447, + "quarantine_rows": 568, + "redirects_rows": 2349, + "surface_statistics_all_rows": 198511, + "surface_statistics_fit_calibration_rows": 184129, + "surface_statistics_fit_rows": 171842, + "surface_statistics_rows": 554482, + "surfaces": 198511, + "unseen_holdout_surfaces": 14972 + }, + "normalization_id": "nfkc-html-punctuation-whitespace-v050-v1", + "schema_version": "aethersparse.semantic-address-manifest.v2", + "source_pack_bytes": 725901312, + "source_pack_sha256": "8e2e03d35b847a67364256afd1144c908128765ed02280c059a3d3299d542521", + "split_policy": { + "benchmark_partitions_used": false, + "calibration_buckets": "80-89", + "fit_buckets": "0-79", + "hash": "sha256-first-32-bits-mod-100", + "holdout_buckets": "90-99", + "unit": "source_document_id" + }, + "sqlite_user_version": 500, + "streams": { + "aliases": { + "compressed_bytes": 815991, + "file": "aliases.jsonl.gz", + "gzip_sha256": "cdffbd89a28e6dac0ad9d857003dd21cf2010a3319782b9b02bcff505d2fdfff", + "jsonl_bytes": 4196819, + "jsonl_sha256": "28c101e7989414b82d454c95f8bb5e6f0a071bb8eb83bbf370c61a8a0d890e94", + "rows": 10000 + }, + "entities": { + "compressed_bytes": 903076, + "file": "entities.jsonl.gz", + "gzip_sha256": "2c693340c192a14e88309bbeb250b9dad507c5c5ef0daa65818de46cd4cbdb5d", + "jsonl_bytes": 3081751, + "jsonl_sha256": "095d5a13eb0944c77923084d2ae9f755a0b407a41b7cca4aa8eed655b07b4234", + "rows": 7455 + }, + "occurrences": { + "compressed_bytes": 146840951, + "file": "occurrences.jsonl.gz", + "gzip_sha256": "5027fdc509223c60c988d34da15e5700efe88b55c5d164c4b63c8776a32f70ca", + "jsonl_bytes": 856748088, + "jsonl_sha256": "860c0cb5e438470e8f2f562548027a43f7fab906f08c4d84b7dc4ea1bd78d0b8", + "rows": 779447 + }, + "quarantine": { + "compressed_bytes": 43203, + "file": "quarantine.jsonl.gz", + "gzip_sha256": "81a3df61313c24898bc1772194c7c0f946341ec55676e047f6e245a495d749f7", + "jsonl_bytes": 195587, + "jsonl_sha256": "2be22b94f2aae206aea8476417275bfb5ac2c53b7b50354289616eeaa1155afb", + "rows": 568 + }, + "redirects": { + "compressed_bytes": 293528, + "file": "redirects.jsonl.gz", + "gzip_sha256": "e24579a285f6cc546d85a1179bbb5e0c5e9d8b7e77610547584c0ebf65857dac", + "jsonl_bytes": 1225774, + "jsonl_sha256": "0ead7e1b29ca3e9c887319d041e35483c8e4438c110dcb44a87084aa47e05180", + "rows": 2349 + }, + "surface_statistics": { + "compressed_bytes": 31618543, + "file": "surface_statistics.jsonl.gz", + "gzip_sha256": "62da348c4b0838b4f94709096bc83bbba3d6a8cb909d16c6190159410ea0646a", + "jsonl_bytes": 398348626, + "jsonl_sha256": "e974f75e8583848c2d1908d03689d13064dafc1926c807c8032cfe58cd3700a7", + "rows": 554482 + } + }, + "views": { + "entropy_bins": { + "all:positive": 15130, + "all:zero": 183381, + "fit+calibration:positive": 13682, + "fit+calibration:zero": 170447, + "fit:positive": 12560, + "fit:zero": 159282 + }, + "source_split_occurrences": { + "calibration": 67639, + "fit": 636239, + "holdout": 75569 + }, + "support_bins": { + "all:head": 694, + "all:tail": 190333, + "all:torso": 7484, + "fit+calibration:head": 628, + "fit+calibration:tail": 176659, + "fit+calibration:torso": 6842, + "fit:head": 584, + "fit:tail": 165064, + "fit:torso": 6194 + }, + "surface_statistics": { + "all": { + "included_source_splits": [ + "fit", + "calibration", + "holdout" + ], + "rows": 198511, + "usage": "descriptive_only" + }, + "fit": { + "included_source_splits": [ + "fit" + ], + "rows": 171842, + "usage": "fit_and_selection" + }, + "fit+calibration": { + "included_source_splits": [ + "fit", + "calibration" + ], + "rows": 184129, + "usage": "holdout_qualification_only" + } + }, + "unseen_holdout_surfaces": 14972 + } +} diff --git a/address/10k/occurrences.jsonl.gz b/address/10k/occurrences.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..4a9569b661e600c1eebaff70e86c1a74af0368ab --- /dev/null +++ b/address/10k/occurrences.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5027fdc509223c60c988d34da15e5700efe88b55c5d164c4b63c8776a32f70ca +size 146840951 diff --git a/address/10k/quarantine.jsonl.gz b/address/10k/quarantine.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..ccae99035664dca150e2981233b1fa1615f3f3e6 --- /dev/null +++ b/address/10k/quarantine.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81a3df61313c24898bc1772194c7c0f946341ec55676e047f6e245a495d749f7 +size 43203 diff --git a/address/10k/redirects.jsonl.gz b/address/10k/redirects.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..dc2258edf8959b01adb9b279f8dd91433ed6086c --- /dev/null +++ b/address/10k/redirects.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e24579a285f6cc546d85a1179bbb5e0c5e9d8b7e77610547584c0ebf65857dac +size 293528 diff --git a/address/10k/surface_statistics.jsonl.gz b/address/10k/surface_statistics.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..64ec8d15b1da2a4e7124093414e73d10e84b6258 --- /dev/null +++ b/address/10k/surface_statistics.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62da348c4b0838b4f94709096bc83bbba3d6a8cb909d16c6190159410ea0646a +size 31618543 diff --git a/address/25k/aliases.jsonl.gz b/address/25k/aliases.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..c9b05223a32e0f02927b35b565b9776ed6c26e11 --- /dev/null +++ b/address/25k/aliases.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfc292ce8636d029e35f184beee91489b1397df06e60fb6b2748102db4ab7359 +size 2069326 diff --git a/address/25k/entities.jsonl.gz b/address/25k/entities.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..1928ba9d3e8289d25644873d25be425fdce84132 --- /dev/null +++ b/address/25k/entities.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b9ef33732779908ccbe9a60f2d2c3df37494d82ceb355a4324250523738a3cf +size 2134203 diff --git a/address/25k/manifest.json b/address/25k/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..1d5b1fe57cb13d84de1971165d13a1d02bef782a --- /dev/null +++ b/address/25k/manifest.json @@ -0,0 +1,138 @@ +{ + "corpus_tier": "25k", + "counts": { + "aliases_rows": 25000, + "duplicate_title_groups": 513, + "entities_rows": 17456, + "occurrence_resolution_ambiguous": 13361, + "occurrence_resolution_canonical": 577549, + "occurrence_resolution_missing": 555603, + "occurrence_resolution_redirect_cycle": 2094, + "occurrences": 1148607, + "occurrences_rows": 1148607, + "quarantine_rows": 1216, + "redirects_rows": 7130, + "surface_statistics_all_rows": 287712, + "surface_statistics_fit_calibration_rows": 268366, + "surface_statistics_fit_rows": 250295, + "surface_statistics_rows": 806373, + "surfaces": 287712, + "unseen_holdout_surfaces": 20093 + }, + "normalization_id": "nfkc-html-punctuation-whitespace-v050-v1", + "schema_version": "aethersparse.semantic-address-manifest.v2", + "source_pack_bytes": 1237024768, + "source_pack_sha256": "d62604610807b3ddfbd48198d7949cac26dfc104b103fa314660e3cb18a51133", + "split_policy": { + "benchmark_partitions_used": false, + "calibration_buckets": "80-89", + "fit_buckets": "0-79", + "hash": "sha256-first-32-bits-mod-100", + "holdout_buckets": "90-99", + "unit": "source_document_id" + }, + "sqlite_user_version": 500, + "streams": { + "aliases": { + "compressed_bytes": 2069326, + "file": "aliases.jsonl.gz", + "gzip_sha256": "dfc292ce8636d029e35f184beee91489b1397df06e60fb6b2748102db4ab7359", + "jsonl_bytes": 10619569, + "jsonl_sha256": "1c748697bd3d3abfeaf23f6320359734b71a12bfee508f9a156609c8d55ba69a", + "rows": 25000 + }, + "entities": { + "compressed_bytes": 2134203, + "file": "entities.jsonl.gz", + "gzip_sha256": "1b9ef33732779908ccbe9a60f2d2c3df37494d82ceb355a4324250523738a3cf", + "jsonl_bytes": 7264040, + "jsonl_sha256": "35174a8a6dd569a44b44cdc97beef932bfc9d57c98e1d7e174e5cbe3cae046f7", + "rows": 17456 + }, + "occurrences": { + "compressed_bytes": 223065087, + "file": "occurrences.jsonl.gz", + "gzip_sha256": "df64cc024f3e1a2be1a7602ac5507a322cfc951cdfab1bbf6455147f7cea184a", + "jsonl_bytes": 1267784126, + "jsonl_sha256": "626f708cc3a733023c7f290aa8ac282b66159ab86267612a40ba657f752c7d34", + "rows": 1148607 + }, + "quarantine": { + "compressed_bytes": 93479, + "file": "quarantine.jsonl.gz", + "gzip_sha256": "3d1ce308030ec0a4023a8180f729c5e144eb3582f0b82a6dd0882e7634673e2c", + "jsonl_bytes": 421385, + "jsonl_sha256": "23e0b07dd95818bf3cfe39ee463df674b8e730ab608ea8b6dcbc362641ef3b46", + "rows": 1216 + }, + "redirects": { + "compressed_bytes": 878881, + "file": "redirects.jsonl.gz", + "gzip_sha256": "106a90ff1f2b3839e83435f1606116a5711a3c19e68f233f8d8905e484274124", + "jsonl_bytes": 3767075, + "jsonl_sha256": "9d49a131b3c3ed8b01757c26ce2249a94e675cab66e761a2e170b522d75908f5", + "rows": 7130 + }, + "surface_statistics": { + "compressed_bytes": 47447375, + "file": "surface_statistics.jsonl.gz", + "gzip_sha256": "002b2006dc74c93e92279a731a8c7b705af84b1ee2c797df2aa24e517c18b4af", + "jsonl_bytes": 587952542, + "jsonl_sha256": "e59b3c53148f17a2b35c904c52e92a64c93e96e38c72654c1b7594f92b61a02d", + "rows": 806373 + } + }, + "views": { + "entropy_bins": { + "all:positive": 25913, + "all:zero": 261799, + "fit+calibration:positive": 23764, + "fit+calibration:zero": 244602, + "fit:positive": 21549, + "fit:zero": 228746 + }, + "source_split_occurrences": { + "calibration": 101467, + "fit": 937331, + "holdout": 109809 + }, + "support_bins": { + "all:head": 1055, + "all:tail": 274258, + "all:torso": 12399, + "fit+calibration:head": 946, + "fit+calibration:tail": 256156, + "fit+calibration:torso": 11264, + "fit:head": 845, + "fit:tail": 239158, + "fit:torso": 10292 + }, + "surface_statistics": { + "all": { + "included_source_splits": [ + "fit", + "calibration", + "holdout" + ], + "rows": 287712, + "usage": "descriptive_only" + }, + "fit": { + "included_source_splits": [ + "fit" + ], + "rows": 250295, + "usage": "fit_and_selection" + }, + "fit+calibration": { + "included_source_splits": [ + "fit", + "calibration" + ], + "rows": 268366, + "usage": "holdout_qualification_only" + } + }, + "unseen_holdout_surfaces": 20093 + } +} diff --git a/address/25k/occurrences.jsonl.gz b/address/25k/occurrences.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..a7951afef5a118266e26f45f525f0ba9e0cbc889 --- /dev/null +++ b/address/25k/occurrences.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df64cc024f3e1a2be1a7602ac5507a322cfc951cdfab1bbf6455147f7cea184a +size 223065087 diff --git a/address/25k/quarantine.jsonl.gz b/address/25k/quarantine.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..74aa0c878ea3111f97010b22c03a4f3a33a63808 --- /dev/null +++ b/address/25k/quarantine.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d1ce308030ec0a4023a8180f729c5e144eb3582f0b82a6dd0882e7634673e2c +size 93479 diff --git a/address/25k/redirects.jsonl.gz b/address/25k/redirects.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..9da9e6681236ad2f48f49f9c3155c343d23d6904 --- /dev/null +++ b/address/25k/redirects.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:106a90ff1f2b3839e83435f1606116a5711a3c19e68f233f8d8905e484274124 +size 878881 diff --git a/address/25k/surface_statistics.jsonl.gz b/address/25k/surface_statistics.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..2ca4ed82821309a9cbb91ac7511898abddc950fc --- /dev/null +++ b/address/25k/surface_statistics.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:002b2006dc74c93e92279a731a8c7b705af84b1ee2c797df2aa24e517c18b4af +size 47447375 diff --git a/address/397k/aliases.jsonl.gz b/address/397k/aliases.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..f4319914b3bd5ec83be2b9c19279dde490f1c3e3 --- /dev/null +++ b/address/397k/aliases.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:157dc7afcf59f0a758c5df2835b1863fa7a74cc8d778eee7adc80fbef9ca024a +size 34113824 diff --git a/address/397k/entities.jsonl.gz b/address/397k/entities.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..d93404f887605c7c4abbf342c8ccb587f41e9a38 --- /dev/null +++ b/address/397k/entities.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e373c7fe1b7d16e79a4f9a82a73ce65e94510c8f9dd21276fa2283384eded6d +size 34529975 diff --git a/address/397k/manifest.json b/address/397k/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..e9084cb10eba7524e3d97bc9d3fece2716399de6 --- /dev/null +++ b/address/397k/manifest.json @@ -0,0 +1,138 @@ +{ + "corpus_tier": "397k", + "counts": { + "aliases_rows": 397196, + "duplicate_title_groups": 9058, + "entities_rows": 275989, + "occurrence_resolution_ambiguous": 537575, + "occurrence_resolution_canonical": 4747498, + "occurrence_resolution_missing": 2342634, + "occurrence_resolution_redirect_cycle": 1, + "occurrences": 7627708, + "occurrences_rows": 7627708, + "quarantine_rows": 16977, + "redirects_rows": 114296, + "surface_statistics_all_rows": 1381698, + "surface_statistics_fit_calibration_rows": 1296593, + "surface_statistics_fit_rows": 1196689, + "surface_statistics_rows": 3874980, + "surfaces": 1381698, + "unseen_holdout_surfaces": 89676 + }, + "normalization_id": "nfkc-html-punctuation-whitespace-v050-v1", + "schema_version": "aethersparse.semantic-address-manifest.v2", + "source_pack_bytes": 11189653504, + "source_pack_sha256": "0061fa8d50f56434edb229d424d38a8ae8cdb417cc5d6f981bd199cd59ff971e", + "split_policy": { + "benchmark_partitions_used": false, + "calibration_buckets": "80-89", + "fit_buckets": "0-79", + "hash": "sha256-first-32-bits-mod-100", + "holdout_buckets": "90-99", + "unit": "source_document_id" + }, + "sqlite_user_version": 500, + "streams": { + "aliases": { + "compressed_bytes": 34113824, + "file": "aliases.jsonl.gz", + "gzip_sha256": "157dc7afcf59f0a758c5df2835b1863fa7a74cc8d778eee7adc80fbef9ca024a", + "jsonl_bytes": 175169245, + "jsonl_sha256": "e8b79cdea3cce24c5d7ab771d05ea318cf99ef7e23dfd93976f0905922b9a0dc", + "rows": 397196 + }, + "entities": { + "compressed_bytes": 34529975, + "file": "entities.jsonl.gz", + "gzip_sha256": "9e373c7fe1b7d16e79a4f9a82a73ce65e94510c8f9dd21276fa2283384eded6d", + "jsonl_bytes": 117692012, + "jsonl_sha256": "8d980f27f545d4a60d6c0866f010a6d8e37271922394f9c2d19c45b51f7ae162", + "rows": 275989 + }, + "occurrences": { + "compressed_bytes": 1533123748, + "file": "occurrences.jsonl.gz", + "gzip_sha256": "4dbeaa076f23726818bb111e5c9e8b24be74b2abdbfd3b442bf8324cf6700db1", + "jsonl_bytes": 8588119836, + "jsonl_sha256": "ba4d487c0014d9bd09452ae52eb2dd610a204ee3572e02f1a0287709fa18fe4d", + "rows": 7627708 + }, + "quarantine": { + "compressed_bytes": 1292111, + "file": "quarantine.jsonl.gz", + "gzip_sha256": "af3c3974924ca19a86d3f3997376ffcfc938ab52daeca92bbe310185fe2de971", + "jsonl_bytes": 5932622, + "jsonl_sha256": "deff25596c5d3174b6e2590b0f9cfe59260568620b36ae65e219d61a51a52e69", + "rows": 16977 + }, + "redirects": { + "compressed_bytes": 14440710, + "file": "redirects.jsonl.gz", + "gzip_sha256": "57feef8ccde4dc219ce8279c464ae01bf7ebd600cdb0cf423ccffc2f6454aec6", + "jsonl_bytes": 62731556, + "jsonl_sha256": "07e1b095e15e914704d327346cad86546db3a6fe7dac911ed0496e8c1d0bbdda", + "rows": 114296 + }, + "surface_statistics": { + "compressed_bytes": 255884007, + "file": "surface_statistics.jsonl.gz", + "gzip_sha256": "406a18e6b1738ff38ae44ecb1bb8fcaf9de0bd2b9f244c87a40d6eb16b6e1dfe", + "jsonl_bytes": 2958101689, + "jsonl_sha256": "c10d0c7f2f68c036187886f007924c508b5abf2eae09d73db0fc1ed503191550", + "rows": 3874980 + } + }, + "views": { + "entropy_bins": { + "all:positive": 140785, + "all:zero": 1240913, + "fit+calibration:positive": 130195, + "fit+calibration:zero": 1166398, + "fit:positive": 118402, + "fit:zero": 1078287 + }, + "source_split_occurrences": { + "calibration": 777406, + "fit": 6103340, + "holdout": 746962 + }, + "support_bins": { + "all:head": 7708, + "all:tail": 1290283, + "all:torso": 83707, + "fit+calibration:head": 6895, + "fit+calibration:tail": 1213718, + "fit+calibration:torso": 75980, + "fit:head": 6084, + "fit:tail": 1122944, + "fit:torso": 67661 + }, + "surface_statistics": { + "all": { + "included_source_splits": [ + "fit", + "calibration", + "holdout" + ], + "rows": 1381698, + "usage": "descriptive_only" + }, + "fit": { + "included_source_splits": [ + "fit" + ], + "rows": 1196689, + "usage": "fit_and_selection" + }, + "fit+calibration": { + "included_source_splits": [ + "fit", + "calibration" + ], + "rows": 1296593, + "usage": "holdout_qualification_only" + } + }, + "unseen_holdout_surfaces": 89676 + } +} diff --git a/address/397k/occurrences.jsonl.gz b/address/397k/occurrences.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..f4b5c94a561f75c444b302e7fac0450af380672b --- /dev/null +++ b/address/397k/occurrences.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dbeaa076f23726818bb111e5c9e8b24be74b2abdbfd3b442bf8324cf6700db1 +size 1533123748 diff --git a/address/397k/quarantine.jsonl.gz b/address/397k/quarantine.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..9b251b5ae6553dfca5c7821f889ae53587a887cd --- /dev/null +++ b/address/397k/quarantine.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af3c3974924ca19a86d3f3997376ffcfc938ab52daeca92bbe310185fe2de971 +size 1292111 diff --git a/address/397k/redirects.jsonl.gz b/address/397k/redirects.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..dcd23eb4c5a3b7d883f17feaea500052ebe854f8 --- /dev/null +++ b/address/397k/redirects.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57feef8ccde4dc219ce8279c464ae01bf7ebd600cdb0cf423ccffc2f6454aec6 +size 14440710 diff --git a/address/397k/surface_statistics.jsonl.gz b/address/397k/surface_statistics.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..35a2144d804dca6b0a0bca41f7cf876070a4b876 --- /dev/null +++ b/address/397k/surface_statistics.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:406a18e6b1738ff38ae44ecb1bb8fcaf9de0bd2b9f244c87a40d6eb16b6e1dfe +size 255884007 diff --git a/benchmark/10k/benchmark-manifest.json b/benchmark/10k/benchmark-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..1540f803a00dac9ea4c62503c1b6f2520a1ffc36 --- /dev/null +++ b/benchmark/10k/benchmark-manifest.json @@ -0,0 +1,52 @@ +{ + "counts": { + "alignment_quarantine": 93, + "exact_alignment_development": 15, + "exact_alignment_tuning": 15, + "failure_candidate_misranked": 2, + "failure_correct_candidate_absent": 28, + "runtime_development": 64, + "runtime_tuning": 59 + }, + "outputs": { + "development_labels": { + "compressed_bytes": 2184, + "file": "development_labels.jsonl.gz", + "gzip_sha256": "66b3600c5383d9e9331728830534819d86d0de34e7e4c6d50a77271d34f8aa3e", + "jsonl_bytes": 10090, + "jsonl_sha256": "07cefafdf11984961b7045fedd0a0c0d8a42711783ac66b3f6860702beb04e6d", + "rows": 15 + }, + "quarantine": { + "compressed_bytes": 11123, + "file": "quarantine.jsonl.gz", + "gzip_sha256": "f89d15632eede65c6494a0d25fad20696b40b5d16519c03773f02c5bf34c5783", + "jsonl_bytes": 67288, + "jsonl_sha256": "fd022dcdc9e0d58c930935d33d553588b8c41778a52bcf84945fd634322e24ec", + "rows": 93 + }, + "runtime": { + "compressed_bytes": 69446, + "file": "runtime.jsonl.gz", + "gzip_sha256": "1e599369b71a0e94a3a65953d872a021732be8bcb4ba3bdcacbbd8c24b64f6f2", + "jsonl_bytes": 257609, + "jsonl_sha256": "53e012ebd613e095ec537c2fdabd16bd8f88e021694e59dbb8ad9053aba57a7f", + "rows": 123 + }, + "tuning_labels": { + "compressed_bytes": 2184, + "file": "tuning_labels.jsonl.gz", + "gzip_sha256": "ac7a0f626c7c8545620ae37cb96103958731119fc255e37ea0dd139dc63d35cd", + "jsonl_bytes": 10015, + "jsonl_sha256": "d8ecb6c3b6e351dfc3dc31b36270866e292879ae2657404a4d7ab3a8452359cd", + "rows": 15 + } + }, + "schema_version": "aethersparse.semantic-address-benchmark-manifest.v2", + "sealed_partitions_excluded": [ + "evaluation", + "final_held" + ], + "source_bytes": 70723, + "source_sha256": "55bdb50a674b317540cd22fff6acacf4188d4f7b45081165e822a9f32b99396b" +} diff --git a/benchmark/10k/development_labels.jsonl.gz b/benchmark/10k/development_labels.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..a444f5d0a5e5705c7f9f2b28f99f81f5f52ef01d --- /dev/null +++ b/benchmark/10k/development_labels.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66b3600c5383d9e9331728830534819d86d0de34e7e4c6d50a77271d34f8aa3e +size 2184 diff --git a/benchmark/10k/quarantine.jsonl.gz b/benchmark/10k/quarantine.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..ae15802390323b5794c3a75d330ff60d5f8dc49d --- /dev/null +++ b/benchmark/10k/quarantine.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f89d15632eede65c6494a0d25fad20696b40b5d16519c03773f02c5bf34c5783 +size 11123 diff --git a/benchmark/10k/runtime.jsonl.gz b/benchmark/10k/runtime.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..456af70fc98b2c0c481c927a2c841c79f1b376d9 --- /dev/null +++ b/benchmark/10k/runtime.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e599369b71a0e94a3a65953d872a021732be8bcb4ba3bdcacbbd8c24b64f6f2 +size 69446 diff --git a/benchmark/10k/tuning_labels.jsonl.gz b/benchmark/10k/tuning_labels.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..6e71405b633f88b06e1fbe8419f548f8aacdee47 --- /dev/null +++ b/benchmark/10k/tuning_labels.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac7a0f626c7c8545620ae37cb96103958731119fc255e37ea0dd139dc63d35cd +size 2184 diff --git a/benchmark/25k/benchmark-manifest.json b/benchmark/25k/benchmark-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..6b8a9411f79b90c20677f3a8a73157b140deba11 --- /dev/null +++ b/benchmark/25k/benchmark-manifest.json @@ -0,0 +1,52 @@ +{ + "counts": { + "alignment_quarantine": 114, + "exact_alignment_development": 23, + "exact_alignment_tuning": 31, + "failure_candidate_misranked": 1, + "failure_correct_candidate_absent": 53, + "runtime_development": 82, + "runtime_tuning": 86 + }, + "outputs": { + "development_labels": { + "compressed_bytes": 3162, + "file": "development_labels.jsonl.gz", + "gzip_sha256": "69d23e09409a21925273d0649cc67c6a09625e0b2df8c68ef3d0e88f8d488302", + "jsonl_bytes": 15461, + "jsonl_sha256": "4876b972e43e51446d7d3ab5083a8fca92d5c3d300c9bee90ad4a2483933d66a", + "rows": 23 + }, + "quarantine": { + "compressed_bytes": 13367, + "file": "quarantine.jsonl.gz", + "gzip_sha256": "57285abbda2575f1be1d5c87bdfcbf44410e5c4297fdb931d20e839658c53c8f", + "jsonl_bytes": 81965, + "jsonl_sha256": "34da645d3284ff408acb5beaa7d661e3ff7ac1fafa6e2463f9df0ce6f4c1837b", + "rows": 114 + }, + "runtime": { + "compressed_bytes": 134601, + "file": "runtime.jsonl.gz", + "gzip_sha256": "e42f76abe5992fe8c32a73d48b518aac1b7e6bf161b05783e1a9e0e46e4e3ee1", + "jsonl_bytes": 427716, + "jsonl_sha256": "1d8e2d5fa943dd8b8daa2ad591b45b8b95b696b3cd53070740bad8ce0982d35a", + "rows": 168 + }, + "tuning_labels": { + "compressed_bytes": 4149, + "file": "tuning_labels.jsonl.gz", + "gzip_sha256": "90efb0784fc3711ce900116b2183a8af2605c5172c74a6df8f9efd4a98730df7", + "jsonl_bytes": 20673, + "jsonl_sha256": "25a051c369d3c1077bad316ee0fc10978f0903bb3b1414b44b1d37584370b143", + "rows": 31 + } + }, + "schema_version": "aethersparse.semantic-address-benchmark-manifest.v2", + "sealed_partitions_excluded": [ + "evaluation", + "final_held" + ], + "source_bytes": 135013, + "source_sha256": "2da5e1a752af2b54d35f30d6be3b7b9cf8b7b8a1979494f752f48c8a67e77ac4" +} diff --git a/benchmark/25k/development_labels.jsonl.gz b/benchmark/25k/development_labels.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..4c1e14d095b352d1281d3b6a96e502db937e2de2 --- /dev/null +++ b/benchmark/25k/development_labels.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69d23e09409a21925273d0649cc67c6a09625e0b2df8c68ef3d0e88f8d488302 +size 3162 diff --git a/benchmark/25k/quarantine.jsonl.gz b/benchmark/25k/quarantine.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..9d7bbd18816111f596ff1210f696f7e5f631a97b --- /dev/null +++ b/benchmark/25k/quarantine.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57285abbda2575f1be1d5c87bdfcbf44410e5c4297fdb931d20e839658c53c8f +size 13367 diff --git a/benchmark/25k/runtime.jsonl.gz b/benchmark/25k/runtime.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..f373365a36e35ceba485a37449bbddc20451dc84 --- /dev/null +++ b/benchmark/25k/runtime.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e42f76abe5992fe8c32a73d48b518aac1b7e6bf161b05783e1a9e0e46e4e3ee1 +size 134601 diff --git a/benchmark/25k/tuning_labels.jsonl.gz b/benchmark/25k/tuning_labels.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..6e396e0db8f7af573bc8bc680ea247f345a067e2 --- /dev/null +++ b/benchmark/25k/tuning_labels.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90efb0784fc3711ce900116b2183a8af2605c5172c74a6df8f9efd4a98730df7 +size 4149 diff --git a/benchmark/397k/benchmark-manifest.json b/benchmark/397k/benchmark-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..4632131d77eaa949a4e17c90854127f521a1ccdf --- /dev/null +++ b/benchmark/397k/benchmark-manifest.json @@ -0,0 +1,53 @@ +{ + "counts": { + "alignment_quarantine": 187, + "exact_alignment_development": 19, + "exact_alignment_tuning": 31, + "failure_candidate_misranked": 9, + "failure_candidate_outside_cap": 3, + "failure_correct_candidate_absent": 38, + "runtime_development": 101, + "runtime_tuning": 136 + }, + "outputs": { + "development_labels": { + "compressed_bytes": 2693, + "file": "development_labels.jsonl.gz", + "gzip_sha256": "069aa6e9d78fc9c5fc892bd06ce94a5d7846933476e731c8137fbe18c54bdfeb", + "jsonl_bytes": 12779, + "jsonl_sha256": "358142732ca7d0632e05deb219d9aae48a6f0befdf58624c39f54dbce307627f", + "rows": 19 + }, + "quarantine": { + "compressed_bytes": 21166, + "file": "quarantine.jsonl.gz", + "gzip_sha256": "c485faff001b4d1f680241fcf104cdbc07115ef564aa1f4fb832de10aa0bb0d7", + "jsonl_bytes": 132445, + "jsonl_sha256": "91d8eae665b165d13d99a89043d71225f84391e6c171860f0e18ea666efdc7cc", + "rows": 187 + }, + "runtime": { + "compressed_bytes": 930994, + "file": "runtime.jsonl.gz", + "gzip_sha256": "c6cd9b08501fd315178be16f3fe777d8c39bef4321ff718774d3862ab64262b6", + "jsonl_bytes": 2299589, + "jsonl_sha256": "d6792ec02bd67cd14dba3b9cf0d92fd5f44d4fbaf26636e9fd17f460f08f098f", + "rows": 237 + }, + "tuning_labels": { + "compressed_bytes": 4198, + "file": "tuning_labels.jsonl.gz", + "gzip_sha256": "5739985dfdb7ddde354320cc6e7002f3094fefc3a705a5a7cedf63ac06573272", + "jsonl_bytes": 20711, + "jsonl_sha256": "7955ad8922a8a82009a3764bb535109b651673d1549503124ede421075e0d78e", + "rows": 31 + } + }, + "schema_version": "aethersparse.semantic-address-benchmark-manifest.v2", + "sealed_partitions_excluded": [ + "evaluation", + "final_held" + ], + "source_bytes": 933378, + "source_sha256": "df9dcb89b265097869544162007e3e2cc33175b5f340b0a6bdf79a86c3fb5453" +} diff --git a/benchmark/397k/development_labels.jsonl.gz b/benchmark/397k/development_labels.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..90a2233a47baf4a5924c495c446cb0ba2942cca4 --- /dev/null +++ b/benchmark/397k/development_labels.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:069aa6e9d78fc9c5fc892bd06ce94a5d7846933476e731c8137fbe18c54bdfeb +size 2693 diff --git a/benchmark/397k/quarantine.jsonl.gz b/benchmark/397k/quarantine.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..016c1b947930410c5c8a4389ca08feacd656649c --- /dev/null +++ b/benchmark/397k/quarantine.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c485faff001b4d1f680241fcf104cdbc07115ef564aa1f4fb832de10aa0bb0d7 +size 21166 diff --git a/benchmark/397k/runtime.jsonl.gz b/benchmark/397k/runtime.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..273d8b2d8faf2d4cbe66c5eb9ea3d524b4bf9984 --- /dev/null +++ b/benchmark/397k/runtime.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6cd9b08501fd315178be16f3fe777d8c39bef4321ff718774d3862ab64262b6 +size 930994 diff --git a/benchmark/397k/tuning_labels.jsonl.gz b/benchmark/397k/tuning_labels.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..b88bc2ceb662995a2b727e48fab214c834061055 --- /dev/null +++ b/benchmark/397k/tuning_labels.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5739985dfdb7ddde354320cc6e7002f3094fefc3a705a5a7cedf63ac06573272 +size 4198 diff --git a/capture/10k.jsonl.gz b/capture/10k.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..adc3655dce2d614d510c1597535844b68002dc5d --- /dev/null +++ b/capture/10k.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55bdb50a674b317540cd22fff6acacf4188d4f7b45081165e822a9f32b99396b +size 70723 diff --git a/capture/10k.jsonl.gz.manifest.json b/capture/10k.jsonl.gz.manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..460d68a0c8188bf0bcc740f966ff3055bf59b86a --- /dev/null +++ b/capture/10k.jsonl.gz.manifest.json @@ -0,0 +1,35 @@ +{ + "channels": [ + "alias", + "anchor", + "redirect", + "title" + ], + "corpus_tier": "10k", + "counts": { + "cases": 84, + "cases_excluded_absent_requested_tier_replica": 91, + "cases_without_detected_mentions": 6, + "exact_single_mention_alignments": 30, + "mentions": 123 + }, + "hard_negatives_sha256": "b544edbb46570d09c6efc415bd77806f24331efa655f93682ebab28c40ec33ec", + "output": { + "compressed_bytes": 70723, + "file": "10k.jsonl.gz", + "gzip_sha256": "55bdb50a674b317540cd22fff6acacf4188d4f7b45081165e822a9f32b99396b", + "jsonl_bytes": 273374, + "jsonl_sha256": "46ce00da4ec01070124e78ddf267c8e579df8fb8e16fd17a3345fbcbf9704f45", + "rows": 123 + }, + "partitions": [ + "development", + "tuning" + ], + "schema_version": "aethersparse.semantic-address-factory-export.v2", + "sealed_partitions_excluded": [ + "evaluation", + "final_held" + ], + "source_pack_sha256": "8e2e03d35b847a67364256afd1144c908128765ed02280c059a3d3299d542521" +} diff --git a/capture/25k.jsonl.gz b/capture/25k.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..257b9dc842480b02cbd5835f2fea0edd73866d4a --- /dev/null +++ b/capture/25k.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2da5e1a752af2b54d35f30d6be3b7b9cf8b7b8a1979494f752f48c8a67e77ac4 +size 135013 diff --git a/capture/25k.jsonl.gz.manifest.json b/capture/25k.jsonl.gz.manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..3cc83a21f66cbe0f32d7cda4faa9fe4b11682f00 --- /dev/null +++ b/capture/25k.jsonl.gz.manifest.json @@ -0,0 +1,35 @@ +{ + "channels": [ + "alias", + "anchor", + "redirect", + "title" + ], + "corpus_tier": "25k", + "counts": { + "cases": 118, + "cases_excluded_absent_requested_tier_replica": 57, + "cases_without_detected_mentions": 7, + "exact_single_mention_alignments": 54, + "mentions": 168 + }, + "hard_negatives_sha256": "b544edbb46570d09c6efc415bd77806f24331efa655f93682ebab28c40ec33ec", + "output": { + "compressed_bytes": 135013, + "file": "25k.jsonl.gz", + "gzip_sha256": "2da5e1a752af2b54d35f30d6be3b7b9cf8b7b8a1979494f752f48c8a67e77ac4", + "jsonl_bytes": 447361, + "jsonl_sha256": "717dfa4586d663fba64258e9d38d845fb47ae9c914bfea0f3db3fd83ad06fecb", + "rows": 168 + }, + "partitions": [ + "development", + "tuning" + ], + "schema_version": "aethersparse.semantic-address-factory-export.v2", + "sealed_partitions_excluded": [ + "evaluation", + "final_held" + ], + "source_pack_sha256": "d62604610807b3ddfbd48198d7949cac26dfc104b103fa314660e3cb18a51133" +} diff --git a/capture/397k.jsonl.gz b/capture/397k.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..1cfe057f4ae2378c5de2c881ca04a8a87ef7984c --- /dev/null +++ b/capture/397k.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df9dcb89b265097869544162007e3e2cc33175b5f340b0a6bdf79a86c3fb5453 +size 933378 diff --git a/capture/397k.jsonl.gz.manifest.json b/capture/397k.jsonl.gz.manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..c2041ea3b6a71f783486a21b7d2e1374317342bb --- /dev/null +++ b/capture/397k.jsonl.gz.manifest.json @@ -0,0 +1,35 @@ +{ + "channels": [ + "alias", + "anchor", + "redirect", + "title" + ], + "corpus_tier": "397k", + "counts": { + "cases": 144, + "cases_excluded_absent_requested_tier_replica": 31, + "cases_without_detected_mentions": 5, + "exact_single_mention_alignments": 50, + "mentions": 237 + }, + "hard_negatives_sha256": "b544edbb46570d09c6efc415bd77806f24331efa655f93682ebab28c40ec33ec", + "output": { + "compressed_bytes": 933378, + "file": "397k.jsonl.gz", + "gzip_sha256": "df9dcb89b265097869544162007e3e2cc33175b5f340b0a6bdf79a86c3fb5453", + "jsonl_bytes": 2324586, + "jsonl_sha256": "1160d8e20d48feb064780960a01cbcca4d205e88e33011703d22d0c5bab7c5bf", + "rows": 237 + }, + "partitions": [ + "development", + "tuning" + ], + "schema_version": "aethersparse.semantic-address-factory-export.v2", + "sealed_partitions_excluded": [ + "evaluation", + "final_held" + ], + "source_pack_sha256": "0061fa8d50f56434edb229d424d38a8ae8cdb417cc5d6f981bd199cd59ff971e" +} diff --git a/exact/10k.fst b/exact/10k.fst new file mode 100644 index 0000000000000000000000000000000000000000..c3e7d36706b9164b06ab06538783837e87bb7b32 --- /dev/null +++ b/exact/10k.fst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e68da960ab828ceccf08eab7ff08162aa90c914541a75c3ba8484046f433e76 +size 59152692 diff --git a/exact/10k.fst.manifest.json b/exact/10k.fst.manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..2a48bcf643e2b1fb494781dccf519f4020ac6237 --- /dev/null +++ b/exact/10k.fst.manifest.json @@ -0,0 +1 @@ +{"counts":{"arc_count":235107,"entity_count":7455,"group_count":173797,"posting_count":15132,"provenance_count":646036,"provenance_ref_count":646036,"state_count":235108,"surface_count":173797},"file":"10k.fst","file_bytes":59152692,"file_sha256":"7e68da960ab828ceccf08eab7ff08162aa90c914541a75c3ba8484046f433e76","header_sha256":"572e13f0df4dd6a83f949984cf9aa5d8d4f72f5d1fa92e3056e0d2b25863d0bd","root_sha256":"c52cb908112020ae9a25164e2e22d79623e9975faf92c87158229c56502a6b82","schema_version":"aethersparse.exact-address-index-manifest.v12","sealed_partitions_excluded":["evaluation","final_held"],"source_artifact_sha256":"07eb4a8796bacbb1fd5de08e96f9a0303ba2e792e3434d003e21559d8862404f","source_partitions":["fit"]} diff --git a/exact/25k.fst b/exact/25k.fst new file mode 100644 index 0000000000000000000000000000000000000000..0bf01b94dbc7493bd83d44b05debef45710ad838 --- /dev/null +++ b/exact/25k.fst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c475118384a0feeeeac8ea8296100674e55716d838d1eb3397b3e758efbb095 +size 88719458 diff --git a/exact/25k.fst.manifest.json b/exact/25k.fst.manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..6baaf71c91fef9364a89bc03be9a4c0a29e1a4a0 --- /dev/null +++ b/exact/25k.fst.manifest.json @@ -0,0 +1 @@ +{"counts":{"arc_count":344771,"entity_count":17456,"group_count":255993,"posting_count":38449,"provenance_count":961910,"provenance_ref_count":961910,"state_count":344772,"surface_count":255993},"file":"25k.fst","file_bytes":88719458,"file_sha256":"8c475118384a0feeeeac8ea8296100674e55716d838d1eb3397b3e758efbb095","header_sha256":"4d55f33a73bd1613a51336f2edfd3f3776889358402f7af830d94d0f6d1f0af8","root_sha256":"741fcd88132db00fbda710147d446bb0bae6427ac657c49ef8ccc79de7220ed0","schema_version":"aethersparse.exact-address-index-manifest.v12","sealed_partitions_excluded":["evaluation","final_held"],"source_artifact_sha256":"80b81ab8e4c743b8bb3f94d25127f5c7510f9c51e2bf61dd22cf22c7336b9aac","source_partitions":["fit"]} diff --git a/exact/397k.fst b/exact/397k.fst new file mode 100644 index 0000000000000000000000000000000000000000..e23c96813bf45465384d7165eef834044381f51f --- /dev/null +++ b/exact/397k.fst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a97990708f6fe6e0d3904b531a748f1f9a8e873607caaa5ef77cc5cab916acae +size 586354089 diff --git a/exact/397k.fst.manifest.json b/exact/397k.fst.manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..d42642d56ce1d82b3fc580c0281d51a4cf341375 --- /dev/null +++ b/exact/397k.fst.manifest.json @@ -0,0 +1 @@ +{"counts":{"arc_count":1802270,"entity_count":275989,"group_count":1334801,"posting_count":568940,"provenance_count":6493604,"provenance_ref_count":6493604,"state_count":1802271,"surface_count":1334801},"file":"397k.fst","file_bytes":586354089,"file_sha256":"a97990708f6fe6e0d3904b531a748f1f9a8e873607caaa5ef77cc5cab916acae","header_sha256":"15b4ed9b4177260f7d1be4caed88f5a16d8fa67fd8efbcc59644126f92203023","root_sha256":"fb609c13ddcfb37a83f90f527da2b5f1e7d8b5e51efab29d9adf49e826ac7c2c","schema_version":"aethersparse.exact-address-index-manifest.v12","sealed_partitions_excluded":["evaluation","final_held"],"source_artifact_sha256":"8c1d20c20a2ffa2c79a6e4b541a143da6b38f2da414c00a10159b3b4b30a2c21","source_partitions":["fit"]} diff --git a/semantic-address-v2-targeted.manifest.json b/semantic-address-v2-targeted.manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..426aaf03759271be361906ac940d6f545454746e --- /dev/null +++ b/semantic-address-v2-targeted.manifest.json @@ -0,0 +1,263 @@ +{ + "file_count": 51, + "files": [ + { + "bytes": 13003, + "file": "V12_FACTORY_COMPLETION_REPORT.md", + "sha256": "e7c97ac5506f5757864e3e825d51f2397fccc6e9ee27058cea8f85f517b383d2" + }, + { + "bytes": 815991, + "file": "address/10k/aliases.jsonl.gz", + "sha256": "cdffbd89a28e6dac0ad9d857003dd21cf2010a3319782b9b02bcff505d2fdfff" + }, + { + "bytes": 903076, + "file": "address/10k/entities.jsonl.gz", + "sha256": "2c693340c192a14e88309bbeb250b9dad507c5c5ef0daa65818de46cd4cbdb5d" + }, + { + "bytes": 4432, + "file": "address/10k/manifest.json", + "sha256": "07eb4a8796bacbb1fd5de08e96f9a0303ba2e792e3434d003e21559d8862404f" + }, + { + "bytes": 146840951, + "file": "address/10k/occurrences.jsonl.gz", + "sha256": "5027fdc509223c60c988d34da15e5700efe88b55c5d164c4b63c8776a32f70ca" + }, + { + "bytes": 43203, + "file": "address/10k/quarantine.jsonl.gz", + "sha256": "81a3df61313c24898bc1772194c7c0f946341ec55676e047f6e245a495d749f7" + }, + { + "bytes": 293528, + "file": "address/10k/redirects.jsonl.gz", + "sha256": "e24579a285f6cc546d85a1179bbb5e0c5e9d8b7e77610547584c0ebf65857dac" + }, + { + "bytes": 31618543, + "file": "address/10k/surface_statistics.jsonl.gz", + "sha256": "62da348c4b0838b4f94709096bc83bbba3d6a8cb909d16c6190159410ea0646a" + }, + { + "bytes": 2069326, + "file": "address/25k/aliases.jsonl.gz", + "sha256": "dfc292ce8636d029e35f184beee91489b1397df06e60fb6b2748102db4ab7359" + }, + { + "bytes": 2134203, + "file": "address/25k/entities.jsonl.gz", + "sha256": "1b9ef33732779908ccbe9a60f2d2c3df37494d82ceb355a4324250523738a3cf" + }, + { + "bytes": 4453, + "file": "address/25k/manifest.json", + "sha256": "80b81ab8e4c743b8bb3f94d25127f5c7510f9c51e2bf61dd22cf22c7336b9aac" + }, + { + "bytes": 223065087, + "file": "address/25k/occurrences.jsonl.gz", + "sha256": "df64cc024f3e1a2be1a7602ac5507a322cfc951cdfab1bbf6455147f7cea184a" + }, + { + "bytes": 93479, + "file": "address/25k/quarantine.jsonl.gz", + "sha256": "3d1ce308030ec0a4023a8180f729c5e144eb3582f0b82a6dd0882e7634673e2c" + }, + { + "bytes": 878881, + "file": "address/25k/redirects.jsonl.gz", + "sha256": "106a90ff1f2b3839e83435f1606116a5711a3c19e68f233f8d8905e484274124" + }, + { + "bytes": 47447375, + "file": "address/25k/surface_statistics.jsonl.gz", + "sha256": "002b2006dc74c93e92279a731a8c7b705af84b1ee2c797df2aa24e517c18b4af" + }, + { + "bytes": 34113824, + "file": "address/397k/aliases.jsonl.gz", + "sha256": "157dc7afcf59f0a758c5df2835b1863fa7a74cc8d778eee7adc80fbef9ca024a" + }, + { + "bytes": 34529975, + "file": "address/397k/entities.jsonl.gz", + "sha256": "9e373c7fe1b7d16e79a4f9a82a73ce65e94510c8f9dd21276fa2283384eded6d" + }, + { + "bytes": 4501, + "file": "address/397k/manifest.json", + "sha256": "8c1d20c20a2ffa2c79a6e4b541a143da6b38f2da414c00a10159b3b4b30a2c21" + }, + { + "bytes": 1533123748, + "file": "address/397k/occurrences.jsonl.gz", + "sha256": "4dbeaa076f23726818bb111e5c9e8b24be74b2abdbfd3b442bf8324cf6700db1" + }, + { + "bytes": 1292111, + "file": "address/397k/quarantine.jsonl.gz", + "sha256": "af3c3974924ca19a86d3f3997376ffcfc938ab52daeca92bbe310185fe2de971" + }, + { + "bytes": 14440710, + "file": "address/397k/redirects.jsonl.gz", + "sha256": "57feef8ccde4dc219ce8279c464ae01bf7ebd600cdb0cf423ccffc2f6454aec6" + }, + { + "bytes": 255884007, + "file": "address/397k/surface_statistics.jsonl.gz", + "sha256": "406a18e6b1738ff38ae44ecb1bb8fcaf9de0bd2b9f244c87a40d6eb16b6e1dfe" + }, + { + "bytes": 1845, + "file": "benchmark/10k/benchmark-manifest.json", + "sha256": "565a784e25cb3e30460d2f61a3f8099a96471759e85e92764a7d5a47e937e033" + }, + { + "bytes": 2184, + "file": "benchmark/10k/development_labels.jsonl.gz", + "sha256": "66b3600c5383d9e9331728830534819d86d0de34e7e4c6d50a77271d34f8aa3e" + }, + { + "bytes": 11123, + "file": "benchmark/10k/quarantine.jsonl.gz", + "sha256": "f89d15632eede65c6494a0d25fad20696b40b5d16519c03773f02c5bf34c5783" + }, + { + "bytes": 69446, + "file": "benchmark/10k/runtime.jsonl.gz", + "sha256": "1e599369b71a0e94a3a65953d872a021732be8bcb4ba3bdcacbbd8c24b64f6f2" + }, + { + "bytes": 2184, + "file": "benchmark/10k/tuning_labels.jsonl.gz", + "sha256": "ac7a0f626c7c8545620ae37cb96103958731119fc255e37ea0dd139dc63d35cd" + }, + { + "bytes": 1849, + "file": "benchmark/25k/benchmark-manifest.json", + "sha256": "f5231357da14c94fd777a26751820889d573083776dbdb50b99398d6994697df" + }, + { + "bytes": 3162, + "file": "benchmark/25k/development_labels.jsonl.gz", + "sha256": "69d23e09409a21925273d0649cc67c6a09625e0b2df8c68ef3d0e88f8d488302" + }, + { + "bytes": 13367, + "file": "benchmark/25k/quarantine.jsonl.gz", + "sha256": "57285abbda2575f1be1d5c87bdfcbf44410e5c4297fdb931d20e839658c53c8f" + }, + { + "bytes": 134601, + "file": "benchmark/25k/runtime.jsonl.gz", + "sha256": "e42f76abe5992fe8c32a73d48b518aac1b7e6bf161b05783e1a9e0e46e4e3ee1" + }, + { + "bytes": 4149, + "file": "benchmark/25k/tuning_labels.jsonl.gz", + "sha256": "90efb0784fc3711ce900116b2183a8af2605c5172c74a6df8f9efd4a98730df7" + }, + { + "bytes": 1893, + "file": "benchmark/397k/benchmark-manifest.json", + "sha256": "889991893f85f6c9ef867b4f4c8ade796315fc0ccfe4bec5a0326d0058dbf323" + }, + { + "bytes": 2693, + "file": "benchmark/397k/development_labels.jsonl.gz", + "sha256": "069aa6e9d78fc9c5fc892bd06ce94a5d7846933476e731c8137fbe18c54bdfeb" + }, + { + "bytes": 21166, + "file": "benchmark/397k/quarantine.jsonl.gz", + "sha256": "c485faff001b4d1f680241fcf104cdbc07115ef564aa1f4fb832de10aa0bb0d7" + }, + { + "bytes": 930994, + "file": "benchmark/397k/runtime.jsonl.gz", + "sha256": "c6cd9b08501fd315178be16f3fe777d8c39bef4321ff718774d3862ab64262b6" + }, + { + "bytes": 4198, + "file": "benchmark/397k/tuning_labels.jsonl.gz", + "sha256": "5739985dfdb7ddde354320cc6e7002f3094fefc3a705a5a7cedf63ac06573272" + }, + { + "bytes": 70723, + "file": "capture/10k.jsonl.gz", + "sha256": "55bdb50a674b317540cd22fff6acacf4188d4f7b45081165e822a9f32b99396b" + }, + { + "bytes": 983, + "file": "capture/10k.jsonl.gz.manifest.json", + "sha256": "5b0fe06b2729e289cd0567d0c2bbd5a8d21d10d689e5bde3e0331708092654e9" + }, + { + "bytes": 135013, + "file": "capture/25k.jsonl.gz", + "sha256": "2da5e1a752af2b54d35f30d6be3b7b9cf8b7b8a1979494f752f48c8a67e77ac4" + }, + { + "bytes": 985, + "file": "capture/25k.jsonl.gz.manifest.json", + "sha256": "cc007562e7d253fc0ff7461d60ef790633b974b19d09cce27d206e981debd52c" + }, + { + "bytes": 933378, + "file": "capture/397k.jsonl.gz", + "sha256": "df9dcb89b265097869544162007e3e2cc33175b5f340b0a6bdf79a86c3fb5453" + }, + { + "bytes": 988, + "file": "capture/397k.jsonl.gz.manifest.json", + "sha256": "da5d0c0b577f5bf00eeab8400f6b2cdbcd055c5a226b407c2ea871b752012ee8" + }, + { + "bytes": 59152692, + "file": "exact/10k.fst", + "sha256": "7e68da960ab828ceccf08eab7ff08162aa90c914541a75c3ba8484046f433e76" + }, + { + "bytes": 721, + "file": "exact/10k.fst.manifest.json", + "sha256": "78e71800c167564df9005cae9c41ca61c78e7b6bddf3b1429a472cd0e3127992" + }, + { + "bytes": 88719458, + "file": "exact/25k.fst", + "sha256": "8c475118384a0feeeeac8ea8296100674e55716d838d1eb3397b3e758efbb095" + }, + { + "bytes": 722, + "file": "exact/25k.fst.manifest.json", + "sha256": "adfe52056d3a5536bb4681afa0d6d8e881f44d481592cec4cfa7a0f979e3b331" + }, + { + "bytes": 586354089, + "file": "exact/397k.fst", + "sha256": "a97990708f6fe6e0d3904b531a748f1f9a8e873607caaa5ef77cc5cab916acae" + }, + { + "bytes": 732, + "file": "exact/397k.fst.manifest.json", + "sha256": "a8e6b922f20c0b059d8b2cb231d407315aedef2fe4830110a01cbfb6170b6c72" + }, + { + "bytes": 46526, + "file": "source-patch/0001-0004-v12-factory-repairs.patch", + "sha256": "3b064accbfcdc69c759a4739696acefa21eb849eaa9239a31f3cf8c68c3219fb" + }, + { + "bytes": 41, + "file": "source-patch/COMMIT.txt", + "sha256": "af99712fa1e8bd7c799359dd431f2b122244932421ecdd18a9788c85e9dd9a04" + } + ], + "raw_corpus_pack_included": false, + "schema_version": "aethersparse.semantic-address-v2-factory-handoff.v1", + "sealed_partition_labels_included": false +} diff --git a/source-patch/0001-0004-v12-factory-repairs.patch b/source-patch/0001-0004-v12-factory-repairs.patch new file mode 100644 index 0000000000000000000000000000000000000000..f77cc895487d02145ab98e560b43e59b55c9bf88 --- /dev/null +++ b/source-patch/0001-0004-v12-factory-repairs.patch @@ -0,0 +1,1021 @@ +From 94761914e5e30e7588c6c5224d3748cd1cd285fb Mon Sep 17 00:00:00 2001 +From: factory-droid <138933559+factory-droid[bot]@users.noreply.github.com> +Date: Wed, 19 Aug 2026 22:04:49 -0500 +Subject: [PATCH 1/4] v12: repair pack-normalization authority and cross-tier + benchmark export + +Factory Mission 7 continuation repairs (generic, fail-closed): + +1. Canonical registry + compiler now treat the pack's stored + normalized_title as authoritative under the pack's declared + corpus_meta normalization_id (verified, fail-closed when absent or + undeclared). Lookup-side title/alias/anchor resolution uses the + declared v050 normalizer instead of the generic surface contract, + fixing the en-dash fold class (9/7455 10k entities) and making the + entities-loop redirect follows consistent with the redirects stream + (6 quarantined redirects recovered). +2. Exact-index evidence skips unresolved occurrences whose surface + normalizes to empty (whitespace-only piped-link displays); resolved + empty-surface rows remain a hard failure. Rows stay preserved in the + occurrences stream and surface_statistics. +3. export_v11_benchmark_capture selects the unique requested-tier + replica internally; absent or duplicate requested-tier replicas are + excluded and counted, never guessed. Cross-tier freezes no longer + require external projections. + +Regression tests: tests/addressing/test_v050_pack_normalization.py + +Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> +--- + .../semantic-address-v2-manifest.schema.json | 3 +- + src/aethersparse/addressing/bundle_v2.py | 47 ++- + src/aethersparse/addressing/compiler_v2.py | 75 +++- + src/aethersparse/addressing/contracts_v2.py | 28 +- + .../addressing/factory_export_v2.py | 30 +- + tests/addressing/test_compiler_v2.py | 10 + + .../test_v050_pack_normalization.py | 330 ++++++++++++++++++ + 7 files changed, 495 insertions(+), 28 deletions(-) + create mode 100644 tests/addressing/test_v050_pack_normalization.py + +diff --git a/schemas/semantic-address-v2-manifest.schema.json b/schemas/semantic-address-v2-manifest.schema.json +index f5973d8..74ff6e4 100644 +--- a/schemas/semantic-address-v2-manifest.schema.json ++++ b/schemas/semantic-address-v2-manifest.schema.json +@@ -3,13 +3,14 @@ + "$id": "https://github.com/ag1357/AetherSparse/schemas/semantic-address-v2-manifest.schema.json", + "title": "AetherSparse Semantic Address Plane v2 manifest", + "type": "object", +- "required": ["schema_version", "source_pack_sha256", "source_pack_bytes", "corpus_tier", "sqlite_user_version", "split_policy", "counts", "views", "streams"], ++ "required": ["schema_version", "source_pack_sha256", "source_pack_bytes", "corpus_tier", "sqlite_user_version", "normalization_id", "split_policy", "counts", "views", "streams"], + "properties": { + "schema_version": {"const": "aethersparse.semantic-address-manifest.v2"}, + "source_pack_sha256": {"$ref": "#/$defs/sha256"}, + "source_pack_bytes": {"type": "integer", "minimum": 1}, + "corpus_tier": {"type": "string", "minLength": 1}, + "sqlite_user_version": {"const": 500}, ++ "normalization_id": {"const": "nfkc-html-punctuation-whitespace-v050-v1"}, + "split_policy": { + "type": "object", + "required": ["unit", "hash", "fit_buckets", "calibration_buckets", "holdout_buckets", "benchmark_partitions_used"], +diff --git a/src/aethersparse/addressing/bundle_v2.py b/src/aethersparse/addressing/bundle_v2.py +index fb41c2c..6f2f01e 100644 +--- a/src/aethersparse/addressing/bundle_v2.py ++++ b/src/aethersparse/addressing/bundle_v2.py +@@ -17,8 +17,10 @@ from aethersparse.addressing.compiler_v2 import ( + ) + from aethersparse.addressing.contracts_v2 import ( + ADDRESS_MANIFEST_SCHEMA_VERSION, ++ V050_PACK_NORMALIZATION_ID, + canonical_entity_id, + normalize_surface, ++ pack_lookup_normalizer, + validate_record_contract, + ) + from aethersparse.addressing.exact import ( +@@ -110,10 +112,10 @@ class CanonicalAddressRegistry: + normalized_titles: set[str] = set() + source_documents: set[str] = set() + for entry in self.entries: +- if entry.entity_id != canonical_entity_id(entry.canonical_title): ++ if not entry.normalized_title: ++ raise ValueError("canonical registry normalized title is empty") ++ if entry.entity_id != canonical_entity_id(entry.normalized_title): + raise ValueError("canonical registry ID/title authority is inconsistent") +- if entry.normalized_title != normalize_surface(entry.canonical_title): +- raise ValueError("canonical registry normalized title is inconsistent") + if ( + entry.entity_id in entity_ids + or entry.normalized_title in normalized_titles +@@ -193,9 +195,20 @@ def _verified_rows(directory: Path, stream: str) -> Iterator[dict[str, object]]: + def load_canonical_registry( + directory: Path, *, expected_bundle: AddressBundleIdentity | None = None + ) -> CanonicalAddressRegistry: +- """Load and strictly verify the sole canonical ID/title authority.""" ++ """Load and strictly verify the sole canonical ID/title authority. ++ ++ The bundle's declared ``normalization_id`` is verified by ++ :func:`verify_address_bundle` before any row is read. Under that declared ++ normalization the pack's stored ``normalized_title`` is the authoritative ++ normalized value, so canonical IDs are recomputed from the stored ++ ``normalized_title`` — not by re-normalizing the raw title under the ++ generic surface contract, which does not fold the v0.5 punctuation class ++ (for example U+2013 EN DASH to hyphen). All integrity checks remain ++ fail-closed. ++ """ + + bundle = verify_address_bundle(directory, expected=expected_bundle) ++ normalize_lookup = pack_lookup_normalizer(V050_PACK_NORMALIZATION_ID) + entries: list[CanonicalRegistryEntry] = [] + entity_ids: set[str] = set() + normalized_titles: set[str] = set() +@@ -205,10 +218,14 @@ def load_canonical_registry( + title = str(row["title"]) + normalized_title = str(row["normalized_title"]) + source_document_id = str(row["document_id"]) +- if entity_id != canonical_entity_id(title): ++ if not normalized_title: ++ raise AddressArtifactError(f"canonical normalized title is empty: {entity_id}") ++ if entity_id != canonical_entity_id(normalized_title): + raise AddressArtifactError(f"canonical entity ID/title mismatch: {entity_id}") +- if normalized_title != normalize_surface(title): +- raise AddressArtifactError(f"canonical normalized title mismatch: {entity_id}") ++ if normalized_title != normalize_lookup(title): ++ raise AddressArtifactError( ++ f"canonical title/normalization mismatch: {entity_id}" ++ ) + if entity_id in entity_ids or normalized_title in normalized_titles: + raise AddressArtifactError("canonical registry contains a duplicate ID or title") + if source_document_id in source_documents: +@@ -344,8 +361,22 @@ def iter_exact_address_evidence( + if str(row["source_split"]) not in splits: + continue + entity_id, title = _require_registry_pair(registry, row) ++ surface = str(row["mention"]) ++ if not normalize_surface(surface): ++ # A mention that normalizes to empty (for example a whitespace-only ++ # piped-link display) can never be an exact lookup key, so the ++ # index cannot hold it. The row stays fully preserved in the ++ # occurrences stream and its unresolved mass stays visible in ++ # surface_statistics. A *resolved* occurrence with an empty ++ # surface would mean producer corruption: fail closed. ++ if entity_id is not None: ++ raise AddressArtifactError( ++ "resolved occurrence has an empty normalized surface: " ++ f"{row['record_id']}" ++ ) ++ continue + yield AddressEvidence( +- surface=str(row["mention"]), ++ surface=surface, + entity_id=entity_id, + canonical_title=title, + support_count=1, +diff --git a/src/aethersparse/addressing/compiler_v2.py b/src/aethersparse/addressing/compiler_v2.py +index 94463a2..1ece798 100644 +--- a/src/aethersparse/addressing/compiler_v2.py ++++ b/src/aethersparse/addressing/compiler_v2.py +@@ -16,7 +16,7 @@ import re + import sqlite3 + import tempfile + from collections import Counter +-from collections.abc import Iterable, Iterator, Mapping ++from collections.abc import Callable, Iterable, Iterator, Mapping + from contextlib import suppress + from dataclasses import asdict, dataclass + from pathlib import Path +@@ -31,9 +31,15 @@ from aethersparse.addressing.contracts_v2 import ( + from aethersparse.addressing.contracts_v2 import ( + canonical_entity_id as canonical_entity_id, + ) ++from aethersparse.addressing.contracts_v2 import ( ++ V050_PACK_NORMALIZATION_ID as V050_PACK_NORMALIZATION_ID, ++) + from aethersparse.addressing.contracts_v2 import ( + normalize_surface as normalize_surface, + ) ++from aethersparse.addressing.contracts_v2 import ( ++ pack_lookup_normalizer, ++) + from aethersparse.addressing.contracts_v2 import ( + validate_record_contract, + with_stable_record_id, +@@ -81,6 +87,7 @@ class AddressExportManifest: + source_pack_bytes: int + corpus_tier: str + sqlite_user_version: int ++ normalization_id: str + split_policy: Mapping[str, object] + counts: Mapping[str, int] + views: Mapping[str, object] +@@ -180,6 +187,42 @@ def _open_source(path: Path) -> sqlite3.Connection: + return connection + + ++def pack_normalization_id(connection: sqlite3.Connection) -> str: ++ """Return the source pack's declared corpus_meta normalization_id. ++ ++ The declared normalization is required: without it the compiler cannot ++ prove that lookup-side normalization matches the pack's stored ++ normalized columns, so any pack that cannot declare it fails closed. ++ """ ++ ++ try: ++ row = connection.execute( ++ "SELECT value FROM corpus_meta WHERE key='normalization_id'" ++ ).fetchone() ++ except sqlite3.Error as error: ++ raise AddressArtifactError( ++ "source pack lacks corpus_meta normalization_id" ++ ) from error ++ if row is None: ++ raise AddressArtifactError("source pack lacks corpus_meta normalization_id") ++ try: ++ value = json.loads(str(row[0])) ++ except json.JSONDecodeError as error: ++ raise AddressArtifactError("corpus_meta normalization_id is not JSON") from error ++ if not isinstance(value, str) or not value: ++ raise AddressArtifactError("corpus_meta normalization_id is not a string") ++ return value ++ ++ ++def pack_lookup_normalize(connection: sqlite3.Connection) -> Callable[[str], str]: ++ """Return the pack-declared lookup normalizer, failing closed if undeclared.""" ++ ++ try: ++ return pack_lookup_normalizer(pack_normalization_id(connection)) ++ except ValueError as error: ++ raise AddressArtifactError(str(error)) from error ++ ++ + def _documents(connection: sqlite3.Connection) -> Iterator[_Document]: + rows = connection.execute( + """SELECT document_id,title,normalized_title,redirect_target, +@@ -190,7 +233,7 @@ def _documents(connection: sqlite3.Connection) -> Iterator[_Document]: + yield _Document( + document_id=str(row["document_id"]), + title=str(row["title"]), +- normalized_title=normalize_surface(str(row["normalized_title"])), ++ normalized_title=str(row["normalized_title"]), + redirect_target=(str(row["redirect_target"]) if row["redirect_target"] else None), + source_text_sha256=str(row["source_text_sha256"]), + ) +@@ -207,8 +250,12 @@ def _resolution_index( + return ({key: tuple(value) for key, value in by_title.items()}, by_id) + + +-def _resolve_target(title: str, by_title: Mapping[str, tuple[_Document, ...]]) -> _ResolvedTarget: +- current = normalize_surface(title.split("#", 1)[0]) ++def _resolve_target( ++ title: str, ++ by_title: Mapping[str, tuple[_Document, ...]], ++ normalize_lookup: Callable[[str], str], ++) -> _ResolvedTarget: ++ current = normalize_lookup(title.split("#", 1)[0]) + path: list[str] = [] + seen: set[str] = set() + while True: +@@ -223,7 +270,7 @@ def _resolve_target(title: str, by_title: Mapping[str, tuple[_Document, ...]]) - + return _ResolvedTarget(None, None, "ambiguous", tuple(path)) + document = rows[0] + if document.redirect_target: +- current = normalize_surface(document.redirect_target.split("#", 1)[0]) ++ current = normalize_lookup(document.redirect_target.split("#", 1)[0]) + continue + return _ResolvedTarget( + canonical_entity_id(document.normalized_title), +@@ -309,6 +356,8 @@ def compile_address_pack( + connection = _open_source(source_pack) + writers: dict[str, _DeterministicGzipWriter] = {} + try: ++ normalization_id = pack_normalization_id(connection) ++ normalize_lookup = pack_lookup_normalize(connection) + by_title, by_id = _resolution_index(_documents(connection)) + writers = { + name: _DeterministicGzipWriter(output_directory / f"{name}.jsonl.gz") +@@ -357,7 +406,7 @@ def compile_address_pack( + counts["duplicate_title_groups"] += 1 + continue + document = rows[0] +- resolved = _resolve_target(document.normalized_title, by_title) ++ resolved = _resolve_target(document.normalized_title, by_title, normalize_lookup) + if resolved.entity_id is None: + if document.redirect_target: + writers["quarantine"].write( +@@ -390,7 +439,7 @@ def compile_address_pack( + ) + for row in alias_rows: + document = by_id[str(row["document_id"])] +- resolved = _resolve_target(document.normalized_title, by_title) ++ resolved = _resolve_target(document.normalized_title, by_title, normalize_lookup) + writers["aliases"].write( + { + "schema_version": ADDRESS_EXPORT_SCHEMA_VERSION, +@@ -410,7 +459,7 @@ def compile_address_pack( + FROM redirects ORDER BY source_document_id""" + ) + for row in redirect_rows: +- resolved = _resolve_target(str(row["target_title"]), by_title) ++ resolved = _resolve_target(str(row["target_title"]), by_title, normalize_lookup) + writers["redirects"].write( + { + "schema_version": ADDRESS_EXPORT_SCHEMA_VERSION, +@@ -464,7 +513,7 @@ def compile_address_pack( + f"mention offsets do not copy source text: {row['anchor_id']}" + ) + normalized_mention = normalize_surface(str(row["anchor_text"] or exact_mention)) +- resolved = _resolve_target(str(row["target_title"]), by_title) ++ resolved = _resolve_target(str(row["target_title"]), by_title, normalize_lookup) + split = _source_split(source.document_id) + context_start = max(0, mention_start - context_characters) + context_end = min(len(raw_wikitext), mention_end + context_characters) +@@ -638,6 +687,7 @@ def compile_address_pack( + source_pack_bytes=source_bytes, + corpus_tier=corpus_tier, + sqlite_user_version=500, ++ normalization_id=normalization_id, + split_policy={ + "unit": "source_document_id", + "hash": "sha256-first-32-bits-mod-100", +@@ -751,12 +801,19 @@ def verify_address_export(directory: Path) -> AddressExportManifest: + or sqlite_version != 500 + ): + raise AddressArtifactError("manifest source dimensions are malformed") ++ normalization_id = raw.get("normalization_id") ++ if normalization_id != V050_PACK_NORMALIZATION_ID: ++ raise AddressArtifactError( ++ f"manifest normalization_id must be {V050_PACK_NORMALIZATION_ID!r}: " ++ f"{normalization_id!r}" ++ ) + return AddressExportManifest( + schema_version=ADDRESS_MANIFEST_SCHEMA_VERSION, + source_pack_sha256=source_hash, + source_pack_bytes=source_bytes, + corpus_tier=str(raw["corpus_tier"]), + sqlite_user_version=500, ++ normalization_id=V050_PACK_NORMALIZATION_ID, + split_policy=split_policy, + counts={str(key): int(value) for key, value in counts.items()}, + views=views, +diff --git a/src/aethersparse/addressing/contracts_v2.py b/src/aethersparse/addressing/contracts_v2.py +index a976eef..8791fcb 100644 +--- a/src/aethersparse/addressing/contracts_v2.py ++++ b/src/aethersparse/addressing/contracts_v2.py +@@ -7,7 +7,7 @@ import json + import math + import re + import unicodedata +-from collections.abc import Mapping ++from collections.abc import Callable, Mapping + from enum import StrEnum + from typing import Any + +@@ -53,6 +53,32 @@ def normalize_surface(value: str) -> str: + return " ".join(unicodedata.normalize("NFKC", value.replace("_", " ")).casefold().split()) + + ++V050_PACK_NORMALIZATION_ID = "nfkc-html-punctuation-whitespace-v050-v1" ++ ++ ++def pack_lookup_normalizer(normalization_id: str) -> Callable[[str], str]: ++ """Return the lookup normalizer declared by a canonical source pack. ++ ++ A canonical pack's stored ``normalized_title``, ``alias``, and ++ ``anchor_text`` columns are the authoritative normalized values under the ++ pack's declared ``normalization_id``. Every lookup into those columns ++ (title resolution, alias/anchor candidate channels) must normalize the ++ query side with the same declared normalization; the generic ++ :func:`normalize_surface` contract does not fold the v0.5 punctuation ++ class (for example U+2013 EN DASH to hyphen) and must not be substituted ++ for it. Any undeclared ``normalization_id`` fails closed. ++ """ ++ ++ if normalization_id != V050_PACK_NORMALIZATION_ID: ++ raise ValueError(f"undeclared source pack normalization: {normalization_id!r}") ++ from aethersparse.real_corpus.builder import normalize_text ++ ++ def normalize(value: str) -> str: ++ return normalize_text(value).casefold() ++ ++ return normalize ++ ++ + def canonical_entity_id(title: str) -> str: + """Mint a corpus-band ID from an authoritative canonical title.""" + +diff --git a/src/aethersparse/addressing/factory_export_v2.py b/src/aethersparse/addressing/factory_export_v2.py +index 0134c14..fc4e726 100644 +--- a/src/aethersparse/addressing/factory_export_v2.py ++++ b/src/aethersparse/addressing/factory_export_v2.py +@@ -17,8 +17,8 @@ from aethersparse.addressing.compiler_v2 import ( + _open_source, + _resolution_index, + _resolve_target, ++ pack_lookup_normalize, + ) +-from aethersparse.addressing.contracts_v2 import normalize_surface + + _TRAINING = frozenset({"development", "tuning"}) + _CHANNEL_ORDER = {"title": 0, "redirect": 1, "alias": 2, "anchor": 3} +@@ -81,8 +81,12 @@ def _proposals( + connection: sqlite3.Connection, + surface: str, + by_title: dict[str, tuple[Any, ...]], ++ normalize_lookup: Any, + ) -> list[dict[str, object]]: +- normalized = normalize_surface(surface) ++ # The pack's alias/anchor_text columns are stored under the pack's declared ++ # normalization_id, so the query side must use that same declared ++ # normalization rather than the generic surface contract. ++ normalized = normalize_lookup(surface) + proposals: dict[tuple[str, str], dict[str, object]] = {} + aliases = connection.execute( + """SELECT a.kind,d.document_id,d.normalized_title,d.redirect_target +@@ -91,7 +95,7 @@ def _proposals( + (normalized,), + ) + for row in aliases: +- resolved = _resolve_target(str(row["normalized_title"]), by_title) ++ resolved = _resolve_target(str(row["normalized_title"]), by_title, normalize_lookup) + if resolved.entity_id is None: + continue + if row["redirect_target"]: +@@ -123,7 +127,7 @@ def _proposals( + ).fetchall() + anchor_total = len(anchors) + for row in anchors: +- resolved = _resolve_target(str(row["target_title"]), by_title) ++ resolved = _resolve_target(str(row["target_title"]), by_title, normalize_lookup) + if resolved.entity_id is None: + continue + key = (resolved.entity_id, "anchor") +@@ -193,6 +197,7 @@ def export_v11_benchmark_capture( + corpus = _load(hard_negatives) + connection = _open_source(pack) + try: ++ normalize_lookup = pack_lookup_normalize(connection) + by_title_raw, _by_id = _resolution_index(_documents(connection)) + by_title = dict(by_title_raw) + rows: list[dict[str, object]] = [] +@@ -205,15 +210,22 @@ def export_v11_benchmark_capture( + raise AddressArtifactError(f"sealed partition in hard negatives: {partition}") + query = str(case.get("query", "")) + correct = [str(item) for item in case.get("correct_entity_ids", ())] ++ # Select the unique replica for the requested tier inside the ++ # exporter. A cross-tier freeze is lawful input: cases with no ++ # replica at this tier, or with duplicates, are excluded and ++ # counted rather than aborting the export or guessing an ++ # alignment from another tier's replica. + replicas = [ + item + for item in case.get("replicas", ()) + if isinstance(item, dict) and item.get("corpus_tier") == corpus_tier + ] +- if len(replicas) != 1: +- raise AddressArtifactError( +- f"case does not have exactly one {corpus_tier} replica: {case.get('case_id')}" +- ) ++ if not replicas: ++ counts["cases_excluded_absent_requested_tier_replica"] += 1 ++ continue ++ if len(replicas) > 1: ++ counts["cases_excluded_duplicate_requested_tier_replica"] += 1 ++ continue + mentions = replicas[0].get("mentions", ()) + if not isinstance(mentions, list): + raise AddressArtifactError("replica mention list is malformed") +@@ -230,7 +242,7 @@ def export_v11_benchmark_capture( + end = int(mention.get("char_end", -1)) + if start < 0 or end < start or query[start:end] != surface: + raise AddressArtifactError("mention offsets do not copy query text") +- proposals = _proposals(connection, surface, by_title) ++ proposals = _proposals(connection, surface, by_title, normalize_lookup) + retained_candidates = mention.get("candidates", ()) + if not isinstance(retained_candidates, list): + raise AddressArtifactError("retained candidate list is malformed") +diff --git a/tests/addressing/test_compiler_v2.py b/tests/addressing/test_compiler_v2.py +index 5a8ad9e..91a73c2 100644 +--- a/tests/addressing/test_compiler_v2.py ++++ b/tests/addressing/test_compiler_v2.py +@@ -102,8 +102,13 @@ def _pack(path: Path) -> None: + anchor_id TEXT,source_document_id TEXT,target_title TEXT,anchor_text TEXT, + raw_start INTEGER,raw_end INTEGER,raw_text TEXT,source_span_sha256 TEXT + ); ++ CREATE TABLE corpus_meta(key TEXT PRIMARY KEY,value TEXT); + """ + ) ++ db.execute( ++ "INSERT INTO corpus_meta VALUES('normalization_id',?)", ++ (json.dumps("nfkc-html-punctuation-whitespace-v050-v1"),), ++ ) + alpha = "Alpha links to [[Beta|B.]] and [[Missing]]." + beta = "Beta." + rows = [ +@@ -548,8 +553,13 @@ def _split_pack(path: Path) -> None: + anchor_id TEXT,source_document_id TEXT,target_title TEXT,anchor_text TEXT, + raw_start INTEGER,raw_end INTEGER,raw_text TEXT,source_span_sha256 TEXT + ); ++ CREATE TABLE corpus_meta(key TEXT PRIMARY KEY,value TEXT); + """ + ) ++ db.execute( ++ "INSERT INTO corpus_meta VALUES('normalization_id',?)", ++ (json.dumps("nfkc-html-punctuation-whitespace-v050-v1"),), ++ ) + source_text = { + "fit": "[[Alpha|Shared]] and [[Alpha|Shared]]", + "calibration": "[[Beta|Shared]]", +diff --git a/tests/addressing/test_v050_pack_normalization.py b/tests/addressing/test_v050_pack_normalization.py +new file mode 100644 +index 0000000..056cc9d +--- /dev/null ++++ b/tests/addressing/test_v050_pack_normalization.py +@@ -0,0 +1,330 @@ ++"""Regression tests for the v0.5 pack-normalization repairs. ++ ++The first real canonical-pack execution exposed two generic defects: ++ ++1. The canonical registry re-normalized raw titles with the generic surface ++ contract instead of trusting the pack's stored ``normalized_title`` under ++ the pack's declared ``normalization_id``. The v0.5 normalization folds ++ U+2013 EN DASH to hyphen; the generic contract does not, so nine real 10k ++ entities (for example "Castilla–La Mancha") failed verification. ++2. The v11 benchmark capture exporter aborted on the cross-tier hard-negative ++ freeze instead of selecting the unique requested-tier replica per case. ++""" ++ ++from __future__ import annotations ++ ++import gzip ++import hashlib ++import json ++import sqlite3 ++from pathlib import Path ++ ++import pytest ++ ++from aethersparse.addressing.bundle_v2 import ( ++ compile_verified_exact_address_index, ++ load_canonical_registry, ++) ++from aethersparse.addressing.compiler_v2 import ( ++ AddressArtifactError, ++ canonical_entity_id, ++ compile_address_pack, ++ iter_jsonl_gzip, ++ verify_address_export, ++) ++from aethersparse.addressing.contracts_v2 import ( ++ V050_PACK_NORMALIZATION_ID, ++ pack_lookup_normalizer, ++ with_stable_record_id, ++) ++from aethersparse.addressing.factory_export_v2 import export_v11_benchmark_capture ++ ++EN_DASH_TITLE = "Castilla–La Mancha" ++EN_DASH_NORMALIZED = "castilla-la mancha" # v0.5 folds U+2013 to hyphen ++ ++ ++def _fit_document_id(stem: str) -> str: ++ for index in range(10000): ++ value = f"{stem}:{index}" ++ bucket = int(hashlib.sha256(value.encode()).hexdigest()[:8], 16) % 100 ++ if bucket < 80: ++ return value ++ raise AssertionError("failed to construct fit document ID") ++ ++ ++def _dash_pack(path: Path) -> None: ++ """Minimal canonical-layout pack carrying the en-dash normalization class.""" ++ ++ db = sqlite3.connect(path) ++ db.executescript( ++ """ ++ PRAGMA user_version=500; ++ CREATE TABLE documents( ++ document_id TEXT PRIMARY KEY,title TEXT,normalized_title TEXT, ++ redirect_target TEXT,source_text_sha256 TEXT,raw_wikitext TEXT ++ ); ++ CREATE TABLE aliases(alias TEXT,document_id TEXT,kind TEXT); ++ CREATE TABLE redirects( ++ source_document_id TEXT,target_title TEXT,source_text_sha256 TEXT ++ ); ++ CREATE TABLE anchors( ++ anchor_id TEXT,source_document_id TEXT,target_title TEXT,anchor_text TEXT, ++ raw_start INTEGER,raw_end INTEGER,raw_text TEXT,source_span_sha256 TEXT ++ ); ++ CREATE TABLE corpus_meta(key TEXT PRIMARY KEY,value TEXT); ++ """ ++ ) ++ db.execute( ++ "INSERT INTO corpus_meta VALUES('normalization_id',?)", ++ (json.dumps(V050_PACK_NORMALIZATION_ID),), ++ ) ++ dash_id = _fit_document_id("doc:dash") ++ source_id = _fit_document_id("doc:source") ++ dash_text = "Castilla–La Mancha is a region." ++ source_text = "See [[Castilla–La Mancha|the region]] and [[Nowhere Real| ]] here." ++ db.executemany( ++ "INSERT INTO documents VALUES(?,?,?,?,?,?)", ++ [ ++ ( ++ dash_id, ++ EN_DASH_TITLE, ++ EN_DASH_NORMALIZED, ++ None, ++ hashlib.sha256(dash_text.encode()).hexdigest(), ++ dash_text, ++ ), ++ ( ++ source_id, ++ "Region Article", ++ "region article", ++ None, ++ hashlib.sha256(source_text.encode()).hexdigest(), ++ source_text, ++ ), ++ ], ++ ) ++ db.executemany( ++ "INSERT INTO aliases VALUES(?,?,?)", ++ [ ++ (EN_DASH_NORMALIZED, dash_id, "title"), ++ ("region article", source_id, "title"), ++ ], ++ ) ++ raw_link = "[[Castilla–La Mancha|the region]]" ++ start = source_text.index(raw_link) ++ db.execute( ++ "INSERT INTO anchors VALUES(?,?,?,?,?,?,?,?)", ++ ( ++ "anchor:dash:1", ++ source_id, ++ EN_DASH_TITLE, ++ "the region", ++ start, ++ start + len(raw_link), ++ raw_link, ++ hashlib.sha256(raw_link.encode()).hexdigest(), ++ ), ++ ) ++ # Whitespace-only piped-link display: a real corpus idiom whose normalized ++ # mention is empty and which can never serve as an exact lookup key. ++ empty_link = "[[Nowhere Real| ]]" ++ empty_start = source_text.index(empty_link) ++ db.execute( ++ "INSERT INTO anchors VALUES(?,?,?,?,?,?,?,?)", ++ ( ++ "anchor:empty:1", ++ source_id, ++ "Nowhere Real", ++ "", ++ empty_start, ++ empty_start + len(empty_link), ++ empty_link, ++ hashlib.sha256(empty_link.encode()).hexdigest(), ++ ), ++ ) ++ db.commit() ++ db.close() ++ ++ ++def _rewrite_stream( ++ directory: Path, name: str, mutate: object ++) -> None: ++ rows = list(iter_jsonl_gzip(directory / f"{name}.jsonl.gz")) ++ mutate(rows) # type: ignore[operator] ++ rows = [with_stable_record_id(row) for row in rows] ++ raw = b"".join( ++ (json.dumps(row, sort_keys=True, separators=(",", ":")) + "\n").encode() ++ for row in rows ++ ) ++ path = directory / f"{name}.jsonl.gz" ++ with ( ++ path.open("wb") as raw_stream, ++ gzip.GzipFile(filename="", mode="wb", fileobj=raw_stream, mtime=0) as stream, ++ ): ++ stream.write(raw) ++ manifest_path = directory / "manifest.json" ++ manifest = json.loads(manifest_path.read_text(encoding="utf-8")) ++ manifest["streams"][name] = { ++ "file": path.name, ++ "compressed_bytes": path.stat().st_size, ++ "gzip_sha256": hashlib.sha256(path.read_bytes()).hexdigest(), ++ "jsonl_bytes": len(raw), ++ "jsonl_sha256": hashlib.sha256(raw).hexdigest(), ++ "rows": len(rows), ++ } ++ manifest_path.write_text(json.dumps(manifest, indent=2, sort_keys=True) + "\n") ++ ++ ++def test_en_dash_entity_loads_and_resolves_canonical(tmp_path: Path) -> None: ++ pack = tmp_path / "pack.sqlite" ++ _dash_pack(pack) ++ ++ manifest = compile_address_pack(pack, tmp_path / "address", corpus_tier="fixture") ++ ++ assert manifest.normalization_id == V050_PACK_NORMALIZATION_ID ++ assert manifest.counts["occurrence_resolution_canonical"] == 1 ++ assert manifest.counts["occurrence_resolution_missing"] == 1 ++ ++ registry = load_canonical_registry(tmp_path / "address") ++ by_id = {entry.entity_id: entry for entry in registry.entries} ++ expected_id = canonical_entity_id(EN_DASH_NORMALIZED) ++ assert expected_id in by_id ++ assert by_id[expected_id].canonical_title == EN_DASH_TITLE ++ assert by_id[expected_id].normalized_title == EN_DASH_NORMALIZED ++ ++ # The exact-index path that the defect blocked now compiles end to end, ++ # skipping only the unqueryable empty-surface unresolved row. ++ artifact = compile_verified_exact_address_index( ++ tmp_path / "address", tmp_path / "exact.fst" ++ ) ++ assert artifact.total_bytes == (tmp_path / "exact.fst").stat().st_size ++ assert artifact.entity_count >= 2 ++ ++ # Both occurrences remain fully preserved in the export stream. ++ occurrences = list(iter_jsonl_gzip(tmp_path / "address" / "occurrences.jsonl.gz")) ++ assert len(occurrences) == 2 ++ empty = next(row for row in occurrences if row["anchor_id"] == "anchor:empty:1") ++ assert empty["mention"] == " " ++ assert empty["normalized_mention"] == "" ++ assert empty["resolution_state"] == "missing" ++ ++ ++def test_exact_index_fails_closed_on_resolved_empty_surface(tmp_path: Path) -> None: ++ pack = tmp_path / "pack.sqlite" ++ _dash_pack(pack) ++ # Retarget the whitespace-display anchor at an existing entity so the ++ # occurrence resolves: an empty exact key for a resolved entity is ++ # producer corruption and must remain a hard failure. ++ db = sqlite3.connect(pack) ++ db.execute( ++ "UPDATE anchors SET target_title=? WHERE anchor_id='anchor:empty:1'", ++ ("Region Article",), ++ ) ++ db.commit() ++ db.close() ++ compile_address_pack(pack, tmp_path / "address", corpus_tier="fixture") ++ with pytest.raises(AddressArtifactError, match="empty normalized surface"): ++ compile_verified_exact_address_index(tmp_path / "address", tmp_path / "exact.fst") ++ ++ ++def test_registry_rejects_wrong_derivation_and_tampered_ids(tmp_path: Path) -> None: ++ pack = tmp_path / "pack.sqlite" ++ _dash_pack(pack) ++ compile_address_pack(pack, tmp_path / "address", corpus_tier="fixture") ++ ++ def derive_from_raw_title(rows: list[dict[str, object]]) -> None: ++ for row in rows: ++ if row["document_id"].startswith("doc:dash"): ++ # The pre-repair derivation: canonical ID from the raw title. ++ row["entity_id"] = canonical_entity_id(str(row["title"])) ++ ++ _rewrite_stream(tmp_path / "address", "entities", derive_from_raw_title) ++ with pytest.raises(AddressArtifactError, match="canonical entity ID/title mismatch"): ++ load_canonical_registry(tmp_path / "address") ++ ++ ++def test_manifest_without_normalization_id_fails_closed(tmp_path: Path) -> None: ++ pack = tmp_path / "pack.sqlite" ++ _dash_pack(pack) ++ compile_address_pack(pack, tmp_path / "address", corpus_tier="fixture") ++ ++ manifest_path = tmp_path / "address" / "manifest.json" ++ manifest = json.loads(manifest_path.read_text(encoding="utf-8")) ++ del manifest["normalization_id"] ++ manifest_path.write_text(json.dumps(manifest, indent=2, sort_keys=True) + "\n") ++ ++ with pytest.raises(AddressArtifactError, match="normalization_id"): ++ verify_address_export(tmp_path / "address") ++ ++ ++def test_pack_lookup_normalizer_rejects_undeclared_normalization() -> None: ++ with pytest.raises(ValueError, match="undeclared source pack normalization"): ++ pack_lookup_normalizer("some-other-normalization") ++ ++ ++def test_export_selects_unique_requested_tier_replica(tmp_path: Path) -> None: ++ pack = tmp_path / "pack.sqlite" ++ _dash_pack(pack) ++ entity_id = canonical_entity_id(EN_DASH_NORMALIZED) ++ query = "Where is Castilla–La Mancha?" ++ start = query.index(EN_DASH_TITLE) ++ mention = { ++ "surface": EN_DASH_TITLE, ++ "char_start": start, ++ "char_end": start + len(EN_DASH_TITLE), ++ "selected_entity_id": entity_id, ++ "candidates": [{"entity_id": entity_id}], ++ } ++ document = { ++ "partition_counts": {"development": 2, "tuning": 1}, ++ "sealed_partitions_excluded": ["evaluation", "final_held"], ++ "cases": [ ++ { ++ "case_id": "case:unique", ++ "partition": "development", ++ "query": query, ++ "correct_entity_ids": [entity_id], ++ "replicas": [ ++ {"corpus_tier": "25k", "mentions": []}, ++ {"corpus_tier": "10k", "mentions": [mention]}, ++ ], ++ }, ++ { ++ "case_id": "case:absent", ++ "partition": "tuning", ++ "query": query, ++ "correct_entity_ids": [entity_id], ++ "replicas": [{"corpus_tier": "397k", "mentions": [mention]}], ++ }, ++ { ++ "case_id": "case:duplicate", ++ "partition": "development", ++ "query": query, ++ "correct_entity_ids": [entity_id], ++ "replicas": [ ++ {"corpus_tier": "10k", "mentions": [mention]}, ++ {"corpus_tier": "10k", "mentions": [mention]}, ++ ], ++ }, ++ ], ++ } ++ hard_negatives = tmp_path / "hard-negatives.json.gz" ++ with gzip.open(hard_negatives, "wt", encoding="utf-8") as stream: ++ json.dump(document, stream) ++ ++ result = export_v11_benchmark_capture( ++ pack=pack, ++ hard_negatives=hard_negatives, ++ corpus_tier="10k", ++ output=tmp_path / "capture.jsonl.gz", ++ ) ++ ++ assert result["counts"]["cases"] == 1 ++ assert result["counts"]["cases_excluded_absent_requested_tier_replica"] == 1 ++ assert result["counts"]["cases_excluded_duplicate_requested_tier_replica"] == 1 ++ rows = list(iter_jsonl_gzip(tmp_path / "capture.jsonl.gz")) ++ assert len(rows) == 1 ++ assert rows[0]["case_id"] == "case:unique" ++ assert rows[0]["partition"] == "development" ++ assert rows[0]["pre_cap_candidates"][0]["entity_id"] == entity_id ++ assert rows[0]["pre_cap_candidates"][0]["channel"] == "title" +-- +2.47.3 + + +From c18a456d4a30223c8ecc39ceb6bca07298b87c04 Mon Sep 17 00:00:00 2001 +From: factory-droid <138933559+factory-droid[bot]@users.noreply.github.com> +Date: Wed, 19 Aug 2026 22:05:20 -0500 +Subject: [PATCH 2/4] v12: admit canonical 25k and full-dump tiers in the pack + builder CLI + +The frozen-series pin (10k/50k) predates the Semantic Address v2 Factory +handoff, which requires canonical 25k and 397k (full-dump: 397,196 +namespace-0 articles for simplewiki 20260701) packs. The article limit +stays exact and the builder still fails closed when the dump ends early. + +Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> +--- + scripts/build_simplewiki_pack.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/scripts/build_simplewiki_pack.py b/scripts/build_simplewiki_pack.py +index f35d992..4b1059b 100644 +--- a/scripts/build_simplewiki_pack.py ++++ b/scripts/build_simplewiki_pack.py +@@ -17,7 +17,11 @@ def main() -> None: + parser.add_argument("--source-manifest", required=True, type=Path) + parser.add_argument("--output", required=True, type=Path) + parser.add_argument("--manifest-output", required=True, type=Path) +- parser.add_argument("--articles", required=True, type=int, choices=(10_000, 50_000)) ++ # The frozen v0.5 series pinned 10k/50k; the Semantic Address v2 Factory ++ # handoff additionally requires the canonical 25k and full-dump (397,196) ++ # tiers. The limit remains exact: the builder fails if the dump cannot ++ # supply precisely this many namespace-0 articles. ++ parser.add_argument("--articles", required=True, type=int, choices=(10_000, 25_000, 50_000, 397_196)) + parser.add_argument("--chunk-chars", type=int, default=480) + args = parser.parse_args() + with args.source_manifest.open(encoding="utf-8") as stream: +-- +2.47.3 + + +From 937255aafdcf57d6eae1930d9842e08239b1259d Mon Sep 17 00:00:00 2001 +From: factory-droid <138933559+factory-droid[bot]@users.noreply.github.com> +Date: Wed, 19 Aug 2026 22:28:41 -0500 +Subject: [PATCH 3/4] v12: skip empty-normalized exact surfaces for any + resolution state + +The 25k canonical tier proved resolved occurrences with whitespace-only +piped-link displays are a lawful corpus idiom, not producer corruption. +An empty-normalizing surface is unqueryable for any resolution state, so +the exact-evidence adapter skips it uniformly; rows remain preserved in +the occurrences stream and surface_statistics. + +Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> +--- + src/aethersparse/addressing/bundle_v2.py | 18 +++++++----------- + .../addressing/test_v050_pack_normalization.py | 18 +++++++++++------- + 2 files changed, 18 insertions(+), 18 deletions(-) + +diff --git a/src/aethersparse/addressing/bundle_v2.py b/src/aethersparse/addressing/bundle_v2.py +index 6f2f01e..a7067e2 100644 +--- a/src/aethersparse/addressing/bundle_v2.py ++++ b/src/aethersparse/addressing/bundle_v2.py +@@ -363,17 +363,13 @@ def iter_exact_address_evidence( + entity_id, title = _require_registry_pair(registry, row) + surface = str(row["mention"]) + if not normalize_surface(surface): +- # A mention that normalizes to empty (for example a whitespace-only +- # piped-link display) can never be an exact lookup key, so the +- # index cannot hold it. The row stays fully preserved in the +- # occurrences stream and its unresolved mass stays visible in +- # surface_statistics. A *resolved* occurrence with an empty +- # surface would mean producer corruption: fail closed. +- if entity_id is not None: +- raise AddressArtifactError( +- "resolved occurrence has an empty normalized surface: " +- f"{row['record_id']}" +- ) ++ # A mention that normalizes to empty (a whitespace-only piped-link ++ # display) can never be an exact lookup key for any resolution ++ # state: no query can normalize to empty, so the index cannot hold ++ # it. The row stays fully preserved in the occurrences stream and ++ # its support or unresolved mass stays visible in ++ # surface_statistics; a resolved entity remains reachable through ++ # its title, alias, redirect, and other anchor surfaces. + continue + yield AddressEvidence( + surface=surface, +diff --git a/tests/addressing/test_v050_pack_normalization.py b/tests/addressing/test_v050_pack_normalization.py +index 056cc9d..4b22e81 100644 +--- a/tests/addressing/test_v050_pack_normalization.py ++++ b/tests/addressing/test_v050_pack_normalization.py +@@ -209,12 +209,13 @@ def test_en_dash_entity_loads_and_resolves_canonical(tmp_path: Path) -> None: + assert empty["resolution_state"] == "missing" + + +-def test_exact_index_fails_closed_on_resolved_empty_surface(tmp_path: Path) -> None: ++def test_exact_index_skips_resolved_empty_surface(tmp_path: Path) -> None: + pack = tmp_path / "pack.sqlite" + _dash_pack(pack) +- # Retarget the whitespace-display anchor at an existing entity so the +- # occurrence resolves: an empty exact key for a resolved entity is +- # producer corruption and must remain a hard failure. ++ # Retarget the whitespace-display anchor at an existing entity: a resolved ++ # occurrence with an empty normalized surface is a lawful corpus idiom at ++ # larger tiers, still unqueryable, and must be skipped like any other ++ # empty key while the entity stays reachable through its other surfaces. + db = sqlite3.connect(pack) + db.execute( + "UPDATE anchors SET target_title=? WHERE anchor_id='anchor:empty:1'", +@@ -222,9 +223,12 @@ def test_exact_index_fails_closed_on_resolved_empty_surface(tmp_path: Path) -> N + ) + db.commit() + db.close() +- compile_address_pack(pack, tmp_path / "address", corpus_tier="fixture") +- with pytest.raises(AddressArtifactError, match="empty normalized surface"): +- compile_verified_exact_address_index(tmp_path / "address", tmp_path / "exact.fst") ++ manifest = compile_address_pack(pack, tmp_path / "address", corpus_tier="fixture") ++ assert manifest.counts["occurrence_resolution_canonical"] == 2 ++ artifact = compile_verified_exact_address_index( ++ tmp_path / "address", tmp_path / "exact.fst" ++ ) ++ assert artifact.total_bytes == (tmp_path / "exact.fst").stat().st_size + + + def test_registry_rejects_wrong_derivation_and_tampered_ids(tmp_path: Path) -> None: +-- +2.47.3 + + +From a3ae7f9a43289fd38291f23f00bf535a3c61d43b Mon Sep 17 00:00:00 2001 +From: factory-droid <138933559+factory-droid[bot]@users.noreply.github.com> +Date: Thu, 20 Aug 2026 07:48:22 -0500 +Subject: [PATCH 4/4] v12: cache canonical registry mapping for per-row + evidence lookups + +require_pair rebuilt an O(entries) dict on every call, making exact +evidence adaptation O(rows x entities): ~1.8 trillion operations at the +397k tier (observed: hours pinned at 100% CPU inside the aliases loop). +The registry is immutable, so compute the mapping once in __post_init__. +Semantics unchanged; the 10k/25k exact artifacts are byte-identical +under this repair. + +Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> +--- + src/aethersparse/addressing/bundle_v2.py | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/src/aethersparse/addressing/bundle_v2.py b/src/aethersparse/addressing/bundle_v2.py +index a7067e2..710aa59 100644 +--- a/src/aethersparse/addressing/bundle_v2.py ++++ b/src/aethersparse/addressing/bundle_v2.py +@@ -125,12 +125,21 @@ class CanonicalAddressRegistry: + entity_ids.add(entry.entity_id) + normalized_titles.add(entry.normalized_title) + source_documents.add(entry.source_document_id) ++ # Cache the lookup mapping once: require_pair is called per evidence ++ # row, and rebuilding an O(entries) mapping per call made full-corpus ++ # exact compiles quadratic (397k tier: ~276k entities x millions of ++ # rows). The registry is immutable, so the cache cannot drift. ++ object.__setattr__( ++ self, ++ "_mapping", ++ {entry.entity_id: entry.canonical_title for entry in self.entries}, ++ ) + + def as_mapping(self) -> dict[str, str]: +- return {entry.entity_id: entry.canonical_title for entry in self.entries} ++ return dict(self._mapping) + + def require_pair(self, entity_id: str, canonical_title: str) -> None: +- expected = self.as_mapping().get(entity_id) ++ expected = self._mapping.get(entity_id) + if expected is None: + raise AddressArtifactError(f"canonical entity is absent from registry: {entity_id}") + if expected != canonical_title: +-- +2.47.3 + diff --git a/source-patch/COMMIT.txt b/source-patch/COMMIT.txt new file mode 100644 index 0000000000000000000000000000000000000000..c608ae3d64957e02821c646b9ea12ec43d96deea --- /dev/null +++ b/source-patch/COMMIT.txt @@ -0,0 +1 @@ +a3ae7f9a43289fd38291f23f00bf535a3c61d43b