fix(acp): resolve conversation cwd from instance defaults#207
Conversation
|
Status update:
|
⭐ GitRank PR AnalysisScore: 50 points
Eligibility Checks
Impact SummaryThis PR resolves a critical architectural issue where conversations stored ambiguous working directory values that could be either inherited defaults or explicit overrides, causing stale client state to override runtime defaults. The fix implements proper separation of concerns: instance owns defaults, conversations own explicit overrides, and the server resolves effective state. The changes affect bootstrap flows, reconnect behavior, UI state management, and integration clients (Slack gateway). Analysis DetailsComponent Classification: This PR spans multiple architectural layers (API, operator CRD, UI, integrations) without fitting a single component category. It represents a fundamental architectural change to working directory ownership and resolution across the entire ACP system. Severity Justification: This is a P1 (High) severity fix addressing a major architectural flaw where stale conversation state could override correct runtime defaults, causing incorrect working directory resolution during reconnects and bootstrap operations. The fix prevents data loss and ensures consistent behavior across all clients. Eligibility Notes: Issue: True - PR fixes a reported architectural problem with conversation working directory handling. Fix Implementation: True - code changes comprehensively implement the described architecture with backend resolution, effective cwd exposure, and UI updates. PR Linked: True - detailed description with TL;DR, summary, validation steps, and architectural documentation. Tests: True - PR adds 275+ lines of tests covering legacy normalization, explicit overrides, bootstrap behavior, and UI reconnect logic. Tests Required: True - this is a critical bug fix in business logic (ACP bootstrap/reconnect) and API contract changes that require comprehensive test coverage to prevent regression. Analyzed by GitRank 🤖 |
TL;DR
This changes Spritz so conversations store only explicit cwd overrides while the backend resolves the effective working directory from the instance runtime defaults. It also repairs legacy copied defaults like
/home/devduring bootstrap and returnseffectiveCwdto the UI so reconnects stop falling back to stale conversation state.Summary
effectiveCwdin bootstrap responses and conversation statusspec.cwdReview focus
effectiveCwdis missingValidation
cd api && go test ./...cd operator && go test ./...cd ui && pnpm typecheckcd ui && pnpm test -- src/lib/acp-client.test.ts src/pages/chat.test.tsx./scripts/sync-crd.sh --check