Skip to content

Conversation

@linw1995
Copy link
Owner

@linw1995 linw1995 commented Feb 7, 2026

Summary

Refactor session socket path management to use global state instead of environment variables, preventing path loss when bash strips COCO_ prefixed environment variables.

Changes

  • Centralize env var name: Add SESSION_SOCKET_ENV constant for consistent naming
  • Global state management: Use global::session_socket_path() instead of environment variable passing
  • Fix bash tool: Read path from global state, avoid env var stripping during execution
  • Better tests: Add SessionSocketTestGuard helper to prevent env var pollution

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 83.43949% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.07%. Comparing base (55394f6) to head (3e8bb49).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
src/combo/runner.rs 27.27% 16 Missing ⚠️
crates/coco-tui/src/combo_run_server.rs 0.00% 4 Missing ⚠️
crates/coco-tui/src/components/chat.rs 0.00% 2 Missing ⚠️
crates/coco-tui/src/main.rs 0.00% 1 Missing ⚠️
src/cmd/combo.rs 0.00% 1 Missing ⚠️
src/combo/session.rs 66.66% 1 Missing ⚠️
src/tools/bash.rs 98.46% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #177      +/-   ##
==========================================
- Coverage   48.12%   46.07%   -2.05%     
==========================================
  Files         105      108       +3     
  Lines       27916    30166    +2250     
==========================================
+ Hits        13435    13900     +465     
- Misses      14481    16266    +1785     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@linw1995 linw1995 merged commit 971cca2 into dev Feb 7, 2026
3 checks passed
@linw1995 linw1995 deleted the refactor/coco-session-sock-bash-env branch February 7, 2026 07:17
@linw1995 linw1995 added enhancement New feature or request and removed enhancement New feature or request labels Feb 7, 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.

2 participants