fix(claude-config): migrate fix-plugin-drift.sh to the portable mktemp form - #2437
Conversation
… merge) Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
…p form Settles #1709. The portable, non-deprecated form is the positional absolute template with trailing Xs — mktemp "${TMPDIR:-/tmp}/<name>-XXXXXX" — which the topic-docs ephemeral tier already names as rule 1. Verified by execution on GNU coreutils 9.4 (Linux) and BSD mktemp (macOS 26.5, via a throwaway macos-latest job recorded on the issue and removed from this branch): the candidate file and dir forms succeed identically on both, while a suffix-after-Xs template is created VERBATIM on macOS (no X substitution, so no randomness), and a bare relative template lands in the cwd. These two mktemp -t call sites were the last non-conforming invocations under plugins/**. Fixes #1709 Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @kyle-sexton's task in 1m 4s —— View job Security Review Complete
Scope: Reviewed Findings: none. This is a narrow, mechanical portability fix. The two changed lines swap Both forms create the temp file atomically via Other notes (not findings, just confirming no regression):
Per instructions, supply-chain/unpinned-action/workflow-permission concerns are zizmor's lane — not applicable here anyway since no workflow files changed. |
|
Claude finished @kyle-sexton's task in 1m 23s —— View job Reviewing PR #2437
SummaryReviewed the three changed files against
Note: I did not independently execute the script on GNU or BSD |
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
Fixes #1709
Summary
Completes the mktemp portability decision: the portable, non-deprecated form is
mktemp "${TMPDIR:-/tmp}/<name>-XXXXXX"(trailing Xs, positional absolute template), verified by execution on both GNU and BSD with outputs recorded on the issue. This PR migrates the last two non-conforming call sites underplugins/**.Fix
plugins/claude-config/skills/audit/scripts/fix-plugin-drift.shmoves its twomktemp -t <name>-XXXXXX.jsonscratch files to the convention form. GNU marks-tdeprecated; BSD-ttreats its argument as a prefix rather than a template; and the.jsonsuffix was the silent macOS trap — BSD substitutes only trailing Xs, so a suffix template is created verbatim with no randomness (verified on a real macos-latest runner, evidence on the issue). The extension was cosmetic; both files are consumed via explicit paths. claude-config 0.37.2 with a CHANGELOG entry.Verification
scripts/affected-tests.sh --runover the diff: all 26 selected suites passed (one unrelated goimports-absence skip).mktemp -t/--tmpdir/bare-relative-template invocations remain underplugins/**.Related
docs/conventions/topic-docs/README.mdephemeral tier rule 1 — already names this exact form; unchanged here.