fix(typescript): forward ACP data-dir isolation flag - #5172
Conversation
Co-authored-by: openhands <openhands@all-hands.dev>
|
🚦 CI is currently failing on this PR's latest commit. Please fix the failing checks before OpenHands reviews it - this is re-checked automatically once you push a new commit. (A maintainer can also request This is an automated check - no AI was used to generate this comment. |
1 similar comment
|
🚦 CI is currently failing on this PR's latest commit. Please fix the failing checks before OpenHands reviews it - this is re-checked automatically once you push a new commit. (A maintainer can also request This is an automated check - no AI was used to generate this comment. |
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped and covered by regression tests.
Pull request overview
Updates the TypeScript ACP settings allow-list to forward acp_isolate_data_dir, with regression coverage.
Changes:
- Adds the isolation flag to
ACP_SETTINGS_KEYS. - Adds membership and filtering tests.
File summaries
| File | Description |
|---|---|
clients/typescript/src/models/acp.ts |
Forwards the isolation setting. |
clients/typescript/src/__tests__/acp-providers.test.ts |
Verifies allow-list behavior. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
all-hands-bot
left a comment
There was a problem hiding this comment.
This review was posted by an AI agent (OpenHands).
Review: forward ACP data-dir isolation flag
Scope verified in the workspace at head 77df249
openhands-sdk/openhands/sdk/settings/model.py:1666declaresacp_isolate_data_dir: boolonACPAgentSettings, and the settings-to-agent builder forwards it intocreate_agent(). The server genuinely accepts the field, so the TypeScript allow-list omission inclients/typescript/src/models/acp.tsdid silently drop it for callers that filter throughACP_SETTINGS_KEYS. The reported bug is real and the one-line addition to the allow-list is the correct, minimal fix.- The added regression tests exercise both the direct membership contract and the filter round-trip that downstream callers rely on. The tests reference the real exported symbol (
ACP_SETTINGS_KEYSre-exported fromsrc/index.ts:223), not a mock.
Validation I ran
npm test -- src/__tests__/acp-providers.test.ts-> 19 passed.npm run build-> clean; no tracked files were modified.- CI for this exact head is fully green, including
build,test (22.12),test (24.x),validate-acp-providers,agent-server-api,check-pr-artifacts, andunresolved-review-threads.
Assessment
Narrow, correct, and well-tested fix confined to the TypeScript mirror; it is not release-PR or eval-risk territory (no prompt, tool, or loop logic touched). I found no material correctness, security, or design problems on this head.
✅ APPROVED
neubig
left a comment
There was a problem hiding this comment.
The TypeScript allow-list omission is real, and this is the minimal correct fix. The tests cover both the exported membership contract and the filtering behavior callers rely on. I also corrected the PR description to close canonical issue #4907 instead of duplicate #5171.
AI disclosure: This review was submitted by OpenHands on behalf of @neubig.
HUMAN:
I ran the targeted tests and the full suite, and confirmed the build still passes with acp_isolate_data_dir included in the settings allow-list.
AGENT:
Why
The server accepts
acp_isolate_data_dir(verified onACPAgentSettings), but the TypeScript client'sACP_SETTINGS_KEYSallow-list omits it, so downstream callers filtering through the list silently drop the flag.Summary
'acp_isolate_data_dir'toACP_SETTINGS_KEYSinclients/typescript/src/models/acp.ts.Issue Number
Fixes #4907
Related to duplicate #5171
How to Test
From
clients/typescript:npm test -- src/__tests__/acp-providers.test.ts→ 19 passed. With only the allow-list line reverted, the 2 new tests fail.npm test(full unit suite) → 330 passed.npm run build→ passes; runtime check againstdist: filtering{acp_model, acp_isolate_data_dir: true, other}through the builtACP_SETTINGS_KEYSyields{"acp_model":"x","acp_isolate_data_dir":true}.npx eslinton the two touched files: clean (repo-wide lint has 3 pre-existing errors on base, untouched).No UI surface: allow-list-only change, no screenshots applicable.
Type
Jev-Fast-Audit
⚡ Jev fast audit · estimates · 0.41s · commit 77df249
Strongest signal: No primary concern selected.
Evidence: No primary concern to locate.
Coverage: complete supplied coverage; 3/3 hunks, 2/2 files.
All estimates and evidence