Conversation
The Windows build of the 2.58.0 release PR failed after every app-core test had passed, on one unhandled rejection: "window is not defined" from refreshAssets. Opening a vault schedules an asset refresh two seconds later (scheduleAssetsRefreshForVault). On the slow Windows runner store.test.ts finished inside those two seconds, vitest tore down the jsdom environment, and the timer fired into a process with no window. The same timer can also fire mid-file against a later test's window.zen spy. store.test.ts already cures this class of straggler in its afterEach: it starves the bail-out checks of the old store's timers (nothing dirty for a pending note save, no doc for a pending database write). It never covered the asset refresh, which bails when the vault changed, and it only reached the last store a test loaded, while the relaunch tests load two. The afterEach now clears `vault` as well, on every store module the test loaded, so a stray refresh returns before touching window. No app code changes. Reproduced on macOS by removing window after the file, as vitest's teardown does: 14 unhandled rejections with the CI stack before, none after.
The Windows release build for 2.58.0 failed in the undo history pruning test with a five-second timeout followed by ENOTEMPTY. To prove the 400-note cap, the test wrote 403 histories through the real atomic writer, about 1,600 file operations in a row: 0.1 s on macOS, 5.5 s on the Windows runner. The ENOTEMPTY was only the aftermath. Once vitest gave up on the test it ran the afterEach cleanup, while the abandoned test body kept writing into the folder being removed. A 15 ms timeout reproduces the same pair on macOS, down to the same folder name. pruneUndoHistories now takes the per-vault cap as an optional third argument, next to the `now` it already takes for tests, and the app keeps the default of MAX_UNDO_HISTORY_FILES. The test checks the same rule with a cap of 4 and also asserts how many files are left. It fails against the old code, which ignores the cap, and passes against the new one.
Desktop-managed zn installations still receive CLI 0.4.1. Pin the released 0.6.0 archives and source commit for all four supported desktop targets, keeping integration protocol 1 and documenting the new terminal commands and diagnostics in the in-app manual. Each archive passed checksum and native architecture validation, and the native integration probe matched the pin.
Ship the CLI 0.6.0 bundle with the shared cloud-conflict layout fix and the two Windows CI reliability fixes. All workspace versions and lockfile entries agree. Fresh typechecks, unit suites, the signed local package, isolated packaged launch, and all three editor smoke suites passed.
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
Verification
Minimal release with concise notes and no new demo media. The cloud-conflict layout fix already on main is also included relative to v2.58.0.