Goal
Resolve file:line for remarks where available; fall back to function-level attribution for synthetic RC ops (the common case), per the approved scope decision.
Implementation Sketch
- Carry the raw
Span/Noneper remark; resolveSpan -> file:lineoric-side via theLineOffsetTable(ori_diagnostic/span_utils) when present (ori_arc holds byte offsets, not a source map). - Function-level fallback: when
ArcFunction.spans[block][instr]isNone(synthetic RC ops — the doc-stated common case), attribute the remark to its enclosing function symbol viafunc.name. - Record the precise per-op span propagation (inheriting the causing-expression span onto inserted RC ops) as an explicit tracked follow-on anchor: it is an AIMS-domain change governed by arc.md §STOP, OUT of scope here.
Spec References
impl-hygiene.md §Span Provenance(aspirational);ir/mod.rs:422-428spans field doc;spansis#[serde(skip)](cache-hit paths carry zero spans).
Work Items
- Carry raw Span/None per remark; resolve Span->file:line oric-side via LineOffsetTable when present.
- Function-level fallback attribution via func.name when the span is None (synthetic-RC-op case).
- Tracked follow-on anchor for precise per-op span propagation (arc.md §STOP domain; out of scope here).
Fresh intel (regenerated)
{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “aims-rc-remarks/s-c7ed4c2d” }, “generated_at”: “2026-06-22T01:21:08.275311+00:00”, “graph_state”: { “head_sha”: “d1b2a9dc”, “last_code_import_at”: “2026-06-22T01:06:01.02Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:aims-rc-remarks/s-c7ed4c2d] 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/aims-rc-remarks” } } }
(full dossier: span-attribution—s-c7ed4c2d.intel.json)