Skip to content

chore: remove bash core handler + rename tempfile prefixes (#47, #60)#68

Merged
Cannon07 merged 2 commits into
mainfrom
chore/remove-bash-core-handler
May 22, 2026
Merged

chore: remove bash core handler + rename tempfile prefixes (#47, #60)#68
Cannon07 merged 2 commits into
mainfrom
chore/remove-bash-core-handler

Conversation

@Cannon07
Copy link
Copy Markdown
Owner

@Cannon07 Cannon07 commented May 22, 2026

Summary

  • Phase 3 of Migrate hook orchestration from bash to Lua #47 is complete for all four backends — delete the now-orphaned bin/core-pre-tool.sh, bin/core-post-tool.sh, and the bash-only test tests/core/test_post_tool_patch_paths.sh (coverage already lives in tests/plugin/post_tool_handle_spec.lua). Remove the empty tests/core/ directory and the core filter in tests/run.sh.
  • Rename proposal tempfile prefixes from /tmp/claude-{diff,patch}-* to /tmp/code-preview-{diff,patch}-* (Rename /tmp/claude-diff-* tempfiles to /tmp/code-preview-* #60). pre_tool.sweep_leftover_tempfiles matches both prefixes transitionally so leftover files from pre-upgrade Neovim sessions still get cleaned up; legacy patterns to be dropped in v1.2.
  • Refresh stale comments in lua/ that still referenced the deleted shell scripts. Flip the CONTEXT.md "Core handler" entry to past tense; ADR-0005 remains the canonical history.

Test plan

  • ./tests/run_lua.sh — all plenary suites green
  • ./tests/run.sh — all 65 backend + plugin tests green
  • Confirm sweep matches both legacy /tmp/claude-diff-* and new /tmp/code-preview-diff-* after setup() in a long-running Neovim
  • Smoke-test all four backends (claudecode / opencode / copilot / codex) end-to-end on real edits

Closes the cleanup portion of #47 phase 3. #60 is also addressed here. #64 items (looks_like_path on rm; per-proposal tempfile tracking) are intentionally out of scope.

🤖 Generated with Claude Code

Cannon07 and others added 2 commits May 22, 2026 13:11
Phase 3 of #47 is complete for all four backends, so the historical
out-of-process bash orchestrator is no longer reachable. Deletes
bin/core-pre-tool.sh, bin/core-post-tool.sh, and the bash-only test
tests/core/test_post_tool_patch_paths.sh (coverage moved to
tests/plugin/post_tool_handle_spec.lua). Removes the now-empty
tests/core/ directory and the "core" filter in tests/run.sh.

Renames the proposal tempfile prefixes from /tmp/claude-{diff,patch}-*
to /tmp/code-preview-{diff,patch}-* (#60). The startup sweep in
pre_tool.sweep_leftover_tempfiles continues to match the legacy
prefixes transitionally so leftover files from pre-upgrade nvim
sessions still get cleaned up; drop the legacy patterns in v1.2.

Also refreshes stale comments in lua/ that still referenced the
deleted shell scripts. ADRs are left as-is (canonical history).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- CONTEXT.md: update Source path example to /tmp/code-preview-diff-* (was
  still showing the old /tmp/claude-diff-* prefix); also <pid> → <id> since
  the in-process flow uses hrtime+counter rather than $$.
- pre_tool/init.lua: replace the misnamed "v1.2" target in the transitional
  sweep comment with version-agnostic wording. Latest tag is v2.2.0, so the
  v1.2 reference would have made the bridge never run in production.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Cannon07 Cannon07 merged commit 9b7326d into main May 22, 2026
2 checks passed
@Cannon07 Cannon07 deleted the chore/remove-bash-core-handler branch May 22, 2026 15:11
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.

1 participant