test(dwarf): lock the --debug-line honest-fail contract on self-contained builds (VCR-DBG-001, #394, #242) - #443
Merged
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.textsymbol to anchor the addresses, so--debug-linemust 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#383honest-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: compilesgust_kernel(import-free) without--relocatable+--debug-lineand asserts:.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