Skip to content

test(dwarf): lock the --debug-line honest-fail contract on self-contained builds (VCR-DBG-001, #394, #242) - #443

Merged
avrabe merged 1 commit into
mainfrom
test/dwarf-debug-line-honest-fail-394
Jun 23, 2026
Merged

test(dwarf): lock the --debug-line honest-fail contract on self-contained builds (VCR-DBG-001, #394, #242)#443
avrabe merged 1 commit into
mainfrom
test/dwarf-debug-line-honest-fail-394

Conversation

@avrabe

@avrabe avrabe commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Bounded north-star increment (#242) — closes a test gap on shipped v0.12.0 behavior

v0.12.0 emits DWARF only on the ARM relocatable-object path. On a self-contained executable image (no imports, no --relocatable) there's no relocatable .text symbol to anchor the addresses, so --debug-line must loudly no-op — warn, emit no .debug_*, still compile — rather than silently mislead a consumer (jess) into expecting source lines that aren't there (the #383 honest-fail rule).

PR C (#430) shipped this behavior but only the relocatable (positive) path was tested (additivity / resolves-to-source). This adds its honest negative complement.

Oracle D

debug_line_is_a_loud_noop_on_self_contained_build_394: compiles gust_kernel (import-free) without --relocatable + --debug-line and asserts:

  1. it still compiles (flag is a no-op, not an error);
  2. it warns, naming the relocatable path (never silent) — caught the CLI logs to stdout, so it searches combined output;
  3. the image is ET_EXEC with zero .debug_* sections.

Why this is a genuine increment, not churn

High-fidelity (asserts the exact shipped warning + section absence — a clean signal), not redundant (no existing test covers the self-contained path; the gated predication differential won't either), and distinct from the spill/const measurement oracles. Test-only, zero production code → frozen fixtures bit-identical by construction.

Local: 5/5 dwarf oracles green · fmt + clippy clean · rivet non-xref = 0.

🤖 Generated with Claude Code

…ined builds (VCR-DBG-001, #394, #242)

v0.12.0 emits DWARF only on the ARM relocatable-object path; on a self-contained
executable image (no imports, no --relocatable) there is no relocatable .text
symbol to anchor the addresses, so --debug-line must LOUDLY no-op — warn, emit no
.debug_*, and still compile — rather than silently mislead a consumer into
expecting source lines that aren't there (the #383 honest-fail rule). PR C
shipped this behavior but only the relocatable (positive) path was tested.

Oracle D (debug_line_is_a_loud_noop_on_self_contained_build_394): compiles
gust_kernel (import-free) WITHOUT --relocatable + --debug-line and asserts (1) it
still compiles, (2) it warns naming the relocatable path (never silent), (3) the
image is ET_EXEC with ZERO .debug_* sections. The previously-untested negative
half of the contract.

Test-only; zero production change; frozen fixtures bit-identical by construction.
High-fidelity (exact warning + section absence), distinct from the spill/const
measurement oracles. fmt + clippy clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 23, 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 bdc8ea8 into main Jun 23, 2026
14 checks passed
@avrabe
avrabe deleted the test/dwarf-debug-line-honest-fail-394 branch June 23, 2026 02:44
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