FEAT-040 (v2.6): machine-readable analysis-gap report#76
Merged
Conversation
… panel
Stop emitting top as silence. AnalysisResult gains a library-only gaps field —
every site where an unsupported operator degraded a function to top is now an
explicit Gap{func_index, pc, op, kind} record (the qualification scope/
limitation signal + the structured channel an AI agent needs per TE-011),
sorted by (func, pc), emitted INDEPENDENTLY of emit_diagnostics.
- Gap collection lives on FuncCtx (threaded everywhere), pushed at the
interpret_op unsupported-op fallback; the degraded early-return means one gap
per function at the first unmodeled op (the give-up point). Drained by
run_function_body's new emit_gaps sink in phase 2 only (phase-1 summary +
context-sensitive re-eval pass None, no double-count).
- op_report_name names ANY op (curated op_name, else the Debug variant), e.g.
F64Add, not a generic placeholder.
- scry-viz: an "Analysis gaps" summary count + a structured gaps section
(per TE-011: gaps as DATA beside the SVG, not silence).
Library-only: WIT + frozen v1 JSON contract unchanged (contract test green).
Tests: feat040_unsupported_op_recorded_as_gap, _modelled_function_has_no_gaps,
_gaps_independent_of_emit_diagnostics. 41 core + 17 viz tests; clippy + fmt
clean. FEAT-040 accepted (release v2.6.0).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… 4 sites) Audit found scry degrades to top at FOUR sites (unsupported op, br_table, 2x non-i32 memory-address fallback), but slice-1 only recorded the first — so the "no conservative site silently omitted" AC was violated for the other 3. Fix: scrub_to_top now takes a Gap by signature, so degradation CANNOT be silent (the compiler enforces it). Added GapKind::UnmodeledBranch (br_table) and UnmodeledMemoryAddress (non-i32 address). Zero bare scrub_to_top calls remain. Test feat040_br_table_recorded_as_gap. 42 core tests; clippy + fmt clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…aim (clean-room) Clean-room refuted the "every conservative site" wording: havoc_region (write-set havoc of an unmodelled control-flow region — a typed `if` / non-empty block-type) widened written locals to ⊤ but recorded NO gap. It's a PARTIAL give-up (the rest of the function stays precise), distinct from the full-function scrub_to_top sites. Fix: - New GapKind::UnmodeledControlFlow; havoc_region pushes a gap when it actually widens a local (written set non-empty). - Field doc now scopes the claim precisely: gaps cover the interval/region INTERPRETER's conservative sites (full-function scrubs + control-flow havoc), and explicitly NOT ordinary loop widening (normal abstraction), the separate bits/taint passes, or imported functions (sound but out of scope). - scry-viz render_gaps handles the new kinds. Test feat040_control_flow_havoc_recorded_as_gap. 43 core + 17 viz tests; clippy + fmt clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📐 rivet artifact deltaPR: #76 Base SHA: Validationhead — `rivet validate` resultbase — `rivet validate` result (for comparison)Artifact stats
full stats — headDiff (base → head)AADL model — headPosted by the |
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.
First feature of the v2.6.0 "Make the analysis observable" release. Stops scry emitting ⊤ as silence.
What
AnalysisResult.gaps: Vec<Gap>(library-only) — every site where scry degraded a function to ⊤ is now an explicitGap{func_index, pc, op, kind}record, sorted by(func, pc), emitted independently ofemit_diagnostics. This is the qualification scope/limitation signal and the structured channel an AI agent needs (per TE-011: agents under-read SVG, so gaps must be data).scrub_to_topnow requires aGap, so no function can degrade silently. All 4 degradation sites covered —UnsupportedOp,UnmodeledBranch(br_table),UnmodeledMemoryAddress(×2).op_report_nameidentifies any op (e.g.F64Add), not a generic placeholder.Soundness / posture
Library-only — WIT + frozen v1 JSON contract unchanged (contract test green). Additive observability; no analysis-claim change. 42 core + 17 viz tests; clippy + fmt clean.
Traces REQ-017.
release: v2.6.0.🤖 Generated with Claude Code