Skip to content

fix(test): open the elicitation runtime session in the runtime's own work dir - #23889

Closed
iamwhatever wants to merge 1 commit into
mainfrom
fix/23862-macos-elicitation-flake
Closed

iamwhatever wants to merge 1 commit into
mainfrom
fix/23862-macos-elicitation-flake

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: test_a_form_answer_reaches_the_engine_on_either_wire passes 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

  • No change to the workspace binding or 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 on tmp_path, the parent folder. On macOS a Kiro-wire runtime binds its work dir at spawn (bind_voice_safe_agent_workspace). Then _session_work_dir refuses 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: _run opens 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 -p plugin (not committed) makes the launch return a real directory descriptor on Linux, the way macOS binds. With it, the parent commit fails test_a_form_answer_reaches_the_engine_on_either_wire[] with the same AcpWorkspaceBindingError; this head passes.

run result
20x -n0 20/20 green
10x -n 4 --dist loadgroup with 2 co-tenant files 10/10 green
10x forced bind 10/10 green
shuffled, seed 26363, forced bind 5 passed
forced bind on parent 1 failed (the Kiro case)

Manual 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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

…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
@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 25, 2026 01:05
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision b10b1c3e702321247b21cc8b1951e36f9ab08ad4 ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision b10b1c3e702321247b21cc8b1951e36f9ab08ad4 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of b10b1c3e702321247b21cc8b1951e36f9ab08ad4 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • rt._work_dir reads a private attribute. You could keep the wd path _runtime builds and pass it in instead, so the test doesn't depend on the runtime's internals.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of b10b1c3e702321247b21cc8b1951e36f9ab08ad4 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] b10b1c3

False positive or not applicable? A repository writer can comment:
/ai-review override gpt b10b1c3e702321247b21cc8b1951e36f9ab08ad4 false-positive: <reason, 20 to 500 characters>

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed b10b1c3e702321247b21cc8b1951e36f9ab08ad4 — this comment is updated in place on each push.

Review details

No findings. The candidate list was empty. The diff only changes tests: _run now opens the session in the runtime's own _work_dir, an attribute AcpRuntime sets in runtime_class.py:290, and all four callers were updated to the new signature.

[OPUS-REVIEWED] b10b1c3

Verdict parsed from the review's SHA-scoped output markers for commit b10b1c3e702321247b21cc8b1951e36f9ab08ad4.

False positive or not applicable? A repository writer can comment:
/ai-review override fable b10b1c3e702321247b21cc8b1951e36f9ab08ad4 false-positive: <reason, 20 to 500 characters>

@iamwhatever iamwhatever added the ci:macos Run the on-demand macOS suite against this PR head label Oct 25, 2026
@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 25, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #23870 (commit 8cb00b2), which merged first with the same fix: the elicitation runtime test opens its session in the runtime's own work dir, so the macOS bound-workspace check no longer refuses it.

@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 25, 2026
@bolichen97
bolichen97 deleted the fix/23862-macos-elicitation-flake branch November 6, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:macos Run the on-demand macOS suite against this PR head merge conflict Branch has merge conflicts with its base — author must resolve before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky: test_a_form_answer_reaches_the_engine_on_either_wire fails on macOS with AcpWorkspaceBindingError

1 participant