Repository navigation
test(webui): stop three tests depending on the machine and on request order - #15
Merged
Merged
Conversation
… order The new baseline fails 15 tests on macOS in CI. Three more failed only on a machine with its own `~/.ssh/config`, and one of the fifteen failed here too because it read a race rather than a request. The SSH test claimed that a host named in the config file keeps its alias, but it injected no discovery, so the runtime read the machine's real `~/.ssh/config`. On a machine that does not declare `textvision.top` the host is absent from the config and the save is refused; on a CI machine the file does not exist, the config is unreadable, and the runtime says nothing about the alias — so the test passed there by accident. The repository already has the right pattern: `ssh-connection-service.test.ts` injects a synthetic discovery and reads without touching the machine's own. This file was the one that missed it. The two model-stub tests read `stub.requests[0]` as the user's turn, but the runtime sends the background session-title request to the same endpoint and it can win the race. Worse, waiting for "at least one request" is satisfied by the title request, so the assertion ran before the turn's request had been sent at all. The turn's own stream is now consumed first — the turn is not over until the runtime has sent it — and the turn request is identified by the absence of the `submit_session_title` tool. The expected values do not change; only what is read, and when. Verified against the reverse: injecting a config that declares a different alias fails before this change and passes after it; filtering for the title request instead of the turn fails; and dropping the stream consumption fails two times out of three. The three files pass four consecutive runs. The 15 remaining failures are the ones the baseline already fails in CI, and the upstream repair for them is in progress at PR #11.
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.
Three WebUI tests read something other than what they claim to read. Two of them
pass on CI and fail on a developer machine; the third passes or fails depending
on which request reaches the model endpoint first.
The SSH test reads the machine's own
~/.ssh/configssh-endpoint.test.tsclaims that a host named in the config file keeps itsalias. It injected no discovery, so the runtime read the machine's real
~/.ssh/config. On a machine that does not declaretextvision.topthe hostis absent from the config, the save is refused as
host_not_configured, andthe test fails. On a CI machine the file does not exist, the config is
unreadable, the runtime says nothing about the alias — and the test passes for
the wrong reason.
The repository already has the right pattern:
ssh-connection-service.test.tsinjects a synthetic discovery and reads without touching the machine's own.
This file was the one that missed it. The expected values do not change; only
what is read.
The two model-stub tests read a race
real-host-skill-catalog.test.tsandreal-host-capability-surface.test.tsread
stub.requests[0]as the user's turn. The runtime sends the backgroundsession-title request to the same model endpoint, and it can win the race to
it. Waiting for "at least one request" is satisfied by the title request, so
the assertion could run before the turn's request had been sent at all.
The turn's own stream is now consumed before anything is asserted — the turn
is not over until the runtime has sent it — and the turn request is
identified by the absence of the
submit_session_titletool.How this was checked
Not by "the test is green now":
passes after it, on the same machine.
load-bearing, not decoration.
than one green run to mean anything.
pnpm typecheck:webui,pnpm check:source,pnpm check:tsconfigand thefive WebUI static gates all pass. The full
pnpm test:webuisuite is green onthis branch.
The upstream repair for the baseline failures that PR #11 fixed landed first;
this branch is rebased onto the merge of PR #10.