Skip to content

fix(app-server): run git API commands without blocking Tokio handlers#304

Open
694410194 wants to merge 1 commit into
CortexLM:mainfrom
694410194:codex/async-git-api-commands
Open

fix(app-server): run git API commands without blocking Tokio handlers#304
694410194 wants to merge 1 commit into
CortexLM:mainfrom
694410194:codex/async-git-api-commands

Conversation

@694410194
Copy link
Copy Markdown

Summary

  • switch the app-server git API endpoints from std::process::Command to tokio::process::Command
  • await every git subprocess inside the existing async handlers so git status/diff/log/branch/stash routes stop blocking Tokio worker threads
  • keep the response parsing and error handling behavior unchanged while removing the synchronous process bottleneck

Fixes PlatformNetwork/bounty-challenge#53205
/claim #53205

Verification

  • cargo fmt --manifest-path /tmp/cortex-bounty/Cargo.toml --package cortex-app-server
  • cargo check --manifest-path /tmp/cortex-bounty/Cargo.toml -p cortex-app-server
  • cargo test --manifest-path /tmp/cortex-bounty/Cargo.toml -p cortex-app-server --lib -- --skip tools::shell::tests::test_execute_shell
  • git diff --check

Notes

  • cargo test --manifest-path /tmp/cortex-bounty/Cargo.toml -p cortex-app-server --lib still hits the unrelated existing failure in tools::shell::tests::test_execute_shell on this machine, so the verification above skips that one pre-existing test and the remaining 39 library tests pass.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant