Skip to content

fix(typescript): forward ACP data-dir isolation flag - #5172

Merged
neubig merged 1 commit into
OpenHands:mainfrom
onatozmenn:fix/acp-isolate-data-dir-settings
Sep 23, 2026
Merged

neubig merged 1 commit into
OpenHands:mainfrom
onatozmenn:fix/acp-isolate-data-dir-settings

Conversation

@onatozmenn

@onatozmenn onatozmenn commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

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 on ACPAgentSettings), but the TypeScript client's ACP_SETTINGS_KEYS allow-list omits it, so downstream callers filtering through the list silently drop the flag.

Summary

  • Add 'acp_isolate_data_dir' to ACP_SETTINGS_KEYS in clients/typescript/src/models/acp.ts.
  • Add regression tests: membership + filter round-trip keeps the flag.

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 against dist: filtering {acp_model, acp_isolate_data_dir: true, other} through the built ACP_SETTINGS_KEYS yields {"acp_model":"x","acp_isolate_data_dir":true}.
  • npx eslint on 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

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

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
Estimate Likelihood / value Direct evidence
SQL injection 2.0% No direct hunk selected
Command injection 3.0% No direct hunk selected
Weakened authentication 3.0% No direct hunk selected
Weakened authorization 6.0% No direct hunk selected
Contract regression 6.0% No direct hunk selected
Data loss 2.0% No direct hunk selected
Sensitive data disclosure 3.0% No direct hunk selected
Unexpected data transfer 3.0% No direct hunk selected
Credential misuse 3.0% No direct hunk selected
Untrusted instruction authority 2.0% No direct hunk selected
Package source redirection 3.0% No direct hunk selected
Unverified remote execution 2.0% No direct hunk selected
Privileged environment access 2.0% No direct hunk selected
Security assessment bypass 4.0% No direct hunk selected
Prohibited workload 2.0% No direct hunk selected
Primary concern None selected; confidence 88.0% No primary concern to locate

Co-authored-by: openhands <openhands@all-hands.dev>
@onatozmenn
onatozmenn marked this pull request as ready for review September 18, 2026 13:32
Copilot AI lite review requested due to automatic review settings September 18, 2026 13:32
@all-hands-bot

Copy link
Copy Markdown
Collaborator

🚦 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 @all-hands-bot as a reviewer to have it reviewed regardless of CI status.)

This is an automated check - no AI was used to generate this comment.

1 similar comment
@all-hands-bot

Copy link
Copy Markdown
Collaborator

🚦 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 @all-hands-bot as a reviewer to have it reviewed regardless of CI status.)

This is an automated check - no AI was used to generate this comment.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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 all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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:1666 declares acp_isolate_data_dir: bool on ACPAgentSettings, and the settings-to-agent builder forwards it into create_agent(). The server genuinely accepts the field, so the TypeScript allow-list omission in clients/typescript/src/models/acp.ts did silently drop it for callers that filter through ACP_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_KEYS re-exported from src/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, and unresolved-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 neubig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@neubig
neubig merged commit 02c6708 into OpenHands:main Sep 23, 2026
54 of 56 checks passed
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.

[Feature]: Add acp_isolate_data_dir to ACP_SETTINGS_KEYS in the TypeScript client

4 participants