Skip to content

ci: run tsc and the vitest suite on pull requests - #901

Open
ozymandiashh wants to merge 7 commits into
getagentseal:mainfrom
ozymandiashh:ci/tests-job
Open

ci: run tsc and the vitest suite on pull requests#901
ozymandiashh wants to merge 7 commits into
getagentseal:mainfrom
ozymandiashh:ci/tests-job

Conversation

@ozymandiashh

Copy link
Copy Markdown
Collaborator

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.ts fail 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 (--exclude glob, --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.

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.
@ozymandiashh

Copy link
Copy Markdown
Collaborator Author

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":

  1. tests/parser.test.ts - copilot file-purge + durable-orphans (2 cases): fail on ubuntu identically to macOS (expected +0 to be 200, first parse of the copilot fixture). Now reproduced on two platforms, so this is a broken fixture on main, not an environment quirk. Needs a fixture fix before anything can go required.
  2. tests/cli-durable-totals.test.ts - provider-filter parity (1 case): expected 100 to be close to 101.08. Same failure AVSRPA1KR reported reproducing on a clean checkout in the feat(act): measure realized savings for defer-* actions in act report #862 thread. Real assertion drift on main; needs investigation (the 1.08 delta smells like a pricing-table or carried-day change the expectation never followed).
  3. tests/parser-incremental-append.test.ts - inode-change fallback (1 case): expected 8697244 not to be 8697244. ext4 reuses the freed inode when a file is deleted and recreated immediately, so the "inode changed" premise does not hold on Linux. The test needs to force a genuinely different inode (create the replacement BEFORE unlinking the original, or assert on content/size instead).
  4. tests/parser-proxy-pricing.test.ts - case-insensitivity (1 case): asserts macOS/Windows default-filesystem behavior and correctly fails on case-sensitive Linux. Needs a platform gate or a tmpdir-based case-sensitivity probe.
  5. tests/cli-status-menubar.test.ts - config-source filter (1 case): plain 5s timeout on a 37s file on the shared runner. Timeout bump or file-level testTimeout.

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.
@ozymandiashh
ozymandiashh marked this pull request as ready for review August 4, 2026 01:11
@ozymandiashh

Copy link
Copy Markdown
Collaborator Author

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:

  1. noon-anchored fixture in cli-durable-totals (failed every before-noon run; same fix as 1596220)
  2. copilot fixture with absolute 2026-05-01 dates that crossed the durable 90-day age-out on Jul 30 (2 tests)
  3. inode-reuse on ext4 breaking the file-replaced premise (create-beside + rename now)
  4. case-insensitivity asserted unconditionally; now asserts per-platform semantics
  5. 5s default timeout vs real multi-parse CLI spawns (file-level 30s)
  6. root vitest glob swallowing the app/ renderer suite whose jsdom lives in app/node_modules (scoped to tests/)
  7. cache-refresh-lock-process racing its own takeover window even serially - quarantined behind continue-on-error, tracked in cache-refresh-lock-process: takeover-window race misclassifies completed-by-other even in a serial single-fork run #904
  8. context-tree teardown racing an in-flight cache write (rm retries)
    9-10. the shared relative-time fixture escaping into yesterday during the first five minutes of UTC hours 0 and 1, at all four sites (midnight clamp)

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.

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