Repository navigation
test: close the five highest-value gaps from the test audit - #857
Merged
Merged
Conversation
The synthetic snapshot kept the host session path while replacing the id, so the UI stayed on reconnect and the suite never reached its measurements. Require one id and path, and fail that mismatch before the UI wait. The suite stays outside required CI. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
Lock recovery still treats a failed or unparseable start-time query as unknown and keeps the 5s fail-closed deadline. Windows now asks cscript for the WMI creation time instead of paying for a PowerShell cold start. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
…dline timeoutMs still bounds both waits. The lifetime test now parses the metadata event before moving the clock onto that deadline, so a later stall is the next event. A deadline that expires before any payload stays the first event. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
Index bytes change when fsmonitor or untracked-cache extensions are enabled. Compare staged entries with git ls-files --stage, and keep porcelain status on the fork. A real staged-content change still fails that comparison. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
A directory name containing openpi is not a source. Keep the single reported path whose realpath is this checkout, including duplicate and symlink lines, and still reject zero, foreign, or multiple OpenPI package roots. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
The response body pulls a second chunk before the first read is parsed. Advancing the clock on that prefetch still reports the first SSE event. The third pull is the read after the metadata event. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
… typed Typecheck requires a declaration for the provenance module, matching the other script exports. The missing-path case builds the snapshot without that field instead of deleting a required property. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
Vitest imports setup config without a file URL. Building that path at module load threw before any test in the settings catalog could start. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
Redirected cscript output is UTF-16, so the CIM timestamp never matched and a reused PID stayed unknown until the 5s lock expired. Decode the pipe, keep the 1s query cap, and still fail closed on a bad result. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
Windows temp paths can be 8.3 names while pi list reports the long path. The matcher already rejected that foreign package. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
The branch cannot be force-pushed. Bring in main, including the contributor test-value skill, with a merge commit. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
cscript still produced no usable CreationDate on the Windows runner, so a reused PID waited out the 5s lock. Keep the 1s WMI query, then allow one PowerShell read of at most 3.5s. A failed or non-integer result stays unknown and does not recover the lock. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
The b03b1df Windows shard passed. UI ubuntu Node 22.19.0 timed out in composer-context-navigation, and rerunning failed jobs was not permitted. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
Drop the PowerShell fallback. One cscript query decodes UTF-16 and stays inside the 1s budget. A missing time is unknown ownership, so the 5s lock expires without taking the lock. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
A trailing comma in the cscript query is a syntax error. //B hid it, so the query exited in milliseconds with empty output and the lock waited out the 5s deadline. Drop //B, pass //Nologo verbatim, and leave a failed read non-zero. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
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.
Problem
Five tests were protecting the right failures, but the way they checked those failures was brittle or never reached the failure.
timeoutMsfor both the first SSE event and the rest of the stream. On a slow run the metadata event was still the first-event timeout, so the test expected "next SSE event" and observed "first SSE event" (Flaky CI tests: session-history E2E anchor, Windows git-info refresh, Windows setup-config lock timeout #829).tests/web/session-worktree.test.tscompared raw git index bytes. Withcore.fsmonitororcore.untrackedCache, git appends index extensions and the bytes change even when the staged content does not.scripts/provenance.mjstreated a path containingopenpias an OpenPI source. A checkout whose directory is not named that, including this/workspacetree, was reported as no match even whenpi listshowed only that checkout.Value
Each check still fails the original bad result, and the false failures stop blocking the measurement or the recovery they exist to protect. The performance suite can run. Provenance accepts the real checkout and still rejects zero, foreign, or multiple OpenPI roots. Lock recovery reads a Windows start time from WMI only. A missing time stays unknown and the 5s lock expires without taking the lock.
Approach
currentSessionIdandcurrentSessionPathto the same synthetic session, andassertPerformanceSessionIdentitythrows before the route is fulfilled when those disagree with the session list or the selected session. An identity error is not swallowed by the route abort path. The suite is not added to CI.cscript.exe //Nologoquery ofWin32_Process.CreationDate, read as the CIM datetime string and truncated to unix milliseconds. Redirected cscript output is decoded as UTF-16 LE when it has a BOM or NUL-padded ASCII; a UTF-8 misread stays unparseable. The script path is resolved when the query runs, so Vitest can import setup config without a file URL. The JScript has no trailing commas, writes a failure token and quits outsidetry, and is not launched with//B. The query budget stays 1s. There is no PowerShell fallback and no second query command. A non-zero exit, timeout, or unparseable value is unknown ownership, and the lock deadline stays 5s. Linux still usesps. The existingexecFilefailure injection still covers the fail-closed path, and on Windows that injection must becscript.exeonly.timeoutMsto both Antigravity deadlines. The lifetime test holdsDate.nowuntil the metadata event has been parsed, then moves the clock on the third body pull (the response prefetches one chunk before that parse). A sibling test advances the clock before any payload is parsed and still expects "first SSE event".git ls-files --stage -z. The fork test still comparesgit status --porcelain=v1 -z.realpath, counts a path as OpenPI when it is this checkout or itspackage.jsonname is@tt-a1i/openpi, and matches only when that set is exactly the checkout. Importing the module no longer runspi list. The foreign-package test comparesrealpathSync.nativeof that package, so a Windows 8.3 temp path is not treated as a different source.Validation
Linux x64, Node v22.23.3, Bun 1.3.14. Chrome 154 for the performance suite.
bun run lintandtsc --noEmitpassed after removing the PowerShell fallback.tests/extensions/shared/setup-config.test.tspassed on Linux: reused-PID recovery, the mocked query-failure lock wait (about 5.5s, no mutation, no PowerShell command), and the live WMI test skipped off Windows.bun run testpassed ond00476b: Node 2639 passed / 9 skipped / 0 failed (2648 tests), Vitest 1520 passed / 98 files.99577ba28cb347d38db1008979c9b30e08befa5baa34e0dfb09530afd2b4ecfe.ea256c6removed the PowerShell fallback but the WMI script was invalid JScript (a trailing comma, hidden by//B). Windows CI on that head failed the live WMI read in 54ms and then the reused-PID recovery at the 5s deadline. Headfe57ee4fixes the script. CI run 38865595760 on that head succeeded. Windows parallel 2/2 recordedWindows reads this process start time from WMI aloneanda reused PID does not impersonate the dead lock owneras passing, and the query-failure case still waited out the deadline (ok 458about 6.5s afterok 457).No speedup versus PowerShell is claimed. Heartbeat liveness (#862) is out of scope.
Impact
processStartedAt. No config schema change.Fixes #840. Related to #829.