Repository navigation
test(ui-e2e): reach the socket commit path in the legacy ACK browser proof (OH-69) - #28
Merged
Merged
Conversation
…proof The fixture attached a 0.2.16 CLI, which supports the Pending queue, so immediate send enqueued Pending and never received the socket ACK this test emulates. Attach a CLI below the Pending queue minimum instead, and correct the comment that claimed otherwise. Tracks OH-69.
The proof compared minute-precision text, so a row built from the local send time or an ACK-time clock passed whenever the send stayed inside one minute. Run the browser clock three hours behind the server so only the stored createdAt renders the expected time, and guard that the skew changes the formatted text. Correct the fixture comment: with a numeric pendingVersion, a CLI at or above the Pending queue minimum always enqueues Pending, so the socket commit is reached only by a below-minimum CLI or a session without a numeric pendingVersion. Tracks OH-69.
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.
What changes
The browser test
resolves a legacy message ACK through authenticated stored history before and after reloadcould never reach the code it was written to prove. Its fixture attached CLI0.2.16, which supports the Pending queue, so immediate send enqueued Pending and the socketmessageACK never happened.0.0.9, below the Pending queue minimum, so immediate send takes the direct socket commit path. The server's realpendingVersionis left in place.page.clock.install), so only the storedcreatedAtrenders the expected text, before and after reload. A guard asserts that the skew changes the formatted text. Nothing realigns the skewed clock:nowServerMs()calibrates from the HTTPDateheader, and the server's CORS policy does not expose that header to a cross-origin web client.submitSessionUserMessage. WhenpendingVersionis numeric,agent_queueenqueues Pending for any CLI at or above the minimum, including explicit immediate send. The socket commit is reached only with a below-minimum CLI, or with a session that has no numericpendingVersion. The runtime-RPC fallback lives insidesync.sendMessage, which only the direct-send branch reaches, so it is not another route.Test-only: no production code changes.
Because the spec runs in
serialmode, this test failing also skipped the test after it. Both now run.Validation
page.waitForResponse: Timeout 15000ms exceededwaiting for the by-local-id lookup, with the message held asMessage queuedin Pending.nowServerMs()in place of the looked-upcreatedAtfailedtoHaveText: expected10:09 AM, received7:09 AM. A run with the skew applied only through the HTTPDateheader passed against this break, which is how the CORS point above was found.packages/teststypecheck: passed.session.actionRail.spec.tshad 2 passed. The unchangedopens independent panes and preserves access across responsive layoutstest timed out under heavy machine load and passed alone. Owner testssync.optimisticThinking.test.tsandsubmitSessionUserMessage.test.tshad 70 passed. None of this was rerun for this commit, which touches only the first test.Not run: the full UI e2e suite and
apps/uitypecheck (noapps/uifiles changed). This ran in Playwright's bundled Chromium on macOS only.CI — Testspassed on head5046d62(UI E2E shards, typecheck, unit suites). No Copilot review arrived within 15 minutes of marking ready.Scope and deferrals
CLI Update Required, and no released CLI is known to report0.0.9. On server-v0.2.17, which projectspendingVersion, no supported CLI reaches the socket ACK or the by-local-id lookup. Every send there goes through Pending. The other route, a session without a numericpendingVersion, is not produced by any server in this history that also serves by-local-id. Whether a below-minimum-CLI proof is acceptable, or the lookup belongs only to that state, is a product and compatibility decision.createdAtfrom the ACK frame. Hosted proof against a real older relay remains open.Tracks OH-69.