Skip to content

Test build: combined update, recorder, tach and sleep/lock fixes - #200

Closed
Views2k wants to merge 8 commits into
mainfrom
test/all-fixes-20261108
Closed

Views2k wants to merge 8 commits into
mainfrom
test/all-fixes-20261108

Conversation

@Views2k

@Views2k Views2k commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Combined branch for a private test build of the open fixes, so one installer carries all of them:

The only overlap is App.xaml.cs: #198's sign-out flag (SetWindowsSessionEnding) now lives in #199's RecordSessionNotice handler for the Ending and Continuing notices. Everything else merged cleanly.

Not for merging: the four PRs merge on their own. This branch exists for CI on the combination and for the test installer, and is closed once they are on main.

SendAsync observes a helper reply through Task.WaitAsync, which sees the
completed reply only after a queued continuation runs. When the helper
finishes a save and then reports a transition or exits, a shutdown can
cancel that wait first. The finished save then failed with the terminal
reason instead of completing its library copy.

A reply that has already arrived is now used even when the wait reports
cancellation first. This was the intermittent failure of
FinishedSaveCompletesItsLibraryCopyAfterTheHelperClosesForATransition.
DisabledRecordCallsCreateNoHistoryOrPerCallAllocations measured the first
run of a loop in the test method. That run includes the loop's on-stack
replacement compile, which happens on the test thread near the
10,000th iteration. Runtime work during that compile can allocate on the
test thread: in local runs that force the compile into the window, the
runtime added a 16,344-byte object to the pinned object heap, and the test
failed although the disabled record calls allocate nothing. Whether this
happens depends on process state from earlier work, so the isolated
nightly run failed intermittently (49,200 bytes on 2026-10-27).

Run the same loop once before measuring, and read the elapsed time after
the allocation count, so the measured window contains only the record
calls.
…ter starts, and skip updates during sign-out

- A download that times out or loses its connection before GitHub answers no
  longer spends the release's three-attempt budget. It is retried after 2 min,
  then every 15 min, and its failure is reported once until a download succeeds.
  Verification, storage and helper failures keep the budget.
- Installer download requests wait up to 60 s for a response; update checks
  keep 15 s. A response timeout now records which request of the chain timed
  out, whether it opened a connection, and how long the TCP connection took.
- Starting the update helper or the installer is tried again after 1, 2, 4 and
  8 s when Windows answers access denied or a sharing violation. The helper
  re-checks for Forza before each start.
- After the helper restarts Wisp, an installer already staged for the release
  is verified again (name, size, SHA-256, installer identity) and installed
  instead of being downloaded again.
- No update hand-off starts between Windows' sign-out or shutdown notice and
  its withdrawal. A helper that exits with 0xC000026B (window station shutting
  down) is recorded as cancelled, not as an update failure.
…em unexplained

A recovered run without a close request, a Windows fault or a Windows stop
event was always reported as shutdown-incomplete. Most of those runs on 2.7.x
ended on a PC that went to sleep or was locked and never came back, which
hid the real unexplained stops among them.

The session sentinel window now also receives the sleep, resume, lock and
unlock notices (WM_POWERBROADCAST and WM_WTSSESSION_CHANGE) on its own
thread, and the run marker keeps the last sleep and lock times. Resuming and
unlocking clear them, as does a checkpoint a minute or more after the sleep
notice, since the checkpoint timer does not run while Windows sleeps. The
next start labels such a run system-sleep or session-locked; a Windows fault,
stop or shutdown event still wins, and markers from earlier versions keep
today's reading. Like a Windows shutdown, these runs get no dashboard card.

Closes #193
An update check or download that reaches its response deadline now reports
update.download with the incident: which request of the chain timed out, and
how long its TCP connect, TLS handshake and response wait took. The handshake
is timed with the transport's plaintext stream filter, which passes the stream
through unchanged. The measurements stay out of the incident signature.
@Views2k

Views2k commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

Superseded: all four fixes are merged on main (#196, #197, #199, #198); main at 6acfec5 has the same tree as this branch.

@Views2k Views2k closed this Nov 9, 2026
@Views2k
Views2k deleted the test/all-fixes-20261108 branch November 9, 2026 03:13
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