Skip to content

docs(tier3): say where a refused claude-code attempt's coverage error appears - #360

Merged
rng1995 merged 3 commits into
mainfrom
naren/followup-347-refusal-docs-test
Nov 6, 2026
Merged

rng1995 merged 3 commits into
mainfrom
naren/followup-347-refusal-docs-test

Conversation

@rng1995

@rng1995 rng1995 commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #347, which merged before its review. #347 documents that when the safety classifier refuses one attempt, the arm "reports Scored attempt coverage is 59/60". tier3 evaluate does not print that line by default. With a completed baseline arm, the terminal shows only Tier 3 Evaluation: FAILED and a failure count. With --skip-baseline, the panel shows Scored attempts: 59/60. The line appears in the terminal only with --verbose and a baseline arm. It is always in the run's result.json execution errors.

  • docs/agents-and-sandboxes.mdx, the Troubleshooting entry in docs/tier3-live-evaluation.mdx and the docs(tier3): say that a refused attempt fails the arm's attempt coverage #347 CHANGELOG entry (Unreleased / Fixed, edited in place) now say that the run's result.json records Scored attempt coverage is 59/60.
  • The Troubleshooting entry points to tier3 evaluate --verbose, which lists the refused trial and its AgentSafetyRefusalError with or without a baseline arm. It also says that the execution errors call the trial an Unscoreable reward, not an agent runtime failure, because a refusal is the model's response to the case.
  • The rerun advice said to evaluate the refused case with another model, but the model is chosen per agent, not per case. It now says to run the arm with another model through --agent-model claude-code=MODEL.
  • The old behavior on routes that serve the fallback model is now described as "the attempt was scored", not "the arm succeeded". The arm succeeded only when nothing else failed.
  • The refusal docs test now builds the documented run, renders the verbose terminal summary and runs the validate gate. It finds the CHANGELOG entry by its opening words and checks key tokens instead of whole sentences.

Why

A user who searches the terminal for the documented line will not find it in a default run, and the advice to rerun the case on another model assumes a per-case model choice that does not exist. The test checked the docs only against the collector's string, used one case with one attempt, and did not check the validate --block-on-agent-eval claim. It also required exactly one Unreleased CHANGELOG block that names CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK, so any later entry that names the variable would break it.

Kept from public

  • No code changes. The refusal fallback switch and the collector are unchanged.
  • The collector still classifies AgentSafetyRefusalError as a trial failure (an unscoreable reward), not as an agent runtime failure. Main pins this in test_harbor_022_safety_refusal_exception_is_not_an_infrastructure_failure and its multi-step variant, so this PR documents the label instead of moving the refusal into the runtime failure set.
  • The terminal summary still folds the coverage message into the arm's (59/60 scored) label when no arm is usable.

Tests

  • tests/test_harbor_claude_refusal_fallback.py replaces the one-case coverage test with 5 cases:
    • the documented 20 cases x 3 attempts run with one refusal: the arm fails with exactly Scored attempt coverage is 59/60, the refused trial is a trial failure and not an agent runtime failure, and each of the three docs quotes exactly that message;
    • the verbose tier3 evaluate summary names the refused trial, with and without a baseline arm (2 cases);
    • validate --tier3 on the collector's own result for a refused attempt exits 1 with --block-on-agent-eval and 0 with --no-block-on-agent-eval (2 cases).
  • The first 3 cases fail against the docs on current main and pass with this change. The 2 validate cases pin behavior that main already has.
  • With a second Unreleased CHANGELOG entry that names the variable, the old docs test fails with ValueError: too many values to unpack and the new one passes.
  • tests/test_harbor_claude_refusal_fallback.py: 37 passed.
  • That module plus tests/test_harbor_collector_runtime_failures.py, tests/test_tier3_result_display.py, tests/test_commands.py, tests/test_accuracy_arithmetic.py, tests/test_oss_packaging.py, tests/test_tier3_public_runtime.py, tests/test_benchmark_rollout_docs.py, tests/test_ci_change_classifier.py, tests/ci/test_image_build.py and tests/tier3/test_private_loose_source.py on current main plus this change: 903 passed.
  • ruff check and ruff format --check are clean on the changed file, and scripts/check_oss_boundary.py passes.

🤖 Generated with Claude Code

rng1995 and others added 2 commits November 5, 2026 19:46
The refusal docs said the arm "reports `Scored attempt coverage is 59/60`",
but `tier3 evaluate` never prints that line by default: with a completed
baseline arm the summary shows only a failure count, and with no usable
arm the panel shows `Scored attempts: 59/60` instead. The line is in the
run's result.json execution errors, so the docs now say that, and the
Troubleshooting entry points to `tier3 evaluate --verbose`, which lists
the refused trial in both cases.

The Troubleshooting entry also says the refused trial is recorded as an
unscoreable reward, not an agent runtime failure, matching how the
collector classifies safety refusals. The rerun advice now names
`--agent-model claude-code=MODEL`, since the model is chosen per agent,
not per case, and the old behavior is described as the attempt being
scored rather than the arm succeeding.

The test now builds the documented 20 cases x 3 attempts run and checks
the exact 59/60 message, and renders the verbose terminal summary with
and without a baseline arm.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The refusal docs say `validate --block-on-agent-eval` exits 1 when a
refused attempt fails the arm's attempt coverage, but only the
`tier3 evaluate` half was checked, and the existing validate gating test
covers only Tier 3 verdicts whose execution succeeded. A new CliRunner
case feeds the collector's own result for a refused attempt through
`validate --tier3` and checks that the gate exits 1, and that the run
exits 0 with `--no-block-on-agent-eval`.

The docs test now finds the CHANGELOG entry by its opening words, so a
later Unreleased entry that names CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK no
longer breaks it.

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.

Reviewed the refusal coverage docs and the new test. The docs now quote the execution error users actually see in result.json (Scored attempt coverage is 59/60), and the --agent-model claude-code=MODEL rerun advice matches the CLI. Nothing blocking. I merged main into the branch to clear the conflicts in CHANGELOG.md and tests/test_harbor_claude_refusal_fallback.py.

@rng1995
rng1995 marked this pull request as ready for review November 6, 2026 12:20
@rng1995
rng1995 merged commit 7776eb6 into main Nov 6, 2026
19 checks passed
@rng1995
rng1995 deleted the naren/followup-347-refusal-docs-test branch November 6, 2026 12:20
rng1995 added a commit that referenced this pull request Nov 6, 2026
…Unreleased

Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote
bullets inside the 0.8.0 section and one added a new bullet there, so
main's 0.8.0 notes described behavior that 0.8.0 does not have. Two
fixes to 0.8.0 features added no entry.

- Restore the 0.8.0 section and everything below it to the tagged text,
  byte for byte.
- Move the agent skill entry (#366) to Unreleased, Added.
- Add Documentation entries for the 0.8.0 wording that #360, #361 and
  #363 corrected (refusal coverage error, inline short texts, capitalized
  HTTP prose that still warns).
- Add Fixed entries for #361, #365, #359, #364 and #363 that describe
  only what changed after 0.8.0. The #364 entry states that path masking
  skips text after a non-file: URL up to the next whitespace, which is
  how main behaves today.
- Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII
  finding kept the digest of its unmasked value.
- The refusal docs test now reads the Documentation correction, which
  matches the docs, and still requires the switch's entry in 0.8.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995 added a commit that referenced this pull request Nov 6, 2026
…Unreleased

Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote
bullets inside the 0.8.0 section and one added a new bullet there, so
main's 0.8.0 notes described behavior that 0.8.0 does not have. Two
fixes to 0.8.0 features added no entry.

- Restore the 0.8.0 section and everything below it to the tagged text,
  byte for byte.
- Move the agent skill entry (#366) to Unreleased, Added.
- Add Documentation entries for the 0.8.0 wording that #360, #361 and
  #363 corrected (refusal coverage error, inline short texts, capitalized
  HTTP prose that still warns).
- Add Fixed entries for #361, #365, #359, #364 and #363 that describe
  only what changed after 0.8.0. The #364 entry states that path masking
  skips text after a non-file: URL up to the next whitespace, which is
  how main behaves today.
- Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII
  finding kept the digest of its unmasked value.
- The refusal docs test now reads the Documentation correction, which
  matches the docs, and still requires the switch's entry in 0.8.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995 added a commit that referenced this pull request Nov 6, 2026
…Unreleased (#371)

Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote
bullets inside the 0.8.0 section and one added a new bullet there, so
main's 0.8.0 notes described behavior that 0.8.0 does not have. Two
fixes to 0.8.0 features added no entry.

- Restore the 0.8.0 section and everything below it to the tagged text,
  byte for byte.
- Move the agent skill entry (#366) to Unreleased, Added.
- Add Documentation entries for the 0.8.0 wording that #360, #361 and
  #363 corrected (refusal coverage error, inline short texts, capitalized
  HTTP prose that still warns).
- Add Fixed entries for #361, #365, #359, #364 and #363 that describe
  only what changed after 0.8.0. The #364 entry states that path masking
  skips text after a non-file: URL up to the next whitespace, which is
  how main behaves today.
- Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII
  finding kept the digest of its unmasked value.
- The refusal docs test now reads the Documentation correction, which
  matches the docs, and still requires the switch's entry in 0.8.0.

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.

2 participants