Skip to content

fix(tier3): compute judge scores from verdicts and save judge evidence - #303

Merged
rng1995 merged 22 commits into
mainfrom
naren/port-judge-contracts
Nov 5, 2026
Merged

rng1995 merged 22 commits into
mainfrom
naren/port-judge-contracts

Conversation

@rng1995

@rng1995 rng1995 commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

The Tier 3 LLM judges now return verdicts only, and the verifier computes every score from them. Invalid replies are retried once, and the retry names the exact problem. Every judge attempt is saved as redacted evidence.

  • Scores come from verdicts. The changes apply to both copies, the bundled verifier (templates/eval.py) and eval_core/llm_judge.py.
    • accuracy = passing criteria / 5.
    • goal_accuracy = 1.0 when achieved, else 0.0.
    • behavior_check = behaviors observed / expected behaviors.
    • A score field in a reply is ignored. The JSON schemas and prompts no longer ask for one.
    • Cases without ground_truth or expected_behavior still return main's N/A result, and the opt-in character facts are still appended to all three prompts.
  • Stricter reply validation.
    • accuracy needs all five true/false criteria. A reply with only a score is rejected.
    • behavior_check must judge each behavior exactly once by its integer step number. Duplicate, missing or out-of-range steps are rejected.
    • A salvaged truncated reply must also use valid, distinct step numbers. The behaviors after the cut still count as not observed, as before (see "Conflicts with open PRs").
    • A RAGAS goal score other than 0.0 or 1.0 falls back to the prompt judge. Before, it was clamped.
  • Accuracy grades the outcome.
    • SKILL_IDENTIFIED is replaced by FORMAT_FOLLOWED: the response follows any output format the question explicitly requires.
    • Every case and both arms use the same five criteria. Skill use is still scored by skill_execution.
    • The excluded_criteria / applicable-accuracy-criteria/v1 path is removed. report._applicable_accuracy_criteria still honors excluded_criteria in older rewards.
    • Both judge_accuracy copies still accept the skill_identification_applicable keyword and ignore it. Existing callers keep working, including the call site in open PR feat(plugin): Add Plugin evaluation support across all tiers #28.
  • Specific retries. The generic "could not be parsed or validated" reminder now names the problem, for example steps not judged: [2] or criteria has unexpected keys SKILL_IDENTIFIED. The behavior judge now goes through the shared _call_validated_json_judge, which gained an optional salvage hook for truncated replies.
  • Prompts.
    • Each judge shows an example that passes its own validator.
    • The behavior example has one entry per expected behavior. Before, it always showed two.
    • The goal prompt drops its empty AGENT'S TOOL CALLS section. The verifier always passed tool_summary="".
  • Saved judge evidence.
    • While main() runs the judges, the verifier writes judge_attempts.json next to skill_evaluator_reward.json, rewritten atomically after each attempt.
    • Each entry has the metric, attempt number, method (llm/ragas/salvage), judge model, status (accepted/rejected/error), and the problem.
    • Each entry also has the prompt and reply, plus a SHA-256 of the redacted prompt. Long text is bounded.
    • When behavior_check is scored from a truncated reply, both attempts stay rejected and an accepted salvage entry, numbered like the attempt it came from, holds the rebuilt results.
    • Redaction uses the verifier's existing helpers (_redact_evidence_text, _redact_configured_credentials, and the shared _SECRET_PATTERNS). Judge prompts quote agent commands, so it also masks credentials with no fixed key shape:
      • URL userinfo (https://user:token@host);
      • Authorization header values;
      • X-API-Key, Api-Key, X-Auth-Token, X-Access-Token and Private-Token header values;
      • every name=value pair of a Cookie header;
      • values of --token, --password, --api-key and similar flags;
      • -u / --user values in user:password form.
    • Each new pattern starts at a fixed literal and scans one bounded run, so long text stays linear. Ordinary options such as python -u, pip install --user, --max-tokens and --cookie-jar are left alone. A password glued to a short option (mysql -pVALUE) is not masked, because -p is also an ordinary option (mkdir -p).
    • Write failures are only logged and never change a score. A judge-deadline TimeoutError raised during the write is re-raised, not swallowed.
    • Judges called outside the verifier run write nothing.
  • Contract marker. Rewards record judge_contract: skill-evaluator-judges-v2, so scores from the old prompts are not mistaken for these. judge_contract is added to the reserved metadata names in metrics.py and custom_grader_runner.py, and to the custom-grader docs.
  • Docs (tier3-live-evaluation.mdx, custom-graders.mdx) and CHANGELOG (Added / Changed / Fixed under Unreleased, after v0.7.0) are updated.

Not in this PR:

  • Tool productivity. Counting Write/Edit/Grep/Glob/apply_patch/MCP calls as productive, and leaving planning calls out of the score, changes check_tool_efficiency. fix(tier3): count explicit root searches as wasted tool calls #229 (root-search waste) has merged, so this is the next follow-up, together with the Codex argv-list root-search case.
  • Rejecting partial behavior salvage. Open PR feat(plugin): Add Plugin evaluation support across all tiers #28 rejects a salvaged behavior reply unless it judges every step. That change is left to feat(plugin): Add Plugin evaluation support across all tiers #28. This PR keeps main's partial-salvage scoring and adds only the distinct-step check.
  • Dataset fairness for the baseline. This covers the create-eval-dataset template and LLM guidance, --refine skipping SKILL.md reads, a tier3 validate lint for skill-use prompts and assertions, and the bundled reference datasets. It touches separate dataset tooling and is left for its own PR.
  • Tier 2 rubric. A specific retry for invalid rubric replies. Different subsystem; the rubric already computes its score in code.
  • RAGAS transport capture. Saving RAGAS's own HTTP prompts and replies through an httpx response hook. This PR records the RAGAS outcome (accepted score, or why it fell back) but not RAGAS's internal requests. The path is narrow: it needs the canonical OpenAI endpoint and a non-reasoning judge model.

Why

The judges asked for both verdicts and a score, and the score could override the verdicts. I reproduced each case below against main with stubbed provider calls:

  • Custom goal judge. A reply of {"achieved": false, "score": 1.0} scored 1.0. This judge runs whenever RAGAS does not, which includes the default NVIDIA Build provider. The goal prompt's own example showed "score": 1.0 next to "achieved": true/false.
  • Accuracy. A score-only reply {"score": 99} was accepted and clamped to 1.0.
  • Behavior check. Two behaviors judged as steps [1, 1] scored 1.0, because only the entry count was checked.
  • Baseline bias. On positive cases, the no-skill baseline was graded on SKILL_IDENTIFIED ("Does the response reference or use the correct skill?"). A correct baseline answer was capped at 0.8, so accuracy lift was inflated on every run with a baseline. Skill use is already measured by skill_execution.

When a judge did fail, the generic retry reminder did not say what was wrong, and no prompt or reply was kept to see why.

Impact on scores. Baseline accuracy rises for correct answers that do not name the skill, so accuracy lift falls for the same runs. judge_contract marks the new scores. The metric set, score policy, lift computation, verdict gates and N/A handling are unchanged.

Related, already closed by narrower fixes: #189 (accuracy derived from criteria, PR #190) and #70 (one retry for malformed replies, PR #78). This PR builds on both.

Builds on merged PRs

  • Add opt-in Unicode character facts for Tier 3 judges #242 (character facts). The facts are appended after the new accuracy, goal and behavior prompts in both copies, with the same fields as before. Its tests in test_character_facts.py and test_judge_failure_artifacts.py scripted accuracy replies with the old criteria; they now use the five new criteria (FORMAT_FOLLOWED instead of SKILL_IDENTIFIED, no score).
  • Share deterministic grading and add bounded input readers #249 (shared grading). The saved-evidence redaction uses the _SECRET_PATTERNS name the template keeps from eval_core/checks.py.
  • Share trace evidence, applicable scores and security checks #258 (shared runtime evidence). Its N/A results for missing ground_truth / expected_behavior are kept in both copies. Its allow_not_applicable= arguments to _call_required_judge stay, inside the judge_attempts.json evidence context. Its skill_identification_applicable= argument is dropped from the accuracy call, since the keyword no longer has an effect.

Conflicts with open PRs

#28 (plugin evaluation). #28 rewrites the same judge code in both copies, so whichever PR lands second has conflicts to resolve and a scoring policy to settle. Merge order needs a decision. #28 already conflicts with current main in these files (14 hunks in templates/eval.py, 4 in eval_core/llm_judge.py, 1 in tests/tier3/test_judge_result_semantics.py). On top of main plus this PR, that becomes 18, 7 and 4.

#286 (RAGAS goal scorer port). No conflict with main; on top of this PR, 2 hunks in templates/eval.py and 1 in docs/tier3-live-evaluation.mdx.

Others. #259 (behavior bundle truncation) already conflicts with main in templates/eval.py and CHANGELOG.md, and this PR adds no new conflict with it. #264 (private runtime) merges cleanly. The open port PRs overlap only in CHANGELOG.md and, for some, other sections of tier3-live-evaluation.mdx. Open PR #302 reverts the v0.7.0 release commit and removes the ## 0.7.0 heading right below this PR's Unreleased entries. If it lands first, move this PR's Added, Changed and Fixed entries into the matching Unreleased subsections.

Kept from public

  • Error model. Failed judges still return bounded, redacted _judge_error dicts. _call_required_judge normalizes them and the verifier fails closed. No exception-based "judge unavailable" path was introduced.
  • N/A results. _has_judge_reference, _judge_not_applicable and the allow_not_applicable normalization are unchanged.
  • Transport and provenance. call_public_llm / _call_public_llm_with_provenance, the response_schema / schema_name structured output, schema downgrade, refusal fallback, and judge_model_used / judge_reasoning_effort / judge_fallback_used are unchanged. The model recorded for each saved attempt comes from _ACTIVE_JUDGE_CALLS or the call's provenance.
  • Two judge copies with parity tests. The host copy in eval_core/llm_judge.py is not deleted. It gets the same contract, and the shared-vs-template parity tests still run over both.
  • Behavior salvage scoring. A truncated reply's salvaged entries are still scored against the full behavior count. Unjudged behaviors count as not observed, and the reason says Salvaged k/N. Rejecting partial salvage is left to open PR feat(plugin): Add Plugin evaluation support across all tiers #28 (see above).
  • Hardened JSON parsing. extract_json / _extract_json and _salvage_behavior_results (duplicate keys, non-finite constants, nesting limits, append-only prefixes) are unchanged.
  • Redaction helpers. Saved evidence goes through the template's existing _redact_evidence_text, _redact_configured_credentials and _SECRET_PATTERNS first. The new userinfo, header and flag patterns run only on judge evidence, after those helpers.
  • RAGAS gating. RAGAS runs only for the canonical OpenAI endpoint with a non-reasoning judge and without character facts, within the judge time budget, and falls back to the prompt judge on any failure.
  • Reward path. write_reward_outputs now gets its sidecar directory from the shared _verifier_output_dir() helper. The resulting path is the same as before.

Tests

New file tests/tier3/test_judge_contracts.py (75 tests). All 75 fail against unmodified main. They cover:

  • Prompts. Each judge's prompt example passes its own validator and has no score, in both copies. The behavior example is valid for 1, 2, 3, 5 and 12 behaviors. The empty tool section is dropped and a real one is kept.
  • Scoring.
    • achieved: false, score: 1.0 scores 0.0.
    • Behavior replies with a duplicate, missing, out-of-range, missing-field or boolean step are retried with the exact problem, then rejected.
    • A salvaged reply with a repeated step is rejected.
  • Specific retries. Accuracy (malformed, score-only, old SKILL_IDENTIFIED key, missing criterion) and goal (string verdict, score-only, empty) replies are each retried once, and the retry names the exact problem.
  • Deprecated keyword.
    • judge_accuracy(..., skill_identification_applicable=True/False) gives the same prompt and result as a call without it, in both copies, and the keyword is not passed on to the transport.
    • _call_required_judge("accuracy", judge_accuracy, ..., skill_identification_applicable=False) scores normally.
  • Verifier runs.
    • The reward records judge_contract, and judge_attempts.json lists one accepted attempt per judge with model, reply and prompt hash.
    • A failed judge leaves two rejected attempts and no score. The retry wording appears in the second attempt's prompt only.
    • A truncated behavior reply scores 0.5 from its salvaged step, and the file shows two rejected attempts plus an accepted salvage entry for attempt 2 with the rebuilt results and no prompt.
    • A provider error is saved as an error attempt with the credential masked.
    • A configured credential, an sk- key and URL userinfo in the prompt are masked.
    • A write failure does not change scores.
    • A deadline TimeoutError during the write propagates.
  • Redaction. URL userinfo, Authorization headers (shell and JSON forms), X-API-Key (shell and JSON forms), PRIVATE-TOKEN, every Cookie pair, --token, --password= and curl -u user:password values are masked. python -u, pip install -U, pip install --user, git push -u, --max-tokens, --token-limit, --cookie-jar, plain URLs, mailto: and prose "Authorization" are left unchanged. The curl examples use repeated-letter credentials, which stay below Gitleaks' curl-rule entropy thresholds.
  • RAGAS. A non-binary RAGAS score (0.5, NaN) falls back to the prompt judge and is saved as a ragas error attempt. A binary RAGAS score is saved as an accepted attempt.
  • Reserved name. judge_contract is reserved metadata.

Existing tests updated to the new contract:

  • test_judge_result_semantics.py, test_accuracy_arithmetic.py, test_llm_judge.py, test_judge_parse_robustness.py, test_judge_failure_artifacts.py, test_judge_http_response_contract.py, test_behavior_evidence.py, test_evidence_compiler.py and test_character_facts.py.
  • Fixtures use the new criteria and step numbers.
  • The score-only and clamping tests now assert rejection.
  • The skill_identification_applicable tests are replaced by outcome-only accuracy tests, plus a report test for older rewards that still list excluded_criteria.

Results, on one commit on top of current main (v0.7.0). The full suite ran before the v0.7.0 release commit, which changes only version strings and the CHANGELOG heading; the judge, docs and CHANGELOG suites were rerun after rebasing onto it.

  • Judge suites (the nine files above plus test_judge_contracts.py): 815 passed. The 13 test_generated_custom_only_script_* cases in test_judge_failure_artifacts.py run the generated script with the host python3. They fail on this machine's Python 3.9 on unmodified main too, and pass with Python 3.12 first on PATH.
  • Docs and CHANGELOG tests (test_oss_packaging.py, test_tier3_public_runtime.py, test_ci_change_classifier.py, test_benchmark_rollout_docs.py): 432 passed.
  • Full suite, pytest -n 8 with Python 3.12 first on PATH: 18696 passed, 29 skipped, 23 failed.
    • Two failures are the *sidecar_retains_* tests in test_harbor_secure_docker_environment.py. They read host env and fail on unmodified main on this machine too.
    • The other 21 are process-timing and Bedrock preflight tests in test_harbor_local_mode.py, test_harbor_runner_status.py and test_harbor_runtime_preflight.py, run under a host load average of about 35. Rerun serially, all 155 selected tests in that group passed.
  • ruff check passes on src and tests.
  • ruff format --check:
    • Passes on the changed source files and new tests, including templates/eval.py.
    • test_behavior_evidence.py and test_evidence_compiler.py already have formatting drift on main, outside the hunks this PR touches.
  • scripts/check_oss_boundary.py passes.
  • Gitleaks with the repository config, over the PR's commit: no leaks found.
  • No live judge run. All judge replies in the tests are scripted.

🤖 Generated with Claude Code

The Tier 3 LLM judges were asked for both verdicts and a score, and some
replies were scored from the number instead of the verdicts:

- The prompt-based goal_accuracy judge, which runs whenever RAGAS does
  not (including with the default NVIDIA Build provider), let a reply's
  score override its achieved verdict, so achieved=false with score=1.0
  scored 1.0.
- An accuracy reply with only a numeric total was accepted and clamped
  into 0..1, so a reply of {"score": 99} scored 1.0.
- A behavior_check reply was checked only for its entry count, so two
  behaviors judged as steps [1, 1] scored 1.0.
- Positive cases graded the no-skill baseline on SKILL_IDENTIFIED, which
  capped a correct baseline answer at 0.8 and inflated accuracy lift.

Judges now return verdicts only and the verifier computes every score:
accuracy is passing criteria / 5, goal_accuracy is 1.0 when achieved
and 0.0 otherwise, and behavior_check is the share of behaviors
observed, each judged exactly once by its step number. A score field in
a reply is ignored and the schemas and prompts no longer ask for one.
Accuracy replaces SKILL_IDENTIFIED with FORMAT_FOLLOWED, so every case
and both arms use the same five outcome criteria; skill use stays in
skill_execution. Both judge_accuracy copies still accept the
skill_identification_applicable keyword and ignore it, so existing
callers keep working. A RAGAS score that is not 0.0 or 1.0 falls back
to the prompt judge. The N/A results for cases without ground_truth or
expected_behavior and the opt-in character facts are unchanged.

An invalid reply is retried once with the exact problem (for example
"steps not judged: [2]") instead of a generic reminder. The behavior
prompt example has one entry per expected behavior, and the goal prompt
drops its empty tool-call section.

The verifier writes every judge attempt to judge_attempts.json next to
skill_evaluator_reward.json as it happens, so a failed judge leaves
evidence. A behavior_check score rebuilt from a truncated reply adds a
"salvage" entry. Saved prompts and replies are bounded and redacted with
the verifier's existing helpers, plus masking for URL userinfo,
Authorization, API-key, token and Cookie header values, and credential
flag values such as --token and curl -u user:password. A judge deadline
during the write is re-raised, and write failures never change a score.
Rewards record judge_contract: skill-evaluator-judges-v2, which is a
reserved metadata name for custom graders.

The host copy in eval_core/llm_judge.py gets the same contract, and
reports still honor excluded_criteria in older rewards. The character
facts tests now script accuracy replies with the five new criteria.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review: 6 findings (0 P1, 3 P2, 3 P3); 5 posted inline.

Findings outside the diff or about the description:

  • PR_DESCRIPTION: P3: The PR text still treats #302 as open and main as v0.7.0, but #302 merged on 2026-10-30. This branch's single commit now sits on that revert (a61e1f3), so there is no v0.7.0 base. These sentences are out of date:

  • The Summary says the CHANGELOG entries are "under Unreleased, after v0.7.0".

  • Conflicts > Others says "Open PR #302 reverts the v0.7.0 release commit ... If it lands first, move this PR's Added, Changed and Fixed entries into the matching Unreleased subsections."

  • Tests says the results were taken "on top of current main (v0.7.0)", with the full suite run "before the v0.7.0 release commit".

At the PR head, CHANGELOG.md has no ## 0.7.0 heading, and the next heading after ## Unreleased is ## 0.6.0 - 2026-10-20. The new entries are already under Unreleased ### Added, ### Changed and ### Fixed, so the move the text asks for is already done. A reviewer who follows the merge-order note will look for a heading and a conflict that no longer exist, and the Results paragraph describes a base the branch is no longer on.

Suggested fix: In the Summary, Conflicts and Tests sections, say the PR is based on the #302 revert (a61e1f3), drop the "if #302 lands first" instruction, and say the CHANGELOG entries are already in the Unreleased Added, Changed and Fixed subsections. Then restate which test results apply to that base.

Comment thread docs/tier3-live-evaluation.mdx Resolved
Comment thread tests/tier3/test_judge_contracts.py Resolved
rng1995 and others added 8 commits November 2, 2026 11:15
No conflicted files.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dge evidence

The judge-evidence Authorization pattern only knew the Bearer, Basic and
Token schemes, so "Authorization: ApiKey VALUE" (or Bot, SSWS, ...) masked
the scheme word and kept the credential. The header patterns also stopped
at the "]" of the Python subscript form, so headers["Authorization"] = "..."
and headers["X-API-Key"] = "..." were saved unchanged.

The Authorization value is now masked up to its closing quote or the end
of the line, and all three header patterns accept an optional "]", ":" or
"=", and an f/r/b/u string prefix before the value's quote.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
FORMAT_FOLLOWED told the judge to answer true whenever the question
requires no format, so a trial that ran but gave no answer scored 0.2
instead of 0.0. Both judge copies now make that default true only when
the response gives an answer, and the prompt says every criterion is
false when the evidence holds no answer. Docs and CHANGELOG say so.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The negative behavior fixtures still salvaged entries without a "step",
so they failed closed on the step check whatever the salvage parser did.
Removing the duplicate-key/non-finite hooks, the nesting limit, the
structural-prefix check or the append-only check failed no test.

Every entry in those fixtures now has a valid, distinct step, so each
case can fail only on the check its id names. The accuracy duplicate,
NaN and Infinity score cases carry all five criteria, and boolean-score
is dropped from the reject list because a boolean score next to valid
criteria is ignored by design. Each guard removal now fails 4-22 tests.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The docs and the salvage comment said both behavior attempts stay
"rejected" when the score comes from a truncated reply. When the retry
fails in transport, the second attempt is saved as "error", and the
salvage entry is numbered like the truncated first attempt. A verifier
run test now pins that sequence.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
No test used a prompt or reply longer than the saved-evidence limits, so
dropping the cut, or cutting before redaction, passed every test. The new
test records an attempt with a prompt and a reply over 50,000 characters, each
holding a configured credential across the cut point, and checks that
both fit their limits and that no part of the credential is saved.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
No conflicted files.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
No conflicted files.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read both judge copies, the verifier wiring and the evidence writer end to end, and checked the scoring paths. Scores now come only from the verdicts, the step checks reject repeats and gaps, and I could not find a path where a reply's score still counts. The two problems are in the saved-evidence redaction, which the docs and CHANGELOG say masks these values: quoted flag values like --password='x' are saved in clear, and an Authorization value is only masked for its first 256 characters, so the tail of a long token is saved. The scheme and subscript header handling and the FORMAT_FOLLOWED change look right to me.

Not blocking: judge_attempts.json is written into the Harbor trial directory, and those directories are deleted at the end of a run unless --harbor-keep-jobs is set. The docs say so, but nothing in the report or in the reward error text points at the file. A user who only sees that a judge failed has no hint to rerun with the flag, so a short line in the evaluation error text or the run summary would help.

rng1995 and others added 11 commits November 3, 2026 08:58
Behavior and goal prompts render tool-call arguments with json.dumps, so
header names and values in an agent's Bash or python -c command reach
judge_attempts.json with escaped quotes (\"Authorization\": \"ApiKey ...\").
The header separator now allows a backslash before each quote, so these
forms are masked like their unescaped versions.

Digest values hold quoted fields, so they are masked up to a single quote,
backtick or the end of the line. A quoted token after Bearer, Basic or
Token ('Bearer "token"') is masked as well.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The accuracy prompt said every criterion is false when the evidence holds
no answer, naming a refusal as an example. For a case whose expected
answer is a refusal, a judge could then score a correct refusal 0.0. Both
prompt copies and the tier3 docs now make an exception for an expected
refusal.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts: CHANGELOG.md, docs/tier3-live-evaluation.mdx.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…judge evidence

Quoted --password/--token/-u user:password values were left in
judge_attempts.json, and an Authorization value over 256 characters kept
its tail. Mask both and add redaction cases.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
No conflicts.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
No conflicts.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ests

The curl -u fixture added to the judge evidence redaction tests trips the
curl-auth-user rule, and Gitleaks scans the full branch history, so a
later edit cannot clear it. Allow that one value, in that one test file,
for that one rule, and pin the scope of curl-auth-user allowlists.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
No conflicts.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
No conflicts; picks up the branch update from main.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up on the current head. The quoted-flag and long Authorization fixes work for the cases I reported: I re-ran them, plus a 900-character Bearer token and a 700-character Digest value, through _redact_judge_evidence, and all are masked. The JSON-escaped header handling and the refusal exception in both accuracy prompt copies read correctly. One gap remains, inline: a quoted flag value longer than 256 characters is not masked at all.

Handle quoted credential and user values of any length in judge evidence redaction.

Signed-off-by: Christopher Kevin <[email protected]>
@rng1995
rng1995 merged commit 80dff4c into main Nov 5, 2026
22 checks passed
@rng1995
rng1995 deleted the naren/port-judge-contracts branch November 5, 2026 16:56
rng1995 added a commit that referenced this pull request Nov 5, 2026
Resolve conflicts with #303's judge contract:

- judge_goal_accuracy: keep this PR's redacted warning when RAGAS falls
  back, plus main's judge_attempts.json records for the failed and the
  accepted RAGAS attempt.
- _judge_goal_accuracy_ragas: keep main's binary-score check (which also
  rejects NaN) in place of the finite check, plus this PR's judge-model
  provenance and _record_judge_call.
- docs/tier3-live-evaluation.mdx: describe both the non-binary fallback
  and the warning and method fields.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Accuracy judge accepts totals that contradict its five-criterion verdicts

2 participants