← Back to Pull requests

fix(scoring): withhold on judge failure, and stop two detector false zeros #20

Closed
unknown closed this pull request without merging on Sep 09, 2026 03:34 UTC
View on GitHub
unknown unknown commented on Sep 09, 2026 02:04 UTC
Author

Split out of #14 so it can be reviewed on its own. Code only — the JUDGE_MODEL value correction and its docs stay on #14. 1660 tests pass, ruff clean.

1. A dead judge read as a dead agent

checklist.py counted every item the judge could not evaluate as a failure. With JUDGE_MODEL pointing at an id the endpoint does not serve, every GEval raised and the run published "Passed 0 out of N checks" with zero Check: keys beside it.

The signature is unambiguous across both corpus trees:

| judgeModel | 0.0 with NO per-check verdicts | 0.0 with verdicts | nonzero |
|---|---|---|---|
| None | 0 | 6 | 51 |
| gemini-3.1-pro | 10 | 0 | 0 |

The ten affected runs had deterministic correctness of 0.889 to 1.000.

Unjudged items now leave the denominator. When none could be judged the metric abstains entirely, so the composite withholds instead of publishing a zero as if it had been measured.

2. Two detector false positives

Both hit tasks whose prompt sends the agent into the operator's home for a fixture:

  • ls -la ~ prints bench.env and matrix-runs into tool output, matching the harness-environment rule — a flag for material the agent never opened.

  • A stale copy of a delivered input becomes a content fingerprint, and the agent matches it by reading the current copy: the two are byte-identical, both seeded from the same file in the stack. One run was flagged for cat ~/cve-advisory-<cluster>.json, exactly what its prompt instructed.
  • Both are now filtered by the prompt — the same authorization the detector already applies to path rules. narrow_home_listing_rules restricts the bare-filename rule to args for records whose prompt names a home fixture; drop_fingerprints_matching_inputs drops any rule whose pattern matches the content of an input the prompt named.

    Replayed over the corpus, all five flagged runs go clean:

    claude_code/cve-remediation        before=flagged [harness-environment]  after=clean
    claude_code/migration-and-upgrade  before=flagged [harness-environment]  after=clean
    claude_code/opa-remediation        before=flagged [harness-environment]  after=clean
    claude_code/spot-rebalancing       before=flagged [harness-environment]  after=clean
    antigravity/cve-remediation        before=flagged [prior-run-artifact]   after=clean
    

    The deliberate passive-sighting control is preserved: its existing test still passes, because a sighting is only excused for records whose prompt authorized the agent to be in home.

    Scope

    Five runs were hit by both defects, so their zeros need this plus a re-judge — the tool for that is in #13, which depends on this PR and refuses to write without it.

    New tests: judge-evaluates-nothing withholds, partial outage scores over what was judged, fully-judged path unchanged.

    Diff: 352 lines (+264 / -88) across 4 files Reviewer: isadominguez314 Review duration: 89m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.47) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 352 lines diff across 4 files
    0.47
    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%
    56%
    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.351
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #20"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 47.5% (MEDIUM) · Higher = larger blast radius
    47.5%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 20.5% · Safe to merge
    20.5%