← Back to Pull requests

test(lws): add P0-9 durable resource measurement harness #7319

Closed
unknown closed this pull request without merging on Nov 12, 2026 00:22 UTC
View on GitHub
unknown unknown commented on Nov 11, 2026 22:56 UTC
Author

Agent-authored PR (Claude Code orchestrating; implementation drafted by a coding agent and reviewed by Claude).

Summary

Adds a manual harness for the P0-9 measurement in #7188. crates/sparq-lws-core/tests/durable_measure.rs is an #[ignore] test parameterized by P09_RESOURCES. It boots the real sparq-lws-core binary with SOLID_SERVER_DATA_DIR (embedded durable index plus FsBlobStore), creates resources one at a time over HTTP, and reports p50/p99 create latency. After a verified SIGKILL it counts regular files under index/, times the replacement process from spawn to /readyz, and checks recovered bytes. It prints one JSON line per run. The solid-lws-server skill documents how to run it on a real disk.

Where each #7188 threshold stands on the measurement box (raw results and machine details are kept privately, not here):

| Population | p99 create within 50 ms | Open after SIGKILL within 30 s |
| --- | --- | --- |
| 1k | Not reliably met (some repeated runs exceed it) | n/a |
| 10k | Not established | n/a |
| 100k | Not established | Not established |

The larger populations could not complete on the measurement box. A sparq-core follow-up is being drafted separately (related to #3212 and #6945).

Addresses #7188

Base gate (always required)

  • cargo clippy -p sparq-lws-core --all-targets -- -D warnings (default features and explicit storage features)

  • cargo test -p sparq-lws-core (the measurement stays ignored, and its two helper tests run)

  • cargo fmt --check on touched files
  • Targeted re-evaluation (check the rows that apply to your change)

  • Test-only change plus skill docs. No production code, dependencies, Cargo.lock or workflows change.

  • The helper tests were mutation-checked: a percentile off-by-one, an always-median percentile, and a non-recursive file count each fail.
  • Ratchets and conventions

  • No CI entry and no timing assertions. The harness is manual by design.

  • No performance numbers in the repo or this PR.
  • Security

    The harness works only in a fresh temporary data root with a loopback child server. Its public test ACL exists only in that root, which is removed afterwards.

    https://claude.ai/code/session_01RbBWdT5qWj5ZLvkgyPZyGH

    ---
    _Generated by Claude Code_

    Diff: 288 lines (+216 / -72) across 3 files Reviewer: jeswr Review duration: 85m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 288 lines diff across 3 files
    0.45
    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.339
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #7319"
    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: 44.8% (MEDIUM) · Higher = larger blast radius
    44.8%
    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: 17.7% · Safe to merge
    17.7%