Skip to content

refactor(harness-ops): simplify behavior-probes case helpers (3 of 4) - #14832

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14529-42681088836-1
Nov 9, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14529-42681088836-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14529

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Reviewed the 15 listed behavior-probes files against /simplify's four checks and applied only edits that keep behavior the same. The six lane-permissions scaffolds are already one-line calls to lane-checkout.sh, and commit-f-hook.py, bot-thread-repo.sh, commit-ready-repo.sh, diverged-repo.sh, effort-probe.sh, GH -stub.sh and lane-checkout.sh are already minimal, so they are unchanged. In autocompact-project.sh the second ${PROBE_MODEL:?...} guard was redundant, because the same branch already checks the variable on the line above. In eval-tools-check.py, an empty try/except OSError: pass became contextlib.suppress(OSError), and the ran/denied/refused branch now tests is_error once instead of twice. A proposed pathlib rewrite of the trace-path join was reverted after review: on Windows with Python 3.12 or older it can resolve a rooted path such as \foo to a different drive, and it changes the error text for a non-string tracePath.

Not verified

  • Did not run test_probe.py or any other Python or shell test here, because this lane runs only the named wrappers. The PR's CI runs the suites.
  • Tidy pass 5 could not run detect.sh or digest-guard.sh because this lane's Bash allows only the named wrappers. The one-line fragment was checked against the rubric by reading it, and no fix was needed.
  • Did not run markdownlint on the changelog fragment because this lane's Bash allows only the named wrappers. check-changelog-fragments validated it.
  • Untracked dotfiles at the checkout root (.bashrc, .bash_profile, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc) were not created by this run, and the run left them as found. They should be kept out of the patch.

Fix

  • plugins/harness-ops/skills/behavior-probes/cases/lib/autocompact-project.sh: the printf argument uses $PROBE_MODEL directly; the ${PROBE_MODEL:?set by probe.py} guard on the same branch's earlier line already stops the script when it is unset
  • plugins/harness-ops/skills/behavior-probes/cases/lib/eval-tools-check.py: remove_tree uses contextlib.suppress(OSError) in place of try/except/pass; states() checks is_error once to choose between ran, denied and refused
  • .changes/harness-ops/work-resolve-issue-issue-14529-42681088836-1-09632443.md: new patch fragment, '### Changed' with 'Internal simplification, no behavior change.'

Verification

The runner ran each check from the base copy against d822218:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 12 fragments valid (run after the last edit)
  • check-changed-skills: behavior-probes PASS, 0 errors; its 2 warnings (SKILL.md cites #N on lines 86 and 94, body is 176 lines) are about SKILL.md, which this change does not touch
  • check-affected: 14 passed, 5 skipped (typos not installed, and checks that run code from the checked tree), over 3 changed files
  • fresh-context review subagent: no output, exit-code or result change in the autocompact-project.sh hunk, the states() hunk or the remove_tree hunk; it flagged a Windows-only difference and a changed error text in the trace-path hunk, which was reverted
  • grep of plugins/harness-ops: test_probe.py runs eval-tools-check.py from a copy and asserts each watched-tool state (ran, denied, refused, not-called, absent); no test reads the lines changed in autocompact-project.sh
  • tidy (code-tidying:tidy-diff over tidy-lines.tsv): no row dropped; passes 1 to 3 found no further edit; pass 4 (write-for-humans) left the fragment's required wording unchanged; pass 5 (ai-slop rubric, read by hand) found no tells
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42681088836

Left out: the items under Not verified.

Related

#14529

Merge-Risk: max=MEDIUM demote=false head=d8222181e620d1defa33ec510a24ba913088068d rubric=8.2.0 rater=claude-opus-5-5 checker=claude-opus-5-5

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

Security review: no security issues found

I read every hunk of all 3 changed files. None of them match a trusted-path glob, and none touches a trust control, a merge hold, a plugin manifest or a standing instruction.

  • plugins/harness-ops/skills/behavior-probes/cases/lib/autocompact-project.sh: the PR drops the second ${PROBE_MODEL:?set by probe.py} guard from the printf call. The guard still runs on line 14 in the same branch, under set -euo pipefail. It still stops the script when PROBE_MODEL is unset or empty, and it still requires ^[A-Za-z0-9._:-]+$ before the value is written unescaped into the JSON key on line 19. The validation that protects against injection into the settings file is unchanged.
  • plugins/harness-ops/skills/behavior-probes/cases/lib/eval-tools-check.py:
    • states() was restructured but gives the same result in every case. When is_error is false the result is ran. When it is true, the result is denied if the denial text is present, otherwise refused.
    • In remove_tree, try/except OSError: pass became contextlib.suppress(OSError), which behaves the same way. The symlink skip (os.path.islink → continue) is still there, so chmod still never follows a link outside the tree.
  • .changes/harness-ops/...md: a changelog fragment, with no executable surface.

The PR context file has no embedded instructions aimed at the review. Spend: none beyond normal CI.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

Code review: no findings

I read every hunk of all 3 changed files and the closing issue #14529. Nothing a reviewer would block or flag.

plugins/harness-ops/skills/behavior-probes/cases/lib/autocompact-project.sh

  • The printf argument now uses $PROBE_MODEL directly. That is safe: the same else branch already expands ${PROBE_MODEL:?set by probe.py} inside the [[ ... ]] test on line 14.
  • That expansion exits the non-interactive script when the variable is unset or empty, and set -u is on. Line 19 is only reached after the variable has been checked and matched against the plain-model-name pattern.

plugins/harness-ops/skills/behavior-probes/cases/lib/eval-tools-check.py

  • states(): I compared the old and new branches for all four inputs. is_error=False gives ran in both versions. is_error=True gives denied when the text contains DENIAL_TEXT and refused otherwise. Same mapping.
  • remove_tree(): contextlib.suppress(OSError) does the same thing as the empty try/except OSError: pass. The contextlib import was added.

Changelog fragment

  • The fragment is bump: patch with ### Changed / "Internal simplification, no behavior change.", as the issue requires.

Acceptance criteria (#14529)

  • Behavior unchanged: met, by the reasoning above. The PR body says test_probe.py checks each watched-tool state of eval-tools-check.py. I did not run it, and nothing tests the changed autocompact-project.sh line. But that line is a pure refactor, and a broken guard is caught by the earlier line.
  • Only listed files plus a fragment are edited: met.
  • Within 400 lines and 15 files: met (about 10 lines changed).
  • ci-status green: the author claims this; I did not verify it.
  • Fragment present with the required body: met.

Path-scoped rules: ruff-pin.md, skill-bodies-state-current-rules.md and cost-claims.md match these paths. None applies to these code-only edits.

No plugin manifest changed. No changed file is on a trusted path. No hold.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head d8222181e620d1defa33ec510a24ba913088068d, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for d822218

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-14832-d8222181e620d1defa33ec510a24ba913088068d, expires on 2026-12-09.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 6e7d701 Nov 9, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14529-42681088836-1 branch November 9, 2026 21:04
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.

Simplify the behavior-probes harness-ops plugin code (3 of 4)

0 participants