test(vcr-mem): layer-2 end-to-end budget pipeline on real gust fixture (#242, #383) - #423
Merged
Merged
Conversation
#242, #383) Closes the join the #392 spike and the shadow_budget unit suite each cover only half of: `layer2_budget_pipeline_msgq_end_to_end_383` (synth-cli main.rs cfg(test)) runs scry's `analyze()` on the REAL msgq_put_359.wasm gust fixture, maps its proven StackBound through the synth-owned StackDepthBound (the 1:1 adapter that becomes `impl From<scry::StackBound>` when 2b promotes scry to a production dep), feeds `budget_from_bound`, and asserts the 2048x over-reservation (65536 B page) collapses to a PROVEN 32-byte budget — source=ProvenStackDepth, preferred over the asserted 4096 fallback. Frozen-safe: scry-sai-core stays a DEV-dependency exercised only under cfg(test), so the production binary pulls no scry and emits identical bytes (the change is entirely in #[cfg(test)] code). No MODULE.bazel pin (tests are not in the Bazel graph). Independent of the from_cargo migration (#422) — it uses the existing dev-dep under the current resolution. This test is the oracle the gated 2b wiring (`--shadow-stack-size auto`) must match. Roadmap VCR-MEM-001 updated with the end-to-end criterion. Verification: `cargo test -p synth-cli --bin synth layer2_budget_pipeline` → pass (alongside the 9 shadow_budget units); fmt + clippy -D warnings clean; rivet check zero non-xref errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 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.
What
Closes the join that the #392 scry spike and the
shadow_budgetunit suite (#421) each cover only half of:analyze()output only.shadow_budgetunits → thebudget_from_bounddecision on synthetic bounds only.layer2_budget_pipeline_msgq_end_to_end_383(synth-climain.rscfg(test)) runs the full chain on the realmsgq_put_359.wasmgust fixture:It asserts the 2048× over-reservation (the 65536-byte declared page) collapses to a proven 32-byte budget — and that with a fallback available, the proven path is preferred over the asserted one (
ProvenStackDepth, notAssertedFallback).Frozen-safe
scry-sai-corestays a dev-dependency exercised only undercfg(test), so the production binary pulls no scry and emits identical bytes — the change is entirely in#[cfg(test)]code. NoMODULE.bazelpin (tests aren't in the Bazel graph). Independent of the from_cargo migration (#422) — it uses the existing dev-dep under the current resolution.The inline 1:1
StackBound → StackDepthBoundmap is the adapter that becomesimpl From<scry::StackBound>when step 2b promotes scry to a (feature-gated) production dep. This test is the oracle that the gated--shadow-stack-size autowiring must match.Verification
cargo test -p synth-cli --bin synth layer2_budget_pipeline→ pass (alongside the 9shadow_budgetunits)cargo fmt --checkclean;cargo clippy -p synth-cli --all-targets -- -D warningscleanrivet check→ zero non-xref errors; roadmap VCR-MEM-001 updated with the end-to-end criterionRefs #242 (VCR epic), #383 (layer-1).
🤖 Generated with Claude Code