fix(judge): harden runtime validation and weighted evidence - #1019
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Caution Review failedAn error occurred during the review process. Please try again later. 📝 WalkthroughWalkthroughThe changes replace production ChangesRuntime validation checks
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: 🔵 Low · up to The branch still includes an unintended repository artifact that the change description says should be removed; deleting it avoids carrying unrelated automation content into the product, with no other merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current headdc15bed96f35ce44cfb88592bc47f3222deb8c07. -
Head SHA:
dc15bed96f35ce44cfb88592bc47f3222deb8c07 -
Workflow run: 32221092626
-
Workflow attempt: 1
Coverage evidence
Coverage evidence job did not run or did not publish coverage evidence.
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (3 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (3 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: 1019-judge-runtime-assertion-safety.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: 1019-judge-runtime-assertion-safety.md"]
R2 --> V2["docs review"]
Evidence --> S3["Test: test_judge_runtime_assertion_safety.py"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test: test_judge_runtime_assertion_safety.py"]
R3 --> V3["targeted test run"]
OpenCode Review Overview
Pull request overviewOpenCode cannot approve yet because required coverage evidence did not pass. Review outcome1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
Coverage evidenceCoverage Decision
Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (3 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (3 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: 1019-judge-runtime-assertion-safety.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: 1019-judge-runtime-assertion-safety.md"]
R2 --> V2["docs review"]
Evidence --> S3["Test: test_judge_runtime_assertion_safety.py"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test: test_judge_runtime_assertion_safety.py"]
R3 --> V3["targeted test run"]
|
|
@opencode-agent review Fresh re-review request: ContextualWisdomLab/.github#1136 has merged, fixing the central Generated by Claude Code |
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current headdc15bed96f35ce44cfb88592bc47f3222deb8c07. -
Head SHA:
dc15bed96f35ce44cfb88592bc47f3222deb8c07 -
Workflow run: 32224979764
-
Workflow attempt: 1
Coverage evidence
Coverage evidence job did not run or did not publish coverage evidence.
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (3 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (3 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: 1019-judge-runtime-assertion-safety.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: 1019-judge-runtime-assertion-safety.md"]
R2 --> V2["docs review"]
Evidence --> S3["Test: test_judge_runtime_assertion_safety.py"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test: test_judge_runtime_assertion_safety.py"]
R3 --> V3["targeted test run"]
|
@opencode-agent Please review exact current head |
|
@opencode-agent review Review current exact head |
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current head9e456b4b0c08ced956bdf0c72228fc6a0f95017d. -
Head SHA:
9e456b4b0c08ced956bdf0c72228fc6a0f95017d -
Workflow run: 32251845609
-
Workflow attempt: 1
Coverage evidence
Coverage Decision
- Result: FAIL
- Test evidence: not proven passing
- Docstring evidence: not proven passing when configured
- Failure count: 2
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (3 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (3 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: 1019-judge-runtime-assertion-safety.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: 1019-judge-runtime-assertion-safety.md"]
R2 --> V2["docs review"]
Evidence --> S3["Test: test_judge_runtime_assertion_safety.py"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test: test_judge_runtime_assertion_safety.py"]
R3 --> V3["targeted test run"]
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current head9e456b4b0c08ced956bdf0c72228fc6a0f95017d. -
Head SHA:
9e456b4b0c08ced956bdf0c72228fc6a0f95017d -
Workflow run: 32286166270
-
Workflow attempt: 1
Coverage evidence
Coverage Decision
- Result: FAIL
- Test evidence: not proven passing
- Docstring evidence: not proven passing when configured
- Failure count: 2
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (3 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (3 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: 1019-judge-runtime-assertion-safety.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: 1019-judge-runtime-assertion-safety.md"]
R2 --> V2["docs review"]
Evidence --> S3["Test: test_judge_runtime_assertion_safety.py"]
S3 --> I3["regression suite"]
I3 --> R3["Review risk: Test: test_judge_runtime_assertion_safety.py"]
R3 --> V3["targeted test run"]
|
@opencode-agent review Please re-review exact current head |
|
Exact-head validation for 9e456b4 completed.
Please re-run the current-head OpenCode/coverage review against this exact SHA. |
|
Correction for exact-head validation of 9e456b4.
Please re-run the current-head OpenCode/coverage review against this exact SHA. |
|
Scheduled review-feedback autofix for this PR head.
|
|
Caution Review failedAn error occurred during the review process. Please try again later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…eights The plain scoring path (no category_count) trusted the model's own self-reported top-level score for accept/reject instead of deriving it from criterion_scores and each JudgeCriterion.weight, unlike the three category_count-based paths, which already discard the self-report in favor of a mechanically recomputed weight-aware average. A model could report a high aggregate score while scoring low on a heavily-weighted criterion and still be accepted (#1238). Two individually finite, positive criterion weights can still overflow their sum (e.g. 1e308 each), silently collapsing a weighted score to an incorrect finite value instead of failing closed. Reject a non-finite aggregate criterion weight before any contextual-orchestrator transport call, via a shared _finite_sum/_weighted_average helper used by all three weighted-score paths (#1235). Supersedes #1236 (closed unmerged due to stale branch lineage; finding confirmed valid by maintainer) as a compatible successor commit on this PR's existing branch, per #1235/#1238.
|
Added a successor commit (`e4d1700`) reconstructing #1236 (closed unmerged due to stale branch lineage, finding confirmed valid) as a compatible addition to this branch, plus the aggregate-weight-overflow protection required by #1235:
Full repo suite (4568 tests) green on this branch after a from-scratch Rust extension rebuild. Closes #1235, closes #1238. |
|
Caution Review failedAn error occurred during the review process. Please try again later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@opencode-agent please re-review — this PR's CHANGES_REQUESTED review appears stale (all current checks pass on this head). This is a score-integrity hardening PR; re-approval would help unblock the fast-mlsirm backlog per ContextualWisdomLab/.github#1212. |
Closes #1235.
Closes #1238.
Defects
This branch now owns two compatible LLM-judge reliability/data-integrity slices on the same mutable
llm_judge.pylane.llm_judge.pyandjudge_calibration.pyusedassert. Python removes those statements under-O/-OO, so invalid internal states could proceed or fail incidentally instead of through the package-owned validation contract.scoreinstead of deriving the authoritative decision from validated per-criterion evidence and configured weights.The second slice was originally intended for a stacked successor (#1239), but this exact branch advanced independently from
4163bbb42763282c0b7729c37e8b919895141a5ftoe4d170040ed2230bef8133855826fbdfaec29b86with that bounded implementation already present. Fresh delta inspection and current tests confirm it satisfies #1235/#1238, so the live implementation is adopted here rather than duplicated or force-rebased.Fix
ValueErrorfailures;RuntimeErrorfailures;.jules/sentinel.mdsecurity-learnings artifact referenced byCLAUDE.md;score, but derive the authoritative direct-path score and accept/reject decision from validated criterion scores and configured weights;Regression evidence
tests/test_judge_runtime_assertion_safety.pyrejects productionast.Assertregressions and provespython -Okeeps the package-owned validation behavior.tests/test_llm_judge.py::test_direct_judge_derives_score_from_weighted_criteria_not_self_reportproves a misleading top-levelscore=0.9yields the configured weighted score0.375and rejection.tests/test_llm_judge.py::test_criteria_reject_overflowing_aggregate_weight_before_any_transportproves two individually valid1e308weights fail closed before any orchestrator call.Exact lineage
091d78bbe4d7071237428e94c38823390590c2c6;08c4044dc7c43d933970632d5b172dab2bf75fa6;dc15bed96f35ce44cfb88592bc47f3222deb8c07;4163bbb42763282c0b7729c37e8b919895141a5f;e4d170040ed2230bef8133855826fbdfaec29b86.Current protected base at this update:
main@04d0bc21a2a20693bcf16108cd76d394fe844d23.Current exact head at this update:
e4d170040ed2230bef8133855826fbdfaec29b86.The repository-local CI, Security Scan, SAST Semgrep, and CodeQL workflows are exact-head green. Historical
CHANGES_REQUESTEDreviews are bound to predecessor heads and remain historical evidence; current integration still requires all applicable same-head central coverage/review/package/SBOM/provenance gates. No self-approval or gate bypass.No MLSIRM/IRT likelihood, estimator, calibration statistic, uncertainty, or Rust numerical kernel is changed.