Goal
Preserve the lookup_static &‘static str + Name byte-identity contract across the 50-plan blast radius
Implementation Sketch
See the work items below; each is the bounded deliverable.
Spec References
-
ledger evolution ev14 (eligible) in plans/benchmark-grind-lexer (the hypothesis + kill_criterion).
-
compiler_repo/compiler/ori_ir/src/interner/mod.rs (the InternShard surface).
Work Items
- Audit + preserve every lookup_static() -> &‘static str / Cow<‘static,str> consumer across the 50-plan + aims-burden blast radius: the &‘static str contract stays stable (chunk-pool-backed), Name (shard 4b | local 28b) encoding byte-identical (respects BUG-04-053 / BUG-02-026). No new workspace dependency (no hashbrown); single-process (no lock-free dep).
Items
- Verify (do not re-implement) that the fused chunk-pool InternShard landed in s-d483addc preserves the lookup_static() -> &‘static str / lookup() -> &str / try_lookup() -> Option<&str> contract for every consumer across the 50-plan + aims-burden blast radius (30 direct / 101 transitive lookup_static/lookup callers per the s-d483addc intel dossier): confirm zero call-site signature changes outside compiler/ori_ir/src/interner/ via git diff —stat against the pre-work baseline, run ./test-all.sh with no new failure over the 1803 floor (the section’s owned probe, sc-ed3c6f1f), and re-run the BUG-04-053 / BUG-02-026 regression pins specifically to confirm Name (shard 4b | local 28b) encoding stays byte-identical. Per the dossier’s Recombine finding + ledger attempt 3’s generalizes_to lesson, the design deliberately requires zero downstream call-site changes — this section is a verification gate against that claim, not a call-site rewrite pass.
- Verify (do not re-implement) that the fused chunk-pool InternShard landed in s-d483addc preserves the lookup_static() -> &‘static str / lookup() -> &str / try_lookup() -> Option<&str> contract for every consumer across the 50-plan + aims-burden blast radius (30 direct / 101 transitive lookup_static/lookup callers per the s-d483addc intel dossier): confirm zero call-site signature changes outside compiler/ori_ir/src/interner/ via git diff —stat against the pre-work baseline, run ./test-all.sh with no new failure over the 1803 floor (the section’s owned probe, sc-ed3c6f1f), and re-run the BUG-04-053 / BUG-02-026 regression pins specifically to confirm Name (shard 4b | local 28b) encoding stays byte-identical. Per the dossier’s Recombine finding + ledger attempt 3’s generalizes_to lesson, the design deliberately requires zero downstream call-site changes — this section is a verification gate against that claim, not a call-site rewrite pass.
Fresh intel (regenerated)
The section’s charter (“audit + preserve every lookup_static() consumer across the 50-plan + aims-burden blast radius”) reads like a wide, open-ended refactor-safety sweep. The graph and source recon together show the OPPOSITE: the real code-level blast radius is small, already closed by a sibling section’s completed work, and largely self-verifying via cargo build.
Five convergent findings, in order of decisiveness:
- The graph’s raw call-count for
lookup_staticis a call-resolution artifact — do not trust it.callers lookup_static --repo orireturns 97 hits across 5 crates; direct source verification shows the true production-onlylookup_static()call count is 3 (2 inori_eval, 1 inori_llvm), plus 1 wrapper (FunctionCompiler::lookup_name) with 18 further call sites. The other ~94 “callers” are.lookup(/.try_lookup(calls the extractor mis-resolved onto the same-prefixedlookup_staticsymbol (verified against three sampled sites:ori_types::infer::accessors::lookup_name,ori_parse::grammar::attr::skip_backend::parse_skip_backend_param,ori_arc::rc_insert::annotate::compute_arg_ownership— all call.lookup(or.try_lookup(, none call.lookup_static(). Classic literature-documented call-graph over-approximation (§7). - The sibling section already closed the loop.
fused-interner-ev14/s-d483addc(status: completed) landed a 3-cycle ledger (implement chunk-pool -> attempt lock-guard resolve -> REVERT -> retreat to safe chunk-pool) whose KEPT/CONFIRMED cycle-3 clause is verbatim: “Preserve the existing public seam and prove the new storage via local tests at the owning layer.” The livecompiler/ori_ir/src/interner/{mod.rs,shard.rs}at HEAD confirms this:lookup,try_lookup,lookup_statickeep their EXACT pre-rewrite signatures.Name’s shard(4b)/local(28b) bit layout (ori_ir/src/name/mod.rs) was never touched. - Byte-identity across chunk growth is already pinned.
ori_ir/src/interner/tests.rscarriestest_lookup_static_after_chunk_growth(128 long idents forcing multiplekey_remainingchunk allocations; asserts bothlookupandlookup_staticreturn the correct bytes post-growth) andtest_lookup_static_does_not_depend_on_map_probe(proveslookup_staticresolves via thespansindex, not a live map re-probe, so it survives even a map-entry removal). Two more tests prove neitherlookupnortry_lookupretain the shardRwLockacross return. - Zero new dependencies.
cargo tree -p ori_irshows onlyparking_lot+rustc-hash(both pre-existing); nohashbrownin the tree.Cargo.toml/Cargo.lockshow no interner-related edits in recent history. The “no new workspace dependency” clause in the section’s own goal text is already satisfied by construction. [JOIN]External prior art independently corroborates the parent plan’s own dead-end. rustc’s real production issue #118205 (“deadlock detected… collecting exported symbols for crate”) is an INDEPENDENT confirmation that lock-held symbol/interner infrastructure is a genuine deadlock class in mature compilers — validating why THIS plan’s own ledger cycle 2 (REVERTED, lock-returningInternedStrguard, realori_arc/ori_evalhangs) was correctly killed, not over-cautious.
Decisions this package forces before work starts:
- Do NOT re-derive a consumer list from
scripts/intel-query.sh callers lookup_staticalone — it is ~97% call-resolution noise for this specific symbol (finding 1). Ground every consumer claim in a literalgrep -rn "\.lookup_static(\|\.lookup_name("pass, then verify each hit’s actual call text. - The section’s ACTUAL remaining deliverable is narrower than its charter text implies: (a) a written enumeration of the true consumer set (this dossier’s §2/§3.1 is that enumeration), (b) confirming
cargo build --workspace+cargo test -p ori_ir -p ori_eval -p ori_llvmare clean against the sibling section’s committed rewrite, (c) the FULL layer matrix (./test-all.sh, dual-exec parity,ORI_CHECK_LEAKS=1) — which is the SAME gate the sibling not-started sections-24059b3f(measure-and-record-ev14) also needs before it can trust its A/B throughput measurement. Sequences-1c07f0cabefores-24059b3feven though the plan lists them as siblings with no explicitdepends_on(§6) — measuring throughput of an interner rewrite is meaningless before consumer-safety is confirmed. constrained-symbolsis[](§9) — no genuine pre-existing EXTERNAL do-not-touch hazard surfaced. The fragile invariant surface (InternShard::append_key,span_str) is the PLAN’S OWN delivered subject (built by sibling sections-d483addc), excluded per the work-subject rule.
DIG DEEPER
scripts/intel-query.sh plan-status fused-interner-ev14 --human
python -m scripts.plan_corpus.ledger show plans/fused-interner-ev14 --rank --all
cd compiler_repo && git log --oneline -5 -- compiler/ori_ir/src/interner/
(full dossier: blast-radius-consumers—s-1c07f0ca.intel.md)