ci: run tsc and the vitest suite on pull requests - #901
Conversation
Implements the getagentseal#898 proposal. The parallel-sensitive cache-refresh-lock files run serially in their own step; everything else runs in the default forks pool. Flag syntax verified locally against vitest 3.2.6.
|
The experiment ran, and the first ubuntu execution of this suite in the repo's history returned exactly the data the draft existed to collect. Six failing cases, five distinct causes, none of them "the workflow is wrong":
Everything else passes on ubuntu, including both serial cache-lock steps - the quarantine held. Suggested sequence: land the five test fixes (each is small and independent), then flip this from draft with the observing-first week from #898. I can take the five fixes as a follow-up branch on this PR or separately, whichever review shape you prefer. |
…n exposed - cli-durable-totals: the live fixture session was stamped at noon today, so every before-noon run saw it in the future; the provider-filtered path drops future instants while the all-provider path keeps the whole day, failing the parity assertion. Relative-and-clamped timestamps, the same fix project-filter-durable-totals got in 1596220. - parser (copilot, 2 cases): the fixture's fixed 2026-05-01 dates crossed copilot's durable 90-day age-out on 2026-07-30, so the first parse pruned the freshly-cached session. Relative timestamps. - parser-incremental-append: unlink-then-create let ext4 hand the freed inode straight back, breaking the new-inode premise. The replacement is now created beside the original and renamed over it. - parser-proxy-pricing: normalizeProxyPath folds case only on darwin and win32, deliberately; the test now asserts the platform-correct behavior on both kinds of filesystem instead of hardcoding macOS. - cli-status-menubar: the config-source filter case does real multi-parse work and needs more than the 5s default on shared runners; 30s cap.
…ness The root vitest glob also matched app/renderer/*.test.tsx, whose jsdom environment lives in app/node_modules and cannot resolve from the root install; ERR_MODULE_NOT_FOUND took down the whole parallel step.
Every case spawns the real CLI and does genuine multi-provider parse work; run getagentseal#3 showed a second sibling crossing the 5s default on the shared runner. File-level cap replaces the earlier single-test one.
Run getagentseal#4 showed cache-refresh-lock-process racing its own takeover window even in the serial single-fork step (getagentseal#904). The enforced signal stays the main suite; the lock suite reports without gating until the race semantics are settled.
server.close() only stops new connections; an in-flight fire-and-forget cache save can land a file mid-recursive-rm, surfacing as ENOTEMPTY on slower runners (run getagentseal#5). fs.rm's built-in retries absorb the window.
The shared base computation guarded hours >= 2 but its h < 2 branch still subtracted five minutes past midnight, escaping into yesterday during the first five minutes of UTC hours 0 and 1 and zeroing every 'today' assertion - which is exactly when runs getagentseal#6 landed. Midnight clamp replaces the guard at all four sites.
|
Run #7 is green: the job now enforces. The draft phase turned into a seven-run excavation of every latent environment sensitivity in the suite - none of them workflow bugs, all of them real test debt this job was proposed to surface:
Policy question from #898 stands: leave as reporting for a week, then flip required. The suite ran 2400+ tests green on the shared runner with the one quarantined step reporting separately. |
Draft implementation of #898, opened as draft pending the required-vs-observing policy call.
What this run itself will teach us (the reason to open it now): the suite has never executed on an ubuntu runner, so this PR doubles as the experiment for the two environment-sensitive knowns. If the copilot fixture cases in
tests/parser.test.tsfail here the way they fail on my macOS environment, the fixture needs fixing before this can go required, and we will see that in this PR rather than guess.Flag syntax (
--excludeglob,--poolOptions.forks.singleFork) verified locally against vitest 3.2.6 before pushing. Not adding it to required checks; that stays a maintainer call on #898.