Repository navigation
test(sdk): stabilize steering and isolate wire-test environments - #2637
Merged
Merged
Conversation
Replace the provider timing window with an unresolved Write ask so sequential append and retract controls cannot race a turn-boundary drain. Preserve exact outcome assertions and drain the owned iterator through cancellation. Refs #2327 Co-authored-by: Mecatl <[email protected]>
Give spawned test daemons test-owned HOME and XDG roots. Resolve Bun under the caller environment before isolation, retaining real Bun callback coverage through a configuration-dependent shim regression. Add poisoned ambient configuration controls to the default spawn smoke test. Co-authored-by: Mecatl <[email protected]>
Document CI-aligned tool targets, workspace-specific Node versions, and explicit runtime selection without changing personal defaults. Link SDK development instructions to the canonical contributor table. Co-authored-by: Mecatl <[email protected]>
Create product fixture HOME/XDG roots and startup-failure state under Node's tmpdir so they honor managed TMPDIR leases. Preserve explicit cleanup and assert both temporary placement and removal for direct and runtime-helper fixtures. Co-authored-by: Mecatl <[email protected]>
10 of 14 tasks
This was referenced Nov 11, 2026
Merged
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.
Summary
Writepermission ask instead of relying on a two-second mock response delay. Preserve exactaccepted,appended,retracted, andnone_pendingassertions, then assert cancellation through the same event iterator.CONTRIBUTING.md, linked from SDK development instructions. Distinguish SDK/docs Node 24 from Studio Node 26 and contributor targets from supported runtime minimums.Refs #2327, item 6b's steer-outcome mismatch. This does not claim to resolve every historical premature-close variant or the entire umbrella issue.
Why
session.run()can return before the initial turn-boundary steer drain. Two sequential RPCs do not guarantee that the first steer remains pending when the second arrives; a secondacceptedoutcome can therefore be correct. The provider delay occurs after the initial boundary and supplies only a timing window. An unresolved permission ask prevents further turn-boundary drains while the assertions execute.The accepted/appended explanation is supported by current code, not an instrumented trace of the historical CI failure. A temporary 2.5-second pause between steer requests made the original test fail with stale-run control; the same pause passed with the barrier across all three transports. The final test contains no added pause.
During validation, unrelated local setup failures exposed incomplete fixture isolation and Bun shim resolution after XDG replacement. The regressions use synthetic caller state rather than inspecting operator settings or changing global trust.
Verification
runtime shim lost caller configuration.task test,task lint,task test:race, and offline demo: passed. Demo showed tool call/result, permission ask/approval, and terminal result.task docsandtask site:build: passed; generated references unchanged.git diff --check: passed.macOS runtime execution remains for CI; only its environment-isolation wiring was changed locally.
API compatibility
Tests, test infrastructure, and contributor documentation only. No production runtime, wire contract, API major/feature identifier, public Go/TypeScript API, or stored-data changes. No upgrade implications.