Skip to content

FEAT-057 measured before building: the surface is real and NOT coverage-gated - #199

Merged
avrabe merged 2 commits into
mainfrom
feat057-measure-before-building
Sep 1, 2026
Merged

FEAT-057 measured before building: the surface is real and NOT coverage-gated#199
avrabe merged 2 commits into
mainfrom
feat057-measure-before-building

Conversation

@avrabe

@avrabe avrabe commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

FEAT-057 slice 2 (wire polyhedra into the fixpoint) is the only unbuilt work left in v3.3.0/v3.4.0. FEAT-069 taught the rule — measure the ceiling before building — so this measures it, on scry's own scry_mcdc.wasm: 851 functions, 23,772 program points.

The opportunity is real — the opposite of what FEAT-069 found

The octagon already emits ProgramPoint.relational, filtered to constraints not implied by the unary intervals. Those carry information at 4,749 of 23,772 points (19.98%) across 197 of 851 functions.

The octagon is exact for two-variable constraints, so polyhedra can only exceed it where three or more locals are mutually constrained:

points with ≥3 mutually-constrained locals 2,512 (10.57%) in 83 functions
constraint form Diff 24,321 / Sum 4,053

The Sum share means the octagon's non-difference power is genuinely in use — these are not degenerate difference bounds.

I expected to add depends-on FEAT-095 and let the ordering gate fire

The measurement says not to.

2,165 of the 2,512 wide points sit in functions that degrade somewhere — which reads exactly like FEAT-069's "92.5% of unproven obligations in degraded functions" and is a different claim. Gaps are per-pc, and write-set havoc widens only the locals a region writes, so a wide point can sit nowhere near a gap.

Measured directly: only 13 of 2,512 wide points have a gap at or before them.

So FEAT-057 is not coverage-gated, no link was added, and the gate correctly stays green. Manufacturing the dependency to exercise my own gate would have been backwards.

Both bounds run in the direction you might not expect

  • "≥3 mutually constrained locals" is opportunity, not realized gain. Polyhedra beats the octagon only where the true invariant is a general linear inequality the pairwise closure cannot express. 2,512 bounds the ceiling from above; it does not show any point would in fact improve.
  • "No gap at or before it" is an UPPER bound on unaffected points, not a lower one. Program order is not dataflow order — a gap inside a loop reaches earlier pcs through the back edge.

A vacuous proxy was caught and removed rather than reported

Sizing the loop caveat by counting functions where the fixpoint revisited a pc printed "0 functions" — and the vacuity check built into it reported zero duplicate (func, pc) pairs. ProgramPoint is one per pc, so the proxy could only ever return zero. Publishing "0 functions with loops" would have been this repo's dominant documented failure class.

The loop-induced shortfall is left unquantified, which is the honest state. Sizing it needs the operator stream (back edges), which this harness does not have.

Why the harness is committed

Narrow reason: its numbers are cited on FEAT-057 to justify a scheduling decision, and a bare number in an artifact is the drift hazard that left "the dev REQ-* carry no verifies link by construction" checked in and false for months (#198). Re-run it after FEAT-095 lands — the docstring says so.

cargo run --release -p scry-sai-core --example poly_surface -- <module.wasm>

What this does not establish

The size of the win — only that the surface exists. Slice 2 remains a multi-slice arc mirroring the octagon's v1.7–v1.9: a Poly on FuncCtx threaded in lockstep with the octagon, wrap-aware transfers gated on the interval domain's no-wrap result, guard refinement, and Poly::project.

Refs: FEAT-057

🤖 Generated with Claude Code

https://claude.ai/code/session_01KkNzkNYzPh7366DkNijeNc

…ge-gated

FEAT-057 slice 2 (wire polyhedra into the fixpoint) is the only unbuilt
work left in v3.3.0/v3.4.0. FEAT-069 taught the rule -- measure the
ceiling before building -- so this measures it, on scry's own
scry_mcdc.wasm: 851 functions, 23,772 program points.

THE OPPORTUNITY IS REAL, which is the opposite of what the same
pre-build measurement found for FEAT-069. The octagon already emits
ProgramPoint.relational, filtered to constraints NOT implied by the
unary intervals; those carry information at 4,749 of 23,772 points
(19.98%) across 197 of 851 functions. The octagon is exact for
two-variable constraints, so polyhedra can only exceed it where three or
more locals are mutually constrained: 2,512 points, 10.57%, in 83
functions. Diff/Sum is 24,321/4,053, so the octagon's non-difference
power is in use -- these are not degenerate difference bounds.

I EXPECTED TO ADD `depends-on FEAT-095` AND LET THE ORDERING GATE FIRE.
The measurement says not to. 2,165 of the 2,512 wide points are in
functions that degrade SOMEWHERE, which reads exactly like FEAT-069's
92.5%-in-degraded-functions and is a DIFFERENT claim: gaps are per-pc
and write-set havoc widens only the locals a region writes, so a wide
point can sit nowhere near a gap. Measured directly, only 13 of 2,512
have a gap at or before them. Manufacturing the dependency to exercise
my own gate would have been backwards, so no link was added.

BOTH BOUNDS RUN IN THE DIRECTION YOU MIGHT NOT EXPECT, and the residual
says so. "3+ mutually constrained locals" is OPPORTUNITY, not realized
gain -- it bounds the ceiling from above and shows no point would in
fact improve. "No gap at or before it" is an UPPER bound on unaffected
points, not a lower one: program order is not dataflow order, and a gap
inside a loop reaches earlier pcs through the back edge.

A VACUOUS PROXY WAS CAUGHT AND REMOVED rather than reported. Sizing the
loop caveat by counting functions where the fixpoint revisited a pc
printed "0 functions" -- and the vacuity check built into it reported
zero duplicate (func, pc) pairs. ProgramPoint is one per pc, so that
proxy could only ever return zero; publishing "0 functions with loops"
would have been this repo's dominant failure class. The loop shortfall
is left UNQUANTIFIED, which is the honest state.

The harness is committed, not run and discarded, for one narrow reason:
its numbers are cited on FEAT-057 to justify a scheduling decision, and
a bare number in an artifact is the drift hazard that left "the dev
REQ-* carry no verifies link by construction" false for months. Re-run
it after FEAT-095 lands.

Refs: FEAT-057

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KkNzkNYzPh7366DkNijeNc
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

📐 rivet artifact delta

PR: #199 Base SHA: a169048f

Validation

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

Result: PASS (188 warnings)
Schemas: common@0.3.0 (embedded), dev@0.3.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)
  SR-11 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-12 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-13 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-2 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-3 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-4 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-5 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-6 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-7 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-8 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-9 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SYS-1 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-2 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-3 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-4 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-5 (system-req, status: accepted) — missing: sys-integration-verification
  → run `rivet validate --explain SR-1` to see which link type and source types satisfy a gap

Result: PASS (186 warnings)
Schemas: common@0.3.0 (embedded), dev@0.3.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 267 267
full stats — head
Artifact summary:
  academic-reference               24
  competitive-analysis             11
  design-decision                  22
  feature                          97
  market-finding                    7
  requirement                      21
  safety-context                    3
  safety-goal                       5
  safety-justification              4
  safety-solution                   6
  safety-strategy                   1
  stakeholder-req                   3
  sw-req                           13
  sw-verification                  13
  sys-verification                  5
  system-req                        5
  technology-evaluation            12
  verification                     15
  TOTAL                           267

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

Diagnostics: 0 error(s), 188 warning(s), 32 info(s)

Diff (base → head)

~ FEAT-057
  field changed: residual

0 added, 0 removed, 1 modified, 266 unchanged

~ NEW    WARN: [FEAT-057] prose mentions 'FEAT-095' but no typed link to it; add a link in `links:` or remove the mention
~ NEW    WARN: [FEAT-057] prose mentions 'FEAT-069' but no typed link to it; add a link in `links:` or remove the mention
0 new errors, 0 resolved errors, 2 new warnings, 0 resolved warnings

AADL model — head

spar/scry.aadl: OK

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

I wrote the harness and never ran `cargo fmt`, so PR #199 landed with 12
of 13 checks green and Format red. Only this file is affected; the rest
of the tree was already clean.

Re-ran the measurement after formatting and diffed it against the
pre-format output: byte-identical. Worth doing rather than assuming,
because these numbers are cited on FEAT-057 to justify a scheduling
decision — "formatting cannot change behaviour" is exactly the kind of
thing that is true right up until a macro or a raw string makes it false.

Refs: FEAT-057

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KkNzkNYzPh7366DkNijeNc
@avrabe
avrabe merged commit 9de0669 into main Sep 1, 2026
13 checks passed
@avrabe
avrabe deleted the feat057-measure-before-building branch September 1, 2026 20:00
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