test(senpi-task): prove the auto-deny reaches the host before the next command - #8966
Closed
code-yeongyu wants to merge 1 commit into
Closed
code-yeongyu wants to merge 1 commit into
code-yeongyu wants to merge 1 commit into
Conversation
Owner
Author
|
Focused Windows soaks (windows-latest, 10 iterations each): 36324960795 success, 36324963152 success, 36324966543 success. |
code-yeongyu
marked this pull request as ready for review
September 27, 2026 15:19
…t command (#8950) The confirm auto-deny test asserted < 50 ms of wall clock across a socket, which a loaded Windows runner exceeded (55.2 ms) while the deny itself was correct. It now proves the real contract: once the client has ingested the UI request, the deny is on the wire before the client's next command.
code-yeongyu
force-pushed
the
fix/win-ci-session-client-deny
branch
from
September 27, 2026 17:28
73fdc18 to
32df0e9
Compare
Owner
Author
|
Another occurrence this PR fixes: soak run 36353556711 (from another session's Windows shard-2 soak) failed on exactly this assertion, |
Owner
Author
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
Replaces the wall-clock assertion in the HostSessionClient confirm auto-deny test, which went red on a loaded Windows runner (run 36309221289, 55.2 ms > 50 ms) while the deny frame was correct.
Root cause
A test flake, not a product bug.
session-client.tsdispatches the deny (void sendExtensionUIResponse(...)) synchronously on ingest, with no timer on the path. The test measured socket round-trip latency against a fixed 50 ms budget.Fix
The test now asserts the contract the product guarantees. The host sends the UI request followed by an
agent_endrecord on the same stream, and the test awaits the client forwarding that event, which proves the request was already ingested. Then it issuesgetState(). The host's command log must showextension_ui_responsebeforeget_state, with the deny payloadconfirmed: false. No sleeps, no timing budget.QA & Evidence
bun test packages/senpi-task/src/runners/rpc-host/session-client-records.test.ts: 8 pass.--rerun-each 50: 400 pass, 0 fail.tsgo -p packages/senpi-taskand biome are clean.get_statearrives first). The previous version of this change still passed under the same mutation, which is why the ordering assertion replaced it.Fixes #8950
Refs #8324
Summary by cubic
Replaces the flaky confirm auto-deny test in
HostSessionClientrecords, which timed out at 50 ms on a loaded Windows runner (55.2 ms) even though the deny payload was correct. The new test proves the deny reaches the host before the client's next command, instead of measuring socket latency.agent_endrecord (confirming the UI request was already ingested), then assertsextension_ui_responseappears beforeget_statein the host's command log.--rerun-each 50(400/400 pass) and a mutation delaying the deny by 8 s, which the new test catches in 4 ms.Fixes #8950
Written for commit 32df0e9. Summary will update on new commits.