Skip to content

test: wait for each Windows milestone to be seen before the next - #843

Open
wan9chi wants to merge 1 commit into
mainfrom
claude/windows-milestone-ack
Open

wan9chi wants to merge 1 commit into
mainfrom
claude/windows-milestone-ack

Conversation

@wan9chi

@wan9chi wan9chi commented Oct 12, 2026

Copy link
Copy Markdown
Member

Motivation

On Windows a milestone is the console title, and ConPTY emits only the latest title when it renders. Another process's milestone could replace a milestone before that render. In pending_uploads and hide_pending_uploads, the proxy's stalled milestone can replace uploads-pending. Both cases timed out waiting for it in Windows CI, so #841 skipped them on Windows.

A side channel alone can't replace the title. The harness must also know that the screen includes everything printed before the milestone, and ConPTY guarantees that only for its rendered output (see #516). So the title stays, but each producer waits until the harness has seen its title.

Changes

  • On Windows, mark_milestone takes a named lock shared by the processes in the test terminal, sets its title, and holds the lock until the harness signals an event named after the milestone's random id. TestTerminal::spawn passes the lock's name in VT_PTY_TERMINAL_TEST_MILESTONE_LOCK. A process that doesn't inherit this variable, such as a task that vp runs with a filtered environment, only sets the title, as before.
  • Reader signals the event for each milestone it reads, in both expect_milestone and wait_for_exit. decode_milestone_title returns the id along with the name.
  • New vt_pty_terminal_test tests: two processes marking milestones at once, and a milestone with nothing printed after it.
  • pending_uploads and hide_pending_uploads run on Windows again.

🤖 Generated with Claude Code

ConPTY emits only the latest console title when it renders, so a milestone
could be replaced by another process's milestone before then. On Windows,
`mark_milestone` now holds a lock shared by the processes in the test
terminal from setting its title until the harness, having read the title,
signals an event named after the milestone's id. `TestTerminal::spawn`
names the lock through `VT_PTY_TERMINAL_TEST_MILESTONE_LOCK`.

This lets `pending_uploads` and `hide_pending_uploads` run on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

fspy benchmark

linux

dynamic/launch             change  +0.50%  [ -8.69% ..  +8.61%]  overhead   +50.80%
dynamic/access             change  +0.30%  [-18.35% .. +25.09%]  overhead    +7.35%
dynamic/access-relative    change  +1.48%  [-10.36% .. +12.38%]  overhead   +50.19%
dynamic/access-contended   change  +2.01%  [ -2.20% ..  +7.71%]  overhead   +13.63%
static/launch              change  +1.35%  [ -7.59% .. +10.41%]  overhead  +157.79%
static/access              change  -2.41%  [-14.41% .. +10.79%]  overhead  +746.23%
static/access-relative     change  -1.96%  [ -9.04% ..  +7.62%]  overhead  +995.60%
static/access-contended    change  -0.05%  [ -9.47% ..  +6.64%]  overhead +2004.30%

macos

dynamic/launch             change  -0.08%  [ -4.57% ..  +4.59%]  overhead  +235.06%
dynamic/access             change  +0.67%  [ -4.37% .. +13.40%]  overhead    +5.22%
dynamic/access-relative    change  -0.60%  [ -5.16% ..  +6.11%]  overhead  +239.08%
dynamic/access-contended   change  -1.18%  [-13.17% .. +32.33%]  overhead    +3.76%

windows

dynamic/launch             change  +0.65%  [ -4.36% ..  +6.39%]  overhead   +26.28%
dynamic/access             change  +0.19%  [ -1.33% ..  +0.96%]  overhead    +1.35%
dynamic/access-relative    change  +0.00%  [ -0.93% ..  +1.13%]  overhead    +1.35%
dynamic/access-contended   change  -0.36%  [ -2.52% ..  +1.10%]  overhead    +1.99%

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant