v1.31.1.0 fix wave: 3 community PRs (careful BSD sed, codex Step 0 rename, make-pdf setup ordering)#1413
Merged
v1.31.1.0 fix wave: 3 community PRs (careful BSD sed, codex Step 0 rename, make-pdf setup ordering)#1413
Conversation
…acOS
The sed regex in check-careful.sh uses \s+, which is a GNU sed
extension not supported by BSD sed (macOS default). On macOS, this
causes the RM_ARGS strip to fail silently, making rm -rf of safe
exceptions (node_modules, .next, dist, etc.) trigger the destructive
warning instead of being permitted as designed.
Fix: replace \s+ with POSIX [[:space:]]+, which works on both GNU sed
(Linux) and BSD sed (macOS).
The existing test/hook-scripts.test.ts already documented this
limitation via a detectSafeRmWorks() helper and a platform-conditional
assertion ("if GNU sed: expect undefined, else: expect ask"). Now that
the regex works on both platforms, this dead path is removed and the
safe-exception tests assert the same expectation on every OS.
Note: the grep regex in the same file also uses \s+, but BSD grep -E
on macOS does support \s (verified via bash -x trace), so only the
sed expression needs the fix.
Discovered while translating the careful skill for a Japanese
derivative project (uzustack). Reference:
uzumaki-inc/uzustack@bc67c8d
…elude The codex skill template had its own '## Step 0: Check codex binary' heading (line 42), which after gen-skill-docs collided with the platform-detection prelude '## Step 0: Detect platform and base branch' (injected by scripts/resolvers/utility.ts). The generated codex/SKILL.md ended up with two H2 headings labeled Step 0, which is ambiguous to an agent reading the skill in order. Renamed the local heading to Step 0.4, slotting it between the prelude (Step 0) and the existing Step 0.5 / Step 0.6 sections. No renumbering of downstream steps needed. Closes #1388 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
E2E Evals: ✅ PASS6/6 tests passed | $1.80 total cost | 12 parallel runners
12x ubicloud-standard-2 (Docker: pre-baked toolchain + deps) | wall clock ≈ slowest suite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three small, well-scoped community fixes:
/carefulworks on macOS again (BSD sed compatibility —\s→[[:space:]])Step 0renamed toStep 0.4to avoid collision with the platform-detect prelude/make-pdfsetup ordering: SETUP block now runs immediately after the Preamble Bash instead of after the Telemetry footer5 commits / 8 files / +64/-62 source lines (excluding generated SKILL.md regen).
Wave assembly
Triaged ~140 open community PRs. Final wave is 3 of an initial 14 candidates. Cuts:
crypto.timingSafeEqualwould throw on multi-byte UTF-8 tokens (caught by Codex outside-voice review during /ship gate;Buffer.from(token)defaults to UTF-8 so a 36-char ASCII length-match could pass, then throw on byte-length mismatch). Closed with feedback.Test Coverage
All 3 wave PRs ship with their own regression tests:
detectSafeRmWorks()platform-conditional fromtest/hook-scripts.test.tsso both Linux and macOS exercise the same safe-rm assertions (no platform-bypass)make-pdf setup orderingdescribe block totest/gen-skill-docs.test.tsasserting SETUP appears between Preamble and Plan-Mode/Telemetry/workflow headings, with a single## MAKE-PDF SETUPoccurrencePre-Landing Review
Codex review on the trimmed wave (post-#1171-drop): clean, no regressions.
The earlier full codex review on the 4-commit wave (with #1171) flagged 1 P1 critical on
browse/src/token-registry.ts:164-167:This is what drove the #1171 drop. Per D8-B strict cherry-pick rule: contributor PR lands as-is or gets rejected; we don't rewrite contributor work and re-attribute it.
Eval Results
Full paid eval suite (test:evals:all + test:e2e:all, ~$25) ran on the 4-commit collector:
Pre-existing test failures (not introduced by this wave)
3 golden-file tests fail on
bun test:golden-file regression > Claude ship skill matches golden baselinegolden-file regression > Codex ship skill matches golden baselinegolden-file regression > Factory ship skill matches golden baselineThese regressed when v1.31.0.0 (#1390) updated the preamble template's plan-mode-handshake prose but didn't regenerate the per-host golden baselines. Verified pre-existing on
origin/main. Separate fix needed; not blocking this wave.TODOS
No TODO items completed in this PR.
Test plan
bun test— full free suite passes (3 pre-existing golden-file failures, not caused by this wave)bun run gen:skill-docs— no drift after cherry-picksbun test test/hook-scripts.test.ts— 32 pass / 0 fail (covers fix(careful): BSD sed compatibility for safe exception detection on macOS #1242)bun test test/gen-skill-docs.test.ts— 380 pass / 0 fail (covers fix(make-pdf): run setup before preamble footers #1393, docs(codex): rename Step 0 to avoid collision with platform-detect prelude #1394)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need.