← Back to Pull requests

conformance(v2:shred): local conformance for v2 shred parse harness #1715

Closed
unknown closed this pull request without merging on Nov 27, 2026 02:30 UTC
View on GitHub
unknown unknown commented on Jul 13, 2026 10:28 UTC
Author

Intent

Bring the v2 shred parse pipeline to differential-fuzz parity with agave on the local shred_parse fixture corpus.

The work splits three ways:

  • Harness — conformance/src/shred_parse.zig. Implement sol_compat_shred_parse_v1 end-to-end: decode ShredParseContext, drive every shred through the v2 Receiver, and emit ShredParseEffects (per-FEC-set outcomes + block-level verdict) derived from Receiver admission state and the replay-side MerkleForest. Adds parent-offset-conflict / SIMD-0340 chained-root / equivocation reconstruction, VersionedBlockMarker validation for empty EntryBatch payloads, the half-epoch future-slot bound, and mirrors agave's order-dependent LastIndexConflict admission check.
  • Receiver — v2/lib/shred/receiver.zig, v2/lib/shred.zig. Tighten protocol-invariant enforcement surfaced by the corpus: pin chained_merkle_root on the FEC-set ctx (reject disagreement, emit the pinned value); id-secondary erasure-set routing so case-A equivocation and sig-verify-off signature collisions still collapse to one ctx per FecSetId; re-run structural / positional / variant checks on RS-recovered data shreds (with a wire_received snapshot so the guard sees the pre-decode bitset, and an errdefer that retires the ctx on failure); reject LAST_SHRED_IN_SLOT at misaligned data index; drop data shreds whose parent slot sits below the current root; accept parent_offset == slot at any slot (chaining to genesis); widen the header + payload + trailer bound check to u32 to match agave's merkle::get_data.
  • Replay — v2/lib/replay.zig, v2/services/replay.zig. Extract MerkleForest (LCRS tree of MerkleNodes, orphan adoption via chained_merkle_root) into a standalone library module so the harness can walk cross-FEC-set invariants without pulling in the replay service. Gains MerkleForest.reset (harness reuses one forest across fixtures) and sibling attachment for equivocating (slot, fec_set_idx) entries so consumers detect equivocation structurally.
  • Notes

  • Shred signature verification is compiled out in the harness via -Ddebug-skip-shred-sig-verify=true; shred-version enforcement stays on.

  • RS-recovered data shreds whose ctx is destroyed inside processPacket are not visible to the harness's tick-verify path — a known fidelity gap versus agave's blockstore-driven reconstruction.

  • Per-slot parent-slot consistency across FEC sets is enforced in the harness (via MerkleForest), not in the Receiver.

  • BlockComponent decoding lives in the harness pending first-class support in sig.
  • Diff: 326 lines (+244 / -82) across 4 files Reviewer: yewman Review duration: 196802m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 326 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.346
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1715"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42% (MEDIUM) · Higher = larger blast radius
    42%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.6% · Safe to merge
    16.6%
    Repository