Skip to content

docs(roadmap): source-to-object provenance spine — DWARF (#394) + MC/DC traceability (#396) - #395

Merged
avrabe merged 2 commits into
mainfrom
track-394-dwarf
Jun 20, 2026
Merged

docs(roadmap): source-to-object provenance spine — DWARF (#394) + MC/DC traceability (#396)#395
avrabe merged 2 commits into
mainfrom
track-394-dwarf

Conversation

@avrabe

@avrabe avrabe commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Tracks two issues that share one mechanism: synth must emit a source-to-object provenance map (it already threads source_line = wasm-op-index per ARM instruction). One spine, two consumers — the debugger and the coverage reconciler.

VCR-DBG-001 — emit DWARF (#394)

synth emits zero DWARF → bare-metal output isn't source-debuggable. The input wasm carries it and meld already remaps it through fusion (meld-core/src/dwarf.rs); synth is the only stage that drops it. Tier 1 .debug_line (machine-addr → source line) is regalloc-independent and ready; Tier 2 .debug_info variable locations is gated on the VCR-RA value→location map.

VCR-COV-001 — MC/DC source-to-object traceability (#396)

witness measures MC/DC on wasm branches; synth's lowering changes the branch set (select→cmov, #390 pass-4 fusion, i64-cmp, br_table), so wasm-level MC/DC doesn't 1:1 represent the object code (DO-178C 6.4.4.2). Three directions:

  • fold → predication — safe, wasm MC/DC stays authoritative;
  • eliminate constant branch — justified by scry's constant-condition evidence (not a coverage gap);
  • split into N object branches — the one direction that adds object-level obligations.

The fix is the same decision-provenance map: classify each wasm decision → {1:1 | folded | eliminated(+scry) | split}; a reconciler in/alongside witness makes the truth table defensible against the object code.

Why bundled

Both are "synth emits source-to-object provenance." Building the map once serves DWARF line/var info and the coverage reconciliation — they shouldn't drift into two mechanisms.

Docs only; frozen-fixture-safe (the map is emitted metadata, not a codegen change); rivet 0 non-xref.

🤖 Generated with Claude Code

avrabe and others added 2 commits June 20, 2026 17:11
…-2 gated on VCR-RA value→location map

synth drops all DWARF (zero .debug_* in output) → bare-metal images aren't
source-debuggable. The input wasm carries it and meld already remaps it through
fusion (meld-core/src/dwarf.rs); synth is the only stage that drops it. Tractable:
synth's source_line threading (~220 sites) is the (machine-addr → wasm-offset)
half — compose with the wasm DWARF for (machine-addr → source).

Two tiers: Tier 1 .debug_line (machine-addr → source line; raw material ready;
regalloc-independent) → breakpoints/backtraces; Tier 2 .debug_info variable
locations gated on the VCR-RA value→location mapping (the same (pc,local)→ARM-vreg
map surfaced in VCR-RA-010). DWARF is additive non-loadable sections ⇒ frozen
fixtures bit-identical. Coordinate encodings with meld end-to-end.

Docs only — no code, frozen-fixture-safe.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
#396); shares the DWARF provenance spine

witness measures MC/DC on wasm branches; synth's wasm→ARM lowering changes the
branch set (fold→predication / eliminate-constant / split), so wasm-level MC/DC
doesn't 1:1 represent the object code (DO-178C 6.4.4.2). Three directions: fold
(safe — wasm MC/DC authoritative), eliminate (justified by scry's
constant-condition evidence), split (the one that adds object obligations).

Fix = the SAME decision-provenance map as VCR-DBG-001 (#394): one mechanism (the
source_line threading already present), two consumers — debugger (DWARF) +
coverage reconciler (witness). Bundled with the DWARF artifact because they share
the source-to-object provenance spine. Coordinate with witness + scry.

Docs only — frozen-fixture-safe.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@avrabe avrabe changed the title docs(roadmap): VCR-DBG-001 — emit DWARF in the ELF (synth #394) docs(roadmap): source-to-object provenance spine — DWARF (#394) + MC/DC traceability (#396) Jun 20, 2026
@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe
avrabe merged commit 32111ac into main Jun 20, 2026
10 checks passed
@avrabe
avrabe deleted the track-394-dwarf branch June 20, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant