Commit Graph
18 Commits
Author SHA1 Message Date
Neil 5a888324d7 fix(premerge): always run source-scanning lint tests (premerge-always-tests.txt)
cloud-glossary-lint.test.ts globs and reads src instead of importing it, so
neither name matching nor vitest's module graph ever selected it; #610 broke
it unnoticed. premerge-check.sh now appends every path listed in
config/scripts/cloud-integration/premerge-always-tests.txt to the targeted
set (still subject to the base-list filter).
2026-11-12 21:27:28 -08:00
Neil 8cf078076f fix(premerge): resolve TMPDIR to its realpath (macOS /tmp -> /private/tmp)
packaged-cli-assets' macOS launcher test compares an os.tmpdir()-based path
with the realpath the launcher reports, so it failed in the gate on any PR
selecting it (#574 batch 8, parallel and serial). Export a realpath'd TMPDIR
so the gate environment matches what child processes see.
2026-11-12 17:59:43 -08:00
Neil 7aea563b59 fix(premerge): re-run a failed vitest batch once serially before failing the gate
#574 (deletes widely imported card files) selects ~52 batches; batch 1 failed on
three Electron browser-extension tests that pass alone and in full-suite runs.
A failed batch is now re-run once with --maxWorkers=1 and passes only if fully
clean (set -e), logged as 'failed in parallel, passed serially'. A real failure
still fails the gate.
2026-11-12 16:58:54 -08:00
Neil 1fe5573222 fix(premerge): run targeted vitest files in batches (E2BIG on wide PRs like #574)
A PR that deletes or changes widely imported modules selects hundreds of
test files; passing them all to one vitest spawn failed with E2BIG. Run them
in batches of PREMERGE_TEST_BATCH (default 150); every batch must pass, so
the gate and the premerge OK record are unchanged.
2026-11-12 16:18:42 -08:00
Neil e26bcb427e chore(cloud): premerge adds every test Vitest's module graph relates to the change (vitest list --changed)
#462 broke three terminal-multiplex tests (REG-5) that premerge never selected: they import an aggregator
(methods/terminal/terminal) one folder up that imports the changed modules, so neither the same-folder nor the
module-name rule matched. 'vitest list --changed=<integration> --filesOnly' follows the module graph; on #462's
diff (9a2e5c7ce9f..8103fc98861) it selects all three. Its files are unioned with the existing selection, then
the base-list filter applies as before.
2026-11-11 12:54:17 -08:00
Neil 61f8c9f26e fix(cloud): premerge removes its temp merge worktree on any exit, including a kill while queued
The slot-holding python parent now traps INT/TERM (forwarding to a running child) and, in a finally, removes the temp
worktree (git worktree remove --force, rm -rf) and prunes it from the main repo. The pre-exec stage has its own
EXIT/INT/TERM trap for the window between worktree add and the hand-over. Tested: 3 runs, limit 2, run 3 killed with
TERM while queued -> exit 143, 'stopped by signal 15; removed …'; all three temp worktrees gone from disk and from
git worktree list.
2026-11-11 11:44:01 -08:00
Neil 6f8a4e9183 chore(cloud): premerge runs at most 2 at once per machine; extra runs queue and log the wait
The shared Mac hit load 60 from parallel premerges and vitest runs, starving the e2e harness. In the merged copy
every branch re-runs (#447), after the merge and before install/typecheck/lint/tests, the script now takes one of
PREMERGE_MAX_CONCURRENT (default 2) flock'd slot files under PREMERGE_LOCK_DIR (default /tmp/vdrv), held by a python
parent for the run (a killed run frees its slot). Queued runs print 'premerge: queued for one of 2 slots …, waited Ns'
every 30 s and 'got slot i/2 after Ns'. Tested: 3 concurrent runs with a limit of 2, the third queued 10 s.
2026-11-11 11:42:24 -08:00
Neil 8b7b51394e test(cloud): base-list skip is an exact whole-line filter with a unit test; off-list tests stay selected
filter-base-list-tests.sh is the one place premerge drops base-list tests (logged to stderr). The test covers:
a base-list test is dropped and logged while an off-list test is still selected; shared prefix/suffix/folder
never skips; entries are literal (no regex) and comments are ignored; a missing list keeps everything.
2026-11-11 07:17:49 -08:00
Neil 0e9eb6201c chore(cloud): premerge skips full-suite base-list tests (fail upstream too) and logs each skip
w6's #450 premerge pulled in 4 agent-hooks tests through the importer selection; all 4 fail identically on
integration without the change (and on upstream at the merge base) under run-vitest.mjs, so premerge failed
on environment-only reds. The base list (41 files, derived on upstream e295b0d37c) now lives in the repo
and is subtracted from the targeted run.
2026-11-11 06:39:20 -08:00
Neil ae31e1c0a8 chore(cloud): premerge re-runs itself from the merged worktree and lists the tests it selected
A branch cut before #437 ran its own old copy of premerge-check.sh (the integration merge only happened in
the temp worktree), so #440's first gate selected 0 tests although the merged gate selects the parity test.
The script now merges, then execs the merged copy; it also prints every targeted test file.
2026-11-11 06:08:39 -08:00
Neil 4d67445d8c chore(cloud): premerge runs tests through the repo's run-vitest.mjs (env policy) and PREMERGE_FULL=1 runs pnpm test
Bare 'npx vitest' skips run-vitest.mjs's env (e.g. ORCA_BACKGROUND_LAUNCH=1) and the workspace package
build, which made 37 tests fail spuriously in a full run on integration HEAD.
2026-11-11 05:11:21 -08:00
Neil 144707f18b chore(cloud): premerge also runs same-folder tests and tests that import a changed module; PREMERGE_FULL=1 runs the full suite (PM-gap)
#347 (c267ae3676) broke cloud-workspace-archive-delete-race.test.ts and the premerge never ran it,
because it only mapped changed sources to sibling-named tests (foo.ts -> foo.test.ts). #435 then ran 0
targeted files for the same reason. Now each changed source also selects every test in its folder and
every src test that imports it by module name; for cloud-workspace-actions.ts that is 14 files including
the race test. PREMERGE_FULL=1 runs the whole vitest suite.
2026-11-11 04:59:14 -08:00
Neil a768e3de60 chore(cloud-integration): premerge gate also runs sibling tests of changed sources; sync retires private branches, takes UPSTREAM/LOCAL_BRANCH 2026-11-09 16:09:14 -08:00
Neil 2892ba1f47 fix(cloud-integration): lint and typecheck green on HEAD; premerge gate script
- cloud-transfer-steps runs git through gitExecFileAsync (no direct child_process); VM replies parsed with zod.
- Casts replaced by types, guards and zod across hosted-sandbox, cloud-api, cloud-api settings and tests.
- Offline cache and message-queue store use node:fs/promises (main-sync-fs ratchet); the offline service's
  30 s setInterval becomes a backing-off beat that runs only while prompts are queued; renderer intervals use
  installWindowVisibilityInterval.
- Flaky-test gates: fixed timestamps, vi.waitFor, no sleeps in cloud-message-queue/cloud-transfer tests.
- shadcn restyles become primitive variants (Skeleton shape/motion, Button default-held, Textarea compact/bare,
  InlineError toast layout, Popover focusRing); exhaustive switch; derived pending state in the run-target hook.
- Localization: routine labels/placeholders and 'Orca Cloud is unavailable.' through t(); cloudSecrets plurals
  pass the singular as defaultValue_one.
- config/scripts/cloud-integration/premerge-check.sh: merge-into-integration gate (typecheck + full lint + tests).
2026-11-09 08:08:35 -08:00
Neil 0566752f23 chore(cloud-integration): sync also merges #40283 (agent-sign-in-followups) 2026-11-09 04:43:36 -08:00
Neil 77a5d52352 chore(cloud-integration): sync keeps local unpushed commits 2026-11-09 04:29:52 -08:00
Neil ccbf420c5a chore(cloud-integration): packaged integration builds honor the dev sandbox key; sync merges forward, never force-pushes 2026-11-09 04:29:52 -08:00
Neil a93fd4baba chore(cloud-integration): script to rebuild cloud/integration from stablyai/orca main, the nwparker branches and stacked PRs 2026-11-09 04:07:52 -08:00