Section 01: Root-cause classification of the residual mono surface
Goal
Classify every residual ‘missing mono instance?’ callee by true cause so each cure section gets a precise work-list. The 1740 signatures are NOT one bug: ROOT A = missing LLVM emitter arms for builtin/trait/derived methods (the misnamed catch-all at arc_emitter/{terminators.rs:417,apply.rs:328}); ROOT B = transitive-collection gap (generic stdlib fns whose bodies call generic/trait methods on rigid type params, never re-walked); sub-root = typeck var-mapping miss (8 ‘could not map callee var’ + 4 UnresolvedTypeVar + 2 Tag::Var).
Implementation Sketch
Reproduce per-family with ORI_LOG=ori_llvm::mono=debug on representative corpus files. Resolve the open questions: (1) per-symbol class for the ambiguous tail (create/transform/empty_queue/buffer_pop/thread_id) via grep library/std/**.ori + ori_registry/src/defs/; (2) whether assert_eq’s OWN instance fails to reach codegen (import_sigs for std.testing at AOT) vs only its nested equals/debug; (3) whether Pool.resolutions already carries nested-call substitutions at AOT (decides ROOT-B fix shape); (4) reconcile the §09 HISTORY ‘closed 2026-06-23’ claim vs the fresh 1728 (regression vs scope drift) via diagnostics/aot-guardrail.sh-style per-family classification.
Spec References
arc.md §Debugging (ORI_LOG=ori_llvm::mono); plans/aot-mono-completeness s-0a67b346 (§09 HISTORY, the codegen-emission-gap RCA); layer-coverage.md (L8 AOT, L11 spec).
Work Items
- Build the classified residual inventory: for each distinct unresolved callee (then 380, then_with 198, escape 198, len 220, has_trace 140, trace_entries 92, assert_eq 82, contains 71, debug 58, equals 56, transform 41, hash 38, create 32, trace 26, repeat 25, empty_queue 24, thread_id 16, is_alpha 11, buffer_pop 6, + the long tail), record {callee, cause-class (A-builtin / A-trait / A-derived / B-transitive / var-mapping), owning fix section, representative corpus file}.
- Resolve open question (1): grep library/std/**.ori + ori_registry/src/defs/ to classify create/transform/empty_queue/buffer_pop/thread_id as registry-builtin (ROOT A) vs stdlib .ori generic/method (ROOT B).
- Resolve open question (2): reproduce an assert_eq corpus case under ORI_LOG=ori_llvm::mono=debug; determine if assert_eq’s own importable-generic instance reaches codegen (import_sigs populated for std.testing) or only its nested equals/debug starve. Records which of §05/§02-§04 owns the assert_eq cluster.
- Resolve open question (3): confirm whether Pool.resolutions carries concrete substitutions for nested generic/trait calls at AOT time (as it does for BUG-02-066 derived composites) — the verdict picks the ROOT-B fix shape in §05 (per-instantiation dispatch vs a new recording worklist).
- Reconcile open question (4): run a per-family AOT classification (diagnostics/aot-guardrail.sh —classify style) to confirm whether any §09-closed family (Duration/Size, DoubleEndedIterator, derived-composite) regressed vs the residual being genuinely-never-covered families. Output: the cure-section work-lists are final.
Items
- Reconcile open question (4): determine whether any §09-closed family (Duration/Size, DoubleEndedIterator, derived-composite) genuinely regressed vs the residual being never-covered families. Bucket per-family from the ./test-all.sh captured-log grep of the four mono-class signatures (NOT diagnostics/aot-guardrail.sh — per intel dossier §3D that is an AIMS RC-burden grind tool whose count is orthogonal to this codegen-emission metric and FALSE-GREEN on the default RC path). Cross-reference BUG-04-213 (Duration/Size factory) + BUG-07-286 (baseline-aware AOT gated leg) to separate a real regression from a floor-counting measurement artifact. Output: the cure-section work-lists are final.
- Cross-reference each classified callee family against the open mono/AOT bug cluster (BUG-04-146 generic-impl-method ROOT-A root, BUG-04-213 Duration/Size factory, BUG-02-042 record_deferred_mono_call svid-mapping = the var-mapping sub-root, BUG-02-023 const-generic value-flow) to confirm no in-flight cure overlaps a callee §01 routes, and annotate each inventory record with its matching bug-sibling (or ‘none’). Prevents the classification conflicting with an in-progress fix and keeps the partition coordinated with the sibling aot-mono-completeness §09 cures (intel dossier §4 + §6 VERDICTs).
Fresh intel (regenerated)
{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “aot-mono-stdlib-completeness/s-b4bb16a3” }, “generated_at”: “2026-06-24T15:00:02.895287+00:00”, “graph_state”: { “head_sha”: “f9d92587”, “last_code_import_at”: “2026-06-24T14:58:35.353Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:aot-mono-stdlib-completeness/s-b4bb16a3] agent-authored dossier”, “degraded”: false, “dossier”: { “objective_symbols”: [], “tiers”: {}, “agent_authored”: true, “difficulty”: { “class”: “routine”, “research_online”: false, “research_mode”: “auto”, “signals”: [], “plan_dir”: “/home/eric/projects/ori_lang/plans/aot-mono-stdlib-completeness” } } }
(full dossier: root-cause-classification—s-b4bb16a3.intel.json)