Skip to content

chore: fully remove git wrapper#1291

Closed
svarlamov wants to merge 9 commits into
mainfrom
chore/fully-remove-wrapper
Closed

chore: fully remove git wrapper#1291
svarlamov wants to merge 9 commits into
mainfrom
chore/fully-remove-wrapper

Conversation

@svarlamov
Copy link
Copy Markdown
Member

@svarlamov svarlamov commented May 6, 2026

Summary

  • Replace the 585-line git wrapper (git_handlers.rs) with a ~120-line thin proxy that just spawns git and forwards args/exit code — kept only for legacy installations that still invoke git-ai as "git"
  • Remove all daemon-side wrapper state infrastructure: WrapperPreState/WrapperPostState control requests, wrapper_states HashMap, apply_wrapper_state_overlay timeout logic, wrapper_invocation_id field from NormalizedCommand
  • Remove wrapper installation from install.sh: no more git/git-og symlinks, no more shell profile PATH manipulation (bashrc/zshrc/fish)
  • Remove git client wrapper installation (Fork, Sublime Merge) and git_shim_path utilities — trace2 handles these clients natively
  • Remove WrapperDaemon test mode and test:wrapper-daemon Taskfile task
  • Clean up all dead code from the removal (~2,500 lines deleted total)

Test plan

  • All 4,473 tests pass (0 failures)
  • Clippy lint clean (zero warnings)
  • cargo fmt clean
  • New proxy pass-through integration tests verify basic git operations and exit code forwarding
  • Zero remaining references to wrapper state, WrapperDaemon, or ENV_SKIP_MANAGED_HOOKS in source
  • Monitor Ubuntu CI jobs

🤖 Generated with Claude Code


Open in Devin Review

svarlamov and others added 9 commits May 6, 2026 19:01
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…normalizer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the git client installer infrastructure (Fork, Sublime Merge) that
configured GUI clients to use the git-ai wrapper as their git binary. Also
remove the git.path setting from Cursor and VS Code installers since the
wrapper is no longer needed. The daemon's trace2 integration still captures
operations from these clients.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The WrapperDaemon test mode simulated the wrapper sending state to the
daemon. Since the wrapper is fully removed, this mode is obsolete. Tests
now only run in Daemon mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove ENV_SKIP_MANAGED_HOOKS constant, resolve_previous_non_managed_hooks_path,
has_repo_hook_state, should_forward_repo_state_first, and related helper functions
that were only used by the old git wrapper. Fix formatting issues flagged by rustfmt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The inline post-commit stats display was a wrapper feature that polled
the daemon for authorship notes after commit. With the wrapper removed,
this functionality no longer exists in the thin proxy.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

⚠️ 1 issue in files not directly in the diff

⚠️ AGENTS.md still references removed task test:wrapper-daemon command (AGENTS.md:22)

AGENTS.md line 22 still documents task test:wrapper-daemon as a valid test command, but this task was removed from Taskfile.yml in this PR. Per the repository's rules in AGENTS.md, this is the canonical reference for build & test commands. Anyone (human or AI agent) following these instructions will encounter a task-not-found error when trying to run task test:wrapper-daemon.

View 6 additional findings in Devin Review.

Open in Devin Review

Comment on lines 614 to 615
println!("No compatible coding agents detected. Nothing to install.");
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Duplicate 'No compatible coding agents detected' message printed during install-hooks

After removing the Git Clients section from async_run_install, there are now two consecutive if !any_checked blocks at src/commands/install_hooks.rs:613-615 and src/commands/install_hooks.rs:617-618. When no coding agents are detected (any_checked == false), the message "No compatible coding agents detected. Nothing to install." is printed twice. The first block was the guard at the end of the Coding Agents section, and the second was the combined guard that previously appeared after both Coding Agents and Git Clients sections. The Git Clients section removal should have also removed the first duplicate block.

(Refers to lines 613-615)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@svarlamov svarlamov closed this May 21, 2026
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