Repository navigation
Fix build-dependent matching for two Claude Code 2.1.282 prompts - #1012
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe 2.1.282 directory-sync reminder now references the restored-files formatter. The prompt synchronization pipeline supports matching and preserving a single build-specific hook worker URL in customized prompt content. Tests cover URL matching, interpolation, formatter rebinding, and identifier drift. ChangesPrompt compatibility
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The prompt compatibility changes are mergeable after normal checks; no concrete defect has been established. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change is designed to preserve the target installation’s worker location while applying customizations. No new public access path or verified security defect was identified, but combined native-release behavior remains unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the prompt at dawn, Comment |
Record the assigned pull request number in the Unreleased changelog.
|
@coderabbitai review |
|
Match the doctor prompt across npm and native worker paths while preserving the target build's path during customization. Keep substitutions inside live interpolations and leave explicit user overrides unchanged. Capture the directory-sync path formatter as a mapped identifier instead of hard-coding its minified name. Add snapshot-backed matching and executable-template regression tests.
Record the assigned pull request number in the Unreleased changelog.
70a0e80 to
8d312b3
Compare
Why
Testing the 2.1.282 snapshot from #1010 with the native-module prompt support in #1011 exposed two remaining
Could not find system promptwarnings:HOOKS_WORKER_URLis npm-relative in the snapshot but points into/$bunfs/root/in the native executable.WOs, while the native build calls itBo.A permissive matcher alone would be insufficient: customized doctor prompts must retain the target executable's worker path, and customized recovery reminders must call its actual formatter.
This PR is stacked on #1010 (
prompts/2.1.282) so its diff contains the snapshot correction rather than the entire new snapshot. Native end-to-end validation combines this change with #1011; that PR supplies the module-aware apply path.What changed
HOOKS_WORKER_URLproperty without capturing its value into the positional identifier groups. Keep surrounding metadata literal, reject raw newlines/unterminated strings, and leave snapshots with ambiguous multiple worker properties on exact matching.showformatter into its ownFORMAT_RESTORED_PATH_FNidentifier slot. The same-version identifier-drift check recognizes old Markdown after the corrected snapshot is loaded.Validation
pnpm test— 594 passed, 5 skipped.pnpm lint— passed.pnpm build— passed.node dist/index.mjs --apply --yes --patches "$PROMPT_IDS"against a disposable copy of the actual Claude Code 2.1.282 executable, with isolated configuration/cache and all 777 snapshot IDs selected: zero missing-prompt warnings, and the vanilla executable remained byte-identical.node dist/index.mjs --apply --yes --patches skill-doctor-slash-command,system-reminder-directory-sync-restored-files-mismatch: zero warnings, exactly two modules changed, the doctor retainedHOOKS_WORKER_URL:"/$bunfs/root/src/plugins/functionHooks/hooks-worker/hooks-worker.js", and the reminder retainedshow:Bo.2.1.282 (Claude Code)from--version.Compatibility
The worker-path correction also handles existing doctor Markdown because it preserves the baseline property during application rather than introducing a new placeholder. Installations that already cached the old 2.1.282 JSON must refresh that version's cached snapshot to receive the new directory-sync identifier slot; the existing identifier-drift sync mechanism then recognizes the old Markdown. This PR does not change cache freshness policy, private extraction tooling, other snapshots, or non-prompt feature patches.
Summary by CodeRabbit