Skip to content

refactor: move git and ssh modules into builtins/#1505

Merged
chaliy merged 2 commits intomainfrom
claude/move-builtins-directory-MVY4w
May 2, 2026
Merged

refactor: move git and ssh modules into builtins/#1505
chaliy merged 2 commits intomainfrom
claude/move-builtins-directory-MVY4w

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 2, 2026

Summary

Consolidate the git and ssh implementations under crates/bashkit/src/builtins/ so each one lives next to its builtin command instead of being split across two top-level modules.

  • crates/bashkit/src/git/{mod,client,config}.rscrates/bashkit/src/builtins/git/{mod,client,config}.rs
  • crates/bashkit/src/builtins/git.rscrates/bashkit/src/builtins/git/cmd.rs
  • crates/bashkit/src/ssh/{mod,client,config,allowlist,handler,russh_handler}.rscrates/bashkit/src/builtins/ssh/...
  • crates/bashkit/src/builtins/ssh.rscrates/bashkit/src/builtins/ssh/cmd.rs

All crate-internal paths were rewritten (crate::git::*crate::builtins::git::*, same for ssh). The public API is unchanged — GitConfig, GitClient, SshConfig, SshClient, SshAllowlist, SshHandler, SshOutput, SshTarget, TrustedHostKey are still exported at the crate root.

specs/git-support.md updated to reflect the new implementation path.

Why

The two modules existed in parallel with their builtin commands (builtins/git.rs, builtins/ssh.rs). Colocating them keeps everything related to a builtin in one directory and makes the module structure consistent.

Test plan

  • cargo fmt --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --lib — 2576 passed, 0 failed
  • cargo test --all-features --tests --no-fail-fast — only failure was the network-dependent ssh_supabase_connects (timeout connecting to public supabase.sh, unrelated)
  • Smoke test: cargo run --features git,ssh --example git_workflow — completes successfully end-to-end

Generated by Claude Code

chaliy added 2 commits May 2, 2026 04:27
Consolidate git and ssh implementations under builtins/ alongside their
existing builtin command modules:

- crates/bashkit/src/git/{mod,client,config}.rs ->
  crates/bashkit/src/builtins/git/{mod,client,config}.rs
- crates/bashkit/src/builtins/git.rs ->
  crates/bashkit/src/builtins/git/cmd.rs
- crates/bashkit/src/ssh/{mod,client,config,allowlist,handler,russh_handler}.rs ->
  crates/bashkit/src/builtins/ssh/...
- crates/bashkit/src/builtins/ssh.rs ->
  crates/bashkit/src/builtins/ssh/cmd.rs

Update all crate-internal paths (crate::git::* -> crate::builtins::git::*,
same for ssh) and re-export GitConfig/SshConfig/etc. through builtins.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit ba078b0 Commit Preview URL

Branch Preview URL
May 02 2026, 04:57 AM

@chaliy chaliy merged commit 44a169e into main May 2, 2026
34 checks passed
@chaliy chaliy deleted the claude/move-builtins-directory-MVY4w branch May 2, 2026 05:27
@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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