fix(acp): add tests asserting cwd and mcpServers are always passed to session/load (#1593)#1624
Open
theslava wants to merge 4 commits into
Open
fix(acp): add tests asserting cwd and mcpServers are always passed to session/load (#1593)#1624theslava wants to merge 4 commits into
theslava wants to merge 4 commits into
Conversation
2144f4f to
59180ec
Compare
Author
59180ec to
56ac34f
Compare
… session/load (getpaseo#1593) Add unit tests in acp-agent.test.ts that verify initializeResumedSession() always calls loadSession and unstable_resumeSession with { sessionId, cwd, mcpServers } — even when mcpServers is an empty array. Some strict ACP providers (e.g., Devin CLI) return 'Invalid params' if any of these fields are omitted. Also adds a docstring above initializeResumedSession() documenting this requirement so future refactors don't accidentally drop params. Closes getpaseo#1593
- Extract shared makeTestSession() factory to eliminate duplicated TestSession class definitions across all three tests (concern getpaseo#1) - Pass handle through typed constructor option instead of casting private initialHandle field (concern getpaseo#2) - Add missing type imports for AgentCapabilityFlags and AgentPersistenceHandle
56ac34f to
f4a07b8
Compare
auto-merge was automatically disabled
June 26, 2026 14:27
Head branch was pushed to by a user without write access
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Closes #1593
Type of change
What does this PR do
Adds unit tests in
acp-agent.test.tsthat verifyinitializeResumedSession()always callsloadSessionandunstable_resumeSessionwith{ sessionId, cwd, mcpServers }— even whenmcpServersis an empty array. Some strict ACP providers (e.g., Devin CLI) return "Invalid params" if any of these fields are omitted.Also adds a docstring above
initializeResumedSession()documenting this requirement so future refactors don't accidentally drop params.How did you verify it
npx vitest run packages/server/src/server/agent/providers/acp-agent.test.ts --bail=1— 59 tests passednpm run typecheck— passednpm run lint— passednpm run format— ranRisk surface
Tests only. No behavioral change — the existing code already passes all three params. This guards against a future refactor that might accidentally drop
cwdormcpServers.Checklist
npm run typecheckpassesnpm run lintpassesnpm run formatran (Biome)