Skip to content

fix(evals): name the denied calls in run-validity's INVALID verdict - #17427

Merged
kyle-sexton merged 5 commits into
mainfrom
fix/evals-name-denied-calls
Nov 19, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
fix/evals-name-denied-calls

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Refs: #17262

Summary

A hosted plugin-eval run keeps only the last two lines of run-validity.py's output (the bash ran: line and the verdict), so an INVALID run such as event-storming simulation-default-markdown in run 44491110394 reported INVALID (5 permission denials in the traces) without naming any denied call. The verdict now names them, so validity.txt and the step summary show what was denied.

Fix

  • check_denials' FAIL reason now ends with the calls it counted, for example 3 permission denials in the traces: Read `.../grading.md` x2, Read `.../success-criteria.md` . Each entry gives the tool and its target: a path, a command, or network-outbound <hosts> for a sandbox network denial.
  • Each target is redacted with the gitleaks redactor the repo already uses (lib/redact.py plus the vendored gitleaks rules). After redaction, whitespace and control characters collapse to single spaces, backticks become ', and the target is cut to 120 characters. A call repeated across runs appears once with xN, and at most 10 calls are listed, then +K more. If the redactor cannot load, or fails closed, the reason names only the tools.
  • The evals plugin now carries a generated copy of lib/redact.py at plugins/evals/scripts/redact.py and the vendored rules and license at plugins/evals/vendor/gitleaks/. Both are registered in scripts/shared-copies.txt, and the rules and license are checked by scripts/gitleaks-vendor-copies.test.sh.
  • No workflow file changes. The bash ran: line stays second to last and keeps its format, so the six grep -xE lines in pr-run-plugin-evals.yml and maintenance-measure-skill-edit-pass.yml match as before. win-test.py still reads ^verdict: VALID.
  • The branch is updated from main, which now has fix(evals): stop counting no-Bash-tool results as Bash that ran #17425. That PR added an optional , absent tool N ending to the bash ran: line and to the workflows' grep. The test's copy of that grep (WORKFLOW_BASH_RAN_GREP) takes the same ending, so it stays the pattern the workflows run. The two PRs' edits to run-validity.py and test_run_validity.py merged without conflict.

Verification

  • python3 plugins/evals/skills/plugin-eval/scripts/test_run_validity.py: 188 tests, OK, on the head updated from main (183 before the update). New tests cover:
    • a GitHub token, a bearer token and a home path redacted in the verdict;
    • a multi-line command carrying ::error:: flattened onto the verdict line, with the line before it still matching the workflows' bash ran: regex;
    • truncation;
    • the 10-call cap with counted repeats;
    • the network-denial host;
    • the vendored redactor loading its rules;
    • tool names only when no redactor loads;
    • a non-text target shown as JSON.
  • The four existing exact-verdict assertions now expect the named calls.
  • scripts/sync-shared-copies.sh --check and --check-bump origin/main, scripts/gitleaks-vendor-copies.test.sh, scripts/check-cross-plugin-source-drift.sh --check, scripts/check-changelog-fragments.sh --check, and scripts/run-ruff.sh check on the changed Python files: all pass.

Remaining

This pull request delivers the means to identify the denied call: the verdict now names it. Still
open under #17262:

Related

🤖 Generated with Claude Code

A hosted eval keeps only run-validity's verdict line, so an INVALID run
said "5 permission denials in the traces" and nothing about which calls.
The permission-denials reason now names each counted call, its tool and
target, redacted by the vendored gitleaks redactor, flattened to one line,
cut to 120 characters, repeats counted, at most 10 named; with no
redactor it names the tools only. The bash ran line and the workflows are
unchanged.

The evals plugin carries a generated copy of lib/redact.py and the
vendored gitleaks rules and license, registered in shared-copies.txt and
the vendored-copies test.

Refs: #17262

Co-authored-by: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 19, 2026 09:55
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T09:59:11.171141Z b5bd33c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed d584236c9c61e147ce809e46b0a4bf45f3e63432: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found (incremental, blocking only)

This lane already reviewed an earlier head, so this pass reports only CRITICAL and IMPORTANT findings. It found neither. It covers the two files changed since 6c09def5, and I read every hunk of both in the incremental diff.

What changed and what I checked

  • .gitleaksignore: one new line, plugins/evals/vendor/gitleaks/gitleaks-rules.json:aws-amazon-bedrock-api-key-short-lived:165. This entry matches the existing ones for the other vendored copies of the rules file (corrections, explainer-video, reviewer-media, speech).
    • It is pinned to one file, one rule and one line, the rule's own regex in the vendored rules JSON. It does not exempt a directory or a whole rule.
    • An earlier review found this file is a byte-for-byte copy checked by scripts/gitleaks-vendor-copies.test.sh, so the exemption covers rule text, not a credential.
  • test_run_validity.py: test-only. The mixed-run assertion now expects the settings path after redaction, as the verdict prints it: it loads run-validity.py with importlib and calls load_redactor().redact(...).
    • The module path is the test's fixed SCRIPT constant, so no input decides what loads.
    • No production code, workflow, trust control, plugin manifest, standing instruction or billing surface changes.

Neither changed file matches a trusted-path glob. The PR context file contains no embedded instructions to the lane.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 1 inline finding(s) on b5bd33c73c40bf0b7d0eaeb3c5defbc2f95a9626; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed d584236c9c61e147ce809e46b0a4bf45f3e63432: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: incremental since 6c09def (blocking only)

This lane already reviewed earlier heads of this pull request, so this review was blocking only. I read the whole change to both files in .claude-lane/incremental.diff: .gitleaksignore and plugins/evals/skills/plugin-eval/scripts/test_run_validity.py. Nothing blocks.

Earlier advisory finding is fixed. The earlier thread said the exact-verdict assertion would fail on Windows because the redactor rewrites the C:\Users\... temp path to ~ (discussion_r4627081897). This push fixes it: the expected string is now built from module.load_redactor().redact(settings) through an in-process load (test_run_validity.py#L1868-L1881). That load uses the same steps as NamedCallsTest.setUpClass. The verdict also turns whitespace into spaces and cuts targets at TARGET_CHARS = 120 (run-validity.py:240, :2768-2770). Neither changes a normal temp path such as /tmp, /var/folders or RUNNER~1, so the expected string matches.

.gitleaksignore. The new entry plugins/evals/vendor/gitleaks/gitleaks-rules.json:aws-amazon-bedrock-api-key-short-lived:165 matches the vendored file. Line 165 is that rule's own regex literal, the same false positive the sibling vendored copies already list.

The tests the PR says pass are the author's claim and are unverified. This lane has no shell, so I ran nothing.

Closing issue. The PR text only says Refs: #17262 and has no closing-issue section, so there are no acceptance criteria to check.

Loosened checks. No loosened_check_* lines were supplied, so I used the defaults: verdict fail, no consumer entries. The citation requirement was not checked. The rewritten assertion still checks the full verdict string exactly, so it loosens nothing.
Loosened-check verdict: fail (default, no settings line supplied); patterns: 0

No manifest changed, and nothing here can cause a charge.

Verifier dropped 0 of 0 candidates.

kyle-sexton and others added 2 commits November 19, 2026 05:01
…ending

The workflows' grep -xE for the bash ran line now accepts an optional
", absent tool N" ending. The test's copy of that pattern takes the same
ending, so it stays the pattern the workflows run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/fix-ci
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none (read lane)
Run 44523021363

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-patch
Model rung 0
Leg base
Run job success
Activity step skipped
Commits pushed none recorded
Run 44523021363

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

The pr-unblock lane stopped fix-ci on this pull request: the lane could fix a failing check only by weakening a test, which is refused, so it runs one fresh fixer round on this head that must keep the test's assertions. The lane sets no label: the run ends in a failing pr-unblock/fix-ci status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=17427 -f activity=fix-ci

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44523021363

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

kyle-sexton and others added 2 commits November 19, 2026 09:15
The evals plugin's copy of gitleaks-rules.json holds the same rule text
at line 165 that the gitleaks scan reads as an
aws-amazon-bedrock-api-key-short-lived match. Each of the other six
vendored copies has this path-form entry; the evals copy now has it too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The mixed-run test expected the raw temp path in the INVALID verdict. On
Windows the temp root is under C:\Users\<name>, which the redactor's
home-path pass turns into ~, so the assertion failed there. The expected
target now goes through the same redactor.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit b2ceef9 Nov 19, 2026
59 checks passed
@kyle-sexton
kyle-sexton deleted the fix/evals-name-denied-calls branch November 19, 2026 14:46
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant