Skip to content

FEAT-040 (v2.6): machine-readable analysis-gap report#76

Merged
avrabe merged 3 commits into
mainfrom
feat-040-gap-report
Jun 27, 2026
Merged

FEAT-040 (v2.6): machine-readable analysis-gap report#76
avrabe merged 3 commits into
mainfrom
feat-040-gap-report

Conversation

@avrabe

@avrabe avrabe commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

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 explicit Gap{func_index, pc, op, kind} record, sorted by (func, pc), emitted independently of emit_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).
  • Completeness is enforced by the type system: scrub_to_top now requires a Gap, so no function can degrade silently. All 4 degradation sites covered — UnsupportedOp, UnmodeledBranch (br_table), UnmodeledMemoryAddress (×2).
  • op_report_name identifies any op (e.g. F64Add), not a generic placeholder.
  • scry-viz: an "Analysis gaps" summary count + a structured gaps section (gaps as data beside the SVG).

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

avrabe and others added 3 commits June 27, 2026 11:21
… 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>
@github-actions

Copy link
Copy Markdown

📐 rivet artifact delta

PR: #76 Base SHA: 316c9e88

Validation

head — `rivet validate` result
  SR-10 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-12 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-7 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-11 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-4 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SYS-5 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-4 (system-req, status: accepted) — missing: sys-integration-verification
  SR-5 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-3 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SYS-1 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-3 (system-req, status: accepted) — missing: sys-integration-verification
  SR-8 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-9 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-1 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SYS-2 (system-req, status: accepted) — missing: sys-integration-verification
  SR-2 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  → run `rivet validate --explain SR-13` to see which link type and source types satisfy a gap

Result: PASS (74 warnings)
Schemas: common@0.3.0 (embedded), dev@0.2.0 (embedded), research@0.1.0 (embedded), research-ext@0.1.0 (on-disk), safety-case@0.1.0 (embedded), aspice@0.2.0 (embedded)
base — `rivet validate` result (for comparison)
  SYS-3 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-4 (system-req, status: accepted) — missing: sys-integration-verification
  SR-1 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-4 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-10 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-6 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-11 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-13 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SYS-5 (system-req, status: accepted) — missing: sys-integration-verification
  SR-8 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SYS-1 (system-req, status: accepted) — missing: sys-integration-verification
  SR-12 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-3 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-9 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-7 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SYS-2 (system-req, status: accepted) — missing: sys-integration-verification
  → run `rivet validate --explain SR-5` to see which link type and source types satisfy a gap

Result: PASS (74 warnings)
Schemas: common@0.3.0 (embedded), dev@0.2.0 (embedded), research@0.1.0 (embedded), research-ext@0.1.0 (on-disk), safety-case@0.1.0 (embedded), aspice@0.2.0 (embedded)

Artifact stats

base head
Total artifacts 203 203
full stats — head
Artifact summary:
  academic-reference               24
  competitive-analysis             11
  design-decision                  17
  feature                          58
  market-finding                    7
  requirement                      17
  safety-context                    3
  safety-goal                       5
  safety-justification              3
  safety-solution                   6
  safety-strategy                   1
  stakeholder-req                   3
  sw-req                           13
  sw-verification                  13
  sys-verification                  5
  system-req                        5
  technology-evaluation            12
  TOTAL                           203

Orphan artifacts (no links): 11
  CA-001
  CA-002
  CA-003
  CA-004
  CA-005
  CA-006
  CA-007
  CA-008
  CA-009
  CA-010
  CA-011

Diagnostics: 0 error(s), 74 warning(s), 16 info(s)

Diff (base → head)

~ FEAT-040
  status: - proposed -> + accepted

0 added, 0 removed, 1 modified, 202 unchanged

AADL model — head

spar/scry.aadl: OK

Posted by the rivet-delta workflow. Informational only — does not gate the PR.

@avrabe avrabe merged commit 7f780e7 into main Jun 27, 2026
10 checks passed
@avrabe avrabe deleted the feat-040-gap-report branch June 27, 2026 09:40
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