Skip to content

refactor(playwright): simplify fill-secret.sh failure handling - #15268

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14761-42962450221-1
Nov 11, 2026
Merged

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14761

Summary

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

fill-secret.sh now handles a failed playwright-cli fill in one cmd || { status=$?; ...; exit } block, replacing the separate status variable and if-test. It also drops a redundant ${4:-} default, because \[\[ only expands $4 once $# -eq 4 holds. The script was already short. The printenv lookup stays, because ${!var} would also read the script's own variables (the test's target case checks this). Outputs, exit codes, messages and flags are unchanged.

Not verified

  • fill-secret.test.sh was not run here: this lane runs only its named wrappers, and check-changed-skills skipped script tests. It is left to the PR's CI.
  • shellcheck/lint was not run directly on the script: no wrapper for it exists in this lane. check-affected ran the checks it covers.
  • tidy: passes 1-4 ran and changed nothing. Pass 5 (ai-slop:audit fix) was skipped because its detect.sh and digest-guard.sh scripts cannot run under this lane's Bash allowlist. A manual read of the one-line fragment found no tells.
  • The checks were not re-run after tidy, because tidy edited no file and the tree was identical to the one checked.

Fix

  • plugins/playwright/skills/playwright/scripts/fill-secret.sh: one || group replaces the status variable and if-test after the playwright-cli call; "${4:-}" becomes "$4" in the argument check
  • .changes/playwright/work-resolve-issue-issue-14761-42962450221-1-84c76270.md: new patch changelog fragment

Verification

The runner ran each check from the base copy against 8af2de3:

  • 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

#14761

Merge-Risk: max=LOW demote=false head=8af2de3fd768e2db67c891961098226ad494cd84 rubric=8.4.1 rater=claude-opus-5-5 checker=claude-opus-5-5

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

Copy link
Copy Markdown
Contributor

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

Security review: no security issues found

I read the full change in both files: plugins/playwright/skills/playwright/scripts/fill-secret.sh and the new changelog fragment .changes/playwright/work-resolve-issue-issue-14761-42962450221-1-84c76270.md. Neither file is on a trusted path.

What I checked in fill-secret.sh:

  • Argument check, "${4:-}" → "$4". The script runs under set -u (L15). && short-circuits inside [[ ]], so $4 is only expanded once $# -eq 4 is true. With 3 args the unbound-variable error can't happen. Any other argument count still falls through to usage (exit 2).
  • Failure handling, cmd || { status=$?; ...; exit "$status"; }. $? at the start of the group is still playwright-cli's exit status. The script exits with that status, and success still reaches the "filled" line. set -e isn't enabled, so errexit doesn't come into it.
  • The secret still stays out of output. playwright-cli's stdout and stderr still go to /dev/null (L41). set +x is unchanged, and the failure message prints only $target and the exit status, never $secret. The env-var name check and the printenv lookup are untouched.

The changelog fragment is prose only and contains no instructions. The PR context contains no embedded directives aimed at the review.

This PR changes no plugin manifest, trust control, merge hold or standing instruction.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: no findings

I read every hunk of both changed files (fill-secret.sh and the new changelog fragment) and the whole script at head.

Behavior is unchanged. This checks the first acceptance criterion of #14761.

  • playwright-cli … || { status=$?; …; exit "$status"; }: $? at the start of the || group is playwright-cli's exit status. The script runs under set -uo pipefail without -e (fill-secret.sh#L15). In the old code a failure also reached the status check, so the message, the exit code and the success path all match the old status/if version.
  • "${4:-}" becoming "$4" (fill-secret.sh#L23): bash's [[ ]] stops evaluating at the first decisive &&/|| and expands an operand only when it reaches it. So $4 is expanded only once $# -eq 4 holds, and set -u cannot trip on it. A call with 3 arguments or 5 or more still reaches usage. I did not run this; I worked it out from bash's documented [[ ]] behavior.

Scope and size: the diff edits only the listed file plus one changelog fragment, at about 10 changed lines, within the issue's limits. bump: patch fits a refactor that changes no behavior. The "ci-status is green" criterion is left to CI. The PR says fill-secret.test.sh and shellcheck were not run in the authoring lane; that claim comes from the author and I could not check it, since this lane has no shell.

Path-scoped rules: skill-bodies-state-current-rules.md and cost-claims.md match plugins/*/skills/**. Both cover prose claims, and the shell logic change breaks neither.

No plugin manifest changed. No trusted path is touched. No embedded instructions were found in the PR context.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 8af2de3

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-15268-8af2de3fd768e2db67c891961098226ad494cd84, expires on 2026-12-11.

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 11, 2026
Merged via the queue into main with commit f49ba7e Nov 11, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14761-42962450221-1 branch November 11, 2026 06:03
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit f49ba7eeb68daf928ed02cd9c2283598aaeda0b5; later checks count it verified from this comment.

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 playwright fill-secret.sh script

0 participants