Skip to content

refactor(scripts): simplify four check scripts without changing behavior - #14392

Merged
kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-14355-42570413797-1
Nov 9, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-14355-42570413797-1

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14355

Summary

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

Simplified four check scripts without changing their behavior. The Windows exec-form probe gets an is_shell_image helper in place of two repeated four-way image tests, one claude invocation that adds timeout only when it exists instead of two copies, one rm in each run_live branch instead of one per return, and no spawn_active or node_exe placeholder variables. The fixture isolation gate inlines two single-use predicates, merges its declare lines and prints its violation and stale-baseline text with printf and one heredoc; the bytes on stderr are the same. The doc-grammar gate uses one elif chain for the bare-positional probe, grep -m1 for the argument-hint line, and one mkdir, and drops guards and an rm that could never fire. The finding-coverage gate drops an empty-line guard that could never fire.

Not verified

  • tidy: not run because the change is under scripts/, a listed shared path for the tidy cutoffs
  • The four scripts' own test suites (scripts/<name>.test.sh) and the whole-repo scanner runs check-affected marks CI only were not executed directly in this lane; left to the PR's CI
  • ci-status green on the PR: left to the PR's CI
  • No changelog fragment added: the change is to repository scripts outside any plugin, and check-changelog-fragments passed

Fix

  • scripts/check-exec-form-windows-probe.sh: is_shell_image helper replaces two repeated four-way shell-image tests; run_live builds the claude command once (timeout prefix only when available), removes its scratch dir once per branch; spawn_active and node_exe="" placeholders removed
  • scripts/check-fixture-git-isolation.sh: single declare -A line; clears_env and declared_scope single-use helpers inlined; the violation and stale-baseline messages print through printf and one heredoc with identical stderr text
  • scripts/check-fleet-audit-doc-grammar.sh: bare-positional classification as one if/elif chain; argument_hint_has_bare reads the first hint with grep -m1 and drops a redundant empty check; one mkdir -p; drops an rm -f of a path that cannot exist in a fresh mktemp dir and two empty-line guards that…
  • scripts/check-fleet-finding-test-coverage.sh: dropped an empty-line guard that cannot fire (kinds are filtered non-empty upstream)

Verification

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

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

The run reports:

Left out: the items under Not verified.

Related

#14355

Merge-Risk: max=MEDIUM demote=false head=a846c5b40d169a8bb436e874b75282c081c7776a rubric=8.1.2 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 a846c5b40d169a8bb436e874b75282c081c7776a: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #14392 (head a846c5b)

No security issues found.

I read every hunk of all 4 changed files. None of them match a trusted path. None of them is a trust control, a merge hold, a plugin manifest or an instruction surface. They are repository check scripts under scripts/, and the diff only restructures them:

  • scripts/check-exec-form-windows-probe.sh:
    • A new is_shell_image helper replaces the two inline four-way image tests. It matches the same strings (bash, bash.exe, sh, sh.exe), and the negation in run_live keeps the original AND logic.
    • The claude command is now built once as an array (claude_cmd), with timeout 90 added in front only when timeout exists. Every argument stays quoted, the prompt is a fixed literal, and no untrusted input enters the command.
    • rm -rf "$tmp" now runs once per branch. It moved ahead of image_name, which only reads a variable that has already been set, so it covers the same paths.
    • Removing the spawn_active and node_exe="" placeholders is safe under set -u, because node_exe is always assigned in its if test.
  • scripts/check-fixture-git-isolation.sh: two single-use predicates are inlined with the same array tests. The messages now print through printf and an unquoted heredoc, and the only expansion inside it is $BASELINE, the same as the original echo. The gate's pass/fail logic is unchanged.
  • scripts/check-fleet-audit-doc-grammar.sh: the probe classification is now one if/elif chain, and the inconclusive case still exits 2. Other changes: grep -m1 replaces grep | head -n1, the mkdir calls are merged, and a redundant rm of a fresh mktemp path is dropped. Two empty-line guards are also removed. That can't make the gate pass something it used to fail, and it doesn't reach credentials or a lane anyway.
  • scripts/check-fleet-finding-test-coverage.sh: one empty-line guard is removed and nothing else changes.

None of this touches a token, a secret, a trusted-actor decision, untrusted text reaching a credentialed lane, or anything that can bill.

The PR description contains no embedded instructions aimed at this lane. It never ran in a way that spends credit, so nothing here draws on prepaid credit or a subscription.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

Code review: PR #14392, a refactor of four check scripts

No findings. I read every hunk of all 4 changed files, and the head copy of each script for context. None of the four is on a trusted path.

Is behavior unchanged? (acceptance criterion from #14355)

I checked each change against the head files. I did not run anything.

  • scripts/check-exec-form-windows-probe.sh
    • is_shell_image matches the same four names the old inline tests matched.
    • In run_spawn, [[ … ]] || is_shell_image gives the same result as the old single [[ … || … ]] test.
    • In run_live, the single claude_cmd array builds the same command line as the two old copies, with timeout 90 only when timeout exists. set +e/set -e still wraps the claude call. run_live runs only after command -v claude succeeds (line 420) and only inside if ! run_live, so moving the command -v claude substitution into an array assignment changes nothing.
    • Each rm -rf "$tmp" now runs before code that reads only the shell variables already captured (exec_path, out), never the files in the temp dir.
    • Dropping spawn_active and node_exe="" is safe: node_exe is assigned by the command substitution and read only after resolve_node succeeds.
  • scripts/check-fixture-git-isolation.sh
    • ${CLEARS_FILE[$t]:-} and ${SCOPED[$t]:-} are the same lookups the removed helpers made. Nothing else in the repository calls clears_env or declared_scope; the copy under plugins/testing/.../u03/*.fixture is a separate eval file.
    • The printf plus heredoc output matches the old echo lines line for line: the header, a blank line, each violation with two leading spaces, a blank line, the body, and the closing $BASELINE line. The stale-baseline printf likewise matches the four echo lines it replaces.
    • The heredoc's unset GIT_DIR … line falls inside the scanner's heredoc state, which reads it only for FIXTURE and never as a clear, so the gate scans its own file the same way.
  • scripts/check-fleet-audit-doc-grammar.sh
    • The elif chain prints the same values and exits 2 the same way.
    • grep -m1 … || true reads the same first line as grep | head -n1 || true.
    • With an empty hint, the [<dir>] glob test still fails, so the removed -n guard was redundant.
    • The two removed empty-line guards could never fire: grammar_spans prints only when length(line) > 0, and each token is $1 of a line that matched a non-empty pattern.
    • The removed rm -f was for a path in a fresh mktemp -d dir, before any probe had run.
  • scripts/check-fleet-finding-test-coverage.sh
    • Both ways the kind list is filled produce no empty lines: awk keeps only $1 != "", and the fallback prints $3 of an [a-z-]+ match. So the removed guard could never fire.

Other acceptance criteria

  • Only the listed files are edited: met (4 files).
  • Size: 116 changed lines, within the 400-line and 15-file limits.
  • ci-status green: left to CI; I could not check it from this lane. The PR's own check results (check-affected 10 passed, 6 skipped) are author-claimed and unverified here.
  • Tests: the scripts' existing scripts/<name>.test.sh suites would catch a change in output or exit codes. The PR says it did not run them; CI does.

Other notes

  • No plugin manifests, paved-path rows or path-scoped rules apply to these files.
  • The PR context contains no instructions aimed at the review.
  • No spend.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head a846c5b40d169a8bb436e874b75282c081c7776a. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for a846c5b

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-14392-a846c5b40d169a8bb436e874b75282c081c7776a, 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
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 9, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 82d4854 Nov 9, 2026
64 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-14355-42570413797-1 branch November 9, 2026 08:34
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 check-exec-form-windows-probe.sh, check-fixture-git-isolation.sh, check-fleet-audit-doc-grammar.sh and 1 more repository scripts

1 participant