← Back to Pull requests

(test) usage: pre-author Oracles A–D for the optional-quota-windows parser fix (issue #1591) #1630

Closed
unknown closed this pull request without merging on Nov 02, 2026 12:38 UTC
View on GitHub
unknown unknown commented on Nov 02, 2026 10:47 UTC
Author

Land the failing tests that #1596, the parser item under umbrella #1590, must turn green before it lands. Only src/usage.rs mod tests changes: no production line, fixture file or other test moves.

  • Fixture constants hold the quota fields of each reply shape the parser must serve: the captured reply whose session window is null, a reply with no window at all, and a reply that carries only a session window.

  • optional_fraction reads a window's fraction as an Option<f64> whether the field is f64, as today, or Option<f64>, as after the parser change, so one assertion text compiles and passes clippy -D warnings on both sides.

  • Oracles A–D are #[ignore]d. Each names the requirement it grades; #1596 removes the attributes and edits nothing else here.

  • The companion test runs unignored. It pins that each body is a JSON object whose top-level keys are exactly the quota fields, and that the window an oracle reads as absent is JSON null in its body.
  • At fd8640b, A and B fail on no session (five_hour) dimension and D on no weekly (seven_day) dimension; C passes under decision D1 (a), the standing default, and fails against a scratch parser that fabricates both windows. On a tree carrying the #1613 hot-fix, A passes and B fails on its session-window assertion instead; C and D are unchanged.

    Verification

    Proof comments on #1591, the addendum on this head first:

  • Addendum on 0ab1922: the oracle runs by exact name on fd8640b with this patch and on this head, the full suite on the stable and MSRV toolchains, and the local gates: https://github.com/alexey-pelykh/sessiometer/issues/1591#issuecomment-6577018848

  • RED proof on fd8640b, the run on main with #1613, and the suite with the oracles ignored on the stable and MSRV toolchains, on 6f52e99's change: https://github.com/alexey-pelykh/sessiometer/issues/1591#issuecomment-6575123749

  • Discrimination proof (variants F, M1, M2 and M3) and the AC-8 gates, on 6f52e99's change: https://github.com/alexey-pelykh/sessiometer/issues/1591#issuecomment-6575124160
  • Independent /verify runs, each a worktree scratch package reaped with the worktree, so the verdict and what each run graded are the durable record:

  • Run of 2026-11-02T08:27:00Z: PASS. Package .tmp/verify-alexey-pelykh-sessiometer-issue-1591-package.md. It graded the oracle block before the polish round added the companion's seven_day null checks.

  • Run of 2026-11-02T10:12:03Z: PASS. Package .tmp/verify-alexey-pelykh-sessiometer-issue-1591-polish-r1-package.md. It graded the polish round's companion change.
  • Tracked follow-ups

  • #1632 carries the questions only the criteria owner can settle: the oracle block's un-ignore sentences, which go stale once #1596 removes the attributes while its AC-1 forbids editing them; and the companion's identity check, which reads each body's top-level keys only while its doc comment claims no identity field was pasted at any depth.

  • #1634 carries the corrections owed before this merge. This head applies the commit-side ones (Oracle C's doc comment and the commit message), and this body applies the PR-text ones.
  • After polish

    After the polish phase, the oracle block's header comment and Oracle C's doc comment were re-anchored at fd8640b and #1613, the commit message was corrected, and the commit was rebased onto f29a6aa.

    Closes #1591

    🤖 Generated with Claude Code

    Diff: 429 lines (+321 / -108) across 5 files Reviewer: alexey-pelykh Review duration: 110m
    All Vouch review confidence checks passed
    Residual risk 0.27 = Change Risk (0.68) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.68 · 429 lines diff across 5 files
    0.68
    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.363
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.068
    Real PR Conversation Timeline
    1 comments
    "Review active on #1630"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    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: 68.3% (HIGH) · Higher = larger blast radius
    68.3%
    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: 27.0% · Safe to merge
    27.0%