Repository navigation
fix(test): open the elicitation runtime session in the runtime's own work dir - #23889
iamwhatever wants to merge 1 commit into
Conversation
…work dir On macOS a Kiro-wire runtime binds its work dir at spawn and refuses a session cwd anywhere else. The helper built the runtime on tmp_path/"wd" but opened the session on tmp_path, so the Kiro case failed every macOS run with AcpWorkspaceBindingError. Linux never binds, so it stayed green there. Fixes #23862
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this is a test-only change that fixes the actual cause, a session cwd that doesn't match the runtime's bound work dir. The runtime's refusal stays untouched. Notes
[DESIGN-REVIEWED] b10b1c3 Description read[DESCRIPTION-READ] 3fdc8b74b39913092891b087fc05ee108bb21b7c0dc0b7575df24ce71031e1a0 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings. The candidate list was empty. The diff only changes tests: [OPUS-REVIEWED] b10b1c3 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Problem / Motivation
Goal:
test_a_form_answer_reaches_the_engine_on_either_wirepasses on macOS again.The Kiro case of this test fails on every macOS run with
AcpWorkspaceBindingError: A delegated macOS Kiro runtime is bound to one exact workspace. It blocks the macOS lane on unrelated PRs (#23657, #23696).Why it matters
The macOS backend shard goes red on PRs that never touch this code. Each red costs a rerun and a triage round.
Not a goal
AcpRuntime. The refusal is correct behavior.What changed (motivation → approach → change)
It is not a flake. It fails every time on macOS.
The helper builds the runtime on
tmp_path / "wd". Then it opens the session ontmp_path, the parent folder. On macOS a Kiro-wire runtime binds its work dir at spawn (bind_voice_safe_agent_workspace). Then_session_work_dirrefuses any other session cwd. Linux never binds, so Linux stays green. The KAS-wire case does not bind either, so only the Kiro case fails.The fix:
_runopens the session in the runtime's own work dir (rt._work_dir). The test code is the only change.Backwards compatibility
Compatible: test-only change.
Removes nothing: only a test helper's session cwd changes.
Tests
test/test_acp_elicitation_runtime.py: all five tests open the session in the runtime's own work dir.Proof: not provable -- test-only change
Forced condition: a throwaway
-pplugin (not committed) makes the launch return a real directory descriptor on Linux, the way macOS binds. With it, the parent commit failstest_a_form_answer_reaches_the_engine_on_either_wire[]with the sameAcpWorkspaceBindingError; this head passes.-n0-n 4 --dist loadgroupwith 2 co-tenant filesManual verification
N/A — the forced-bind runs above stand in for macOS; the macOS lane on this PR confirms it.
Related Issues
Fixes #23862
Sibling sweep
Swept: git grep -nE "create_session(cwd=tmp_path" -- test/
Siblings: none -- every other hit opens the session in its runtime's own work dir or runs on the KAS wire, which never binds
Pattern harvest
Not generalizable: a single helper passed the wrong folder; the runtime already refuses the mismatch loudly.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.