Skip to content

Make main green for 0.1.122: tests caught up with the product, the Linux-only box off Windows - #3281

Merged
milind-soni merged 3 commits into
mainfrom
fix/main-green-0122
Oct 22, 2026
Merged

milind-soni merged 3 commits into
mainfrom
fix/main-green-0122

Conversation

@milind-soni

@milind-soni milind-soni commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Release 0.1.122's CI run (39684923366, on 087f01f31) failed on every OS. Every failure was a test that hadn't caught up with the product, a Linux-only suite running on Windows, or an overloaded shard. This PR changes no product code.

Every OS

File Decision Why
electron/updater.test.mjs test ensureCloudAccount's onState also tells includedPages (#3266). The vm world the test builds had no includedPages, so it threw a ReferenceError. It now gets the same stub as includedX.
scripts/docker-image.test.ts test The Cloud home's tools layer now installs a pinned pnpm@10.33.0 (bot box commit), and cleans up after it in the same step. The test now counts 3 heavy installs for cloud-home (still beneath the app files), reads every rm -rf in a step (apt's lists come first), and checks ENGINES_CACHE_TAG on the engines' install, not on pnpm's. Mutation-checked: removing pnpm's cleanup fails the cache test.
server/cloud-send-move.e2e.test.ts test A send of some items (keys) never carries chats (withChats = !keys && …), and S4 deleted Bring. So nothing put Kai's and Lux's lines on My Cloud before the sender strip, and My Cloud held no rows at all. The test now uses an older app's whole Send everything, which did carry them, and asserts that it did. The whole file passes locally (5/5).

Windows only

File Decision Why
server/bot-box/{plan,bridge,broker,egress-gate,harness-gate}.test.ts platform gate The bot box runs only on a Linux Cloud home (detect.ts returns not-linux anywhere else). Its gates listen on unix sockets, which Windows refuses at a file path (EACCES). Its plan is bubblewrap argv over POSIX paths. The suite is describe.skipIf(win32), with the reason in a comment.
server/bot-box/box.test.ts, broker-mcp.test.ts platform gate, per test Only "on" / lend / the two broker tests skip. "off" (what Windows actually gets) and the plain wrap tests still run there. afterEach no longer removes a folder that was never made.
server/workspace-backup.test.ts platform gate, socket only On Windows the box/ folder holds only the seccomp filter, with no live socket, and the test still checks the folder is left out of the backup.
server/cloud-team.e2e.test.ts (7th, seen once the relaunch worked) test The prompt names the memory file the way workspace.ts quotes it (JSON.stringify), so on Windows its backslashes come doubled. The test now looks for the quoted path.
server/cloud-team.e2e.test.ts (6) fixture On Windows, kill("SIGTERM") ends the team server without running its shutdown. sessions.json.open stays behind, so the next start drops every email session as it would after a crash (by design). All 6 failures followed from that relaunch. scripts/testing/cloud-send-fixture.ts now stops the team server over IPC on Windows, and the server runs its own SIGTERM shutdown (the same approach as acp-shutdown.e2e.test.ts). Checked on macOS both ways: forcing the IPC path passes 7/7, and hard-killing gives exactly the 6 CI failures.
shared/app-frame/host-page.test.ts .gitattributes app-host.html is now pinned eol=lf. A CRLF checkout broke both the byte-for-byte compare with the build script's output and the hash on its first line.
electron/shared-drives.node-test.mjs (from #3254/#3272, after the release) test On Windows, "/" is the current drive's root. On CI that is D:\ (the checkout), a separate data drive from the home folder's C:\, which may be shared whole by design. The "system disk" assertion now uses the root of the home folder's drive.
server/routes/published-pages.test.ts test The guest path maps to this computer's native path (join), so the expected value is join("/vm/bot-1", "site").
scripts/gen-app-fixtures.test.ts test Written paths are compared relative to the root with /.
server/app-docs.test.ts test The 0o600 check skips Windows, as the repo's other mode checks do.

Shards

scripts/testing/vitest-shard-weights.json was last refreshed on Oct 12. It had no entry for one-home.e2e (215 s), routine-recovery.e2e (168 s), cloud-computer-auto-sleep.e2e (106 s) or 140 other e2e files, and every one of them landed in shard 4. That shard's Linux job hit its 30-minute cap and was cancelled on main (39684885971, 39687280672), as well as on this branch's first dispatch. I regenerated the file with update-shard-weights.mjs --run 39684923366 --run 39684885971. Using this PR's Linux per-file times, the test seconds per shard are now 1133/1085/1090/1159, down from 942/958/1000/1566. No timeout was raised.

No ratchets touched (server/index.ts, electron/main.mjs unchanged), no locale files.

Local (macOS): the touched files plus team-move.e2e give 20 files / 143 tests passing (the Linux self-check skips), plus typecheck, lint and the ci-scope tests.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Improved cross-platform test reliability, especially on Windows, with platform-aware handling for paths, permissions, process shutdown, and temporary resources.
    • Skipped Linux- and Unix-specific integration tests on Windows where required.
    • Updated Docker image and Cloud fixture coverage to reflect installation and cleanup behavior.
    • Expanded send-operation coverage to verify multiple conversations are included.
    • Adjusted test distribution weights and fixture path checks for more consistent test runs.
  • Chores
    • Standardized line endings for a shared application page.

…nd the Linux-only box off Windows

Every OS:
- electron/updater.test.mjs: ensureCloudAccount's onState now also tells the
  included pages (#3266); the test's world gets the same stub as includedX.
- scripts/docker-image.test.ts: the Cloud home's tools layer installs a pinned
  pnpm (the bot box commit). Count it as a heavy layer beneath the app files,
  read every `rm -rf` of a step (apt's lists come first), and key the engines'
  install, not pnpm's, on ENGINES_CACHE_TAG.
- server/cloud-send-move.e2e.test.ts: a send of some items never carries chats,
  and Bring is gone (S4), so nothing put Kai's and Lux's lines on My Cloud
  before the strip. Use an older app's whole Send everything, which carried
  them, and say so.

Windows:
- server/bot-box/*: the box runs only on a Linux Cloud home (detect.ts:
  not-linux elsewhere). Its gates are unix sockets Windows refuses at a file
  path (EACCES) and its plan is bubblewrap argv over POSIX paths, so those
  suites skip on win32; "off" and the plain wrap tests still run there.
- server/workspace-backup.test.ts: on Windows the box folder holds only the
  filter (no unix socket), and is still checked to be left out.
- scripts/testing/cloud-send-fixture.ts: Windows' kill("SIGTERM") ends the team
  server without its shutdown, so the session registry stays open and every
  member's session is dropped as after a crash. Stop it over IPC there and
  run its own SIGTERM shutdown (as acp-shutdown.e2e does). Fixes all six
  cloud-team.e2e failures, which cascaded from the relaunch.
- .gitattributes: shared/app-frame/app-host.html is LF everywhere, so its
  hash line matches its body on a Windows checkout.
- published-pages, gen-app-fixtures: paths compared with the platform's
  separator; app-docs: the 0o600 check skips Windows like the other mode checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openmausbot-docs Ready Ready Preview Oct 22, 2026 1:12am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f4263d06-fbf6-4d27-9021-633cdda705ff
📥 Commits

Reviewing files that changed from the base of the PR and between f12d03f and 2700bc9.

📒 Files selected for processing: 2
  • scripts/testing/vitest-shard-weights.json
  • server/cloud-team.e2e.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The changes update Windows test handling, platform-aware path expectations, Team Cloud fixture shutdown, Docker image assertions, and Vitest shard weights. They also adjust cloud-send and prompt-path test expectations and add an LF checkout rule for app-host.html.

Changes: Cross-Platform Test and Harness Updates

Layer / File(s) Summary
Platform-specific test execution
server/app-docs.test.ts, server/bot-box/*test.ts, server/workspace-backup.test.ts
Tests that require POSIX features skip on Windows. The workspace backup test creates and closes its broker socket only on non-Windows platforms.
Platform-aware paths and expectations
.gitattributes, electron/updater.test.mjs, electron/shared-drives.node-test.mjs, scripts/gen-app-fixtures.test.ts, server/cloud-send-move.e2e.test.ts, server/cloud-team.e2e.test.ts, server/routes/published-pages.test.ts
Tests use platform-aware paths and roots. The updater mock includes an onState handler. The cloud-send test checks transferred chat messages, and the prompt-path test expects JSON-escaped workspace paths. .gitattributes sets LF checkout for app-host.html.
Team Cloud fixture shutdown
scripts/testing/cloud-send-fixture.ts
On Windows, the fixture starts the team process with IPC and sends a stop message during relaunch. It waits for exit when connected and uses SIGTERM when disconnected.
Docker and test-shard assertions
scripts/docker-image.test.ts, scripts/testing/vitest-shard-weights.json
Docker tests account for the additional Cloud home install, inspect cleanup operands across install commands, and check engine cache tagging on the engines install. The shard-weight map updates weights and test entries.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant CloudSendFixture
  participant TeamCloudProcess
  participant IPCConnection
  CloudSendFixture->>TeamCloudProcess: Start process with IPC enabled
  TeamCloudProcess->>IPCConnection: Register stop handler
  CloudSendFixture->>IPCConnection: Send stop message on relaunch
  CloudSendFixture->>TeamCloudProcess: Wait up to 10 seconds for exit
Loading

Suggested reviewers: claude

Merge Risk: ⚪ Minimal · up to 2700b

No concrete issue remains that would block merging these test and shard-weight updates after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 17 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the primary changes: restoring green CI by updating tests and excluding Linux-only box tests on Windows.
Description check Passed The description provides detailed change reasons, platform-specific context, shard updates, and verification results. It does not reproduce the template headings or checklist, but the required informa…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description provides detailed change reasons, platform-specific context, shard updates, and verification results. It does not reproduce the template headings or checklist, but the required information is mostly present and the changes are clearly documented.

Full details: Docstring Coverage

Explanation

Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 17 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

… is the home folder's drive

On Windows "/" is the current drive's root: on CI that is D:\ (the checkout),
a separate data drive from the home folder's C:\, which may be shared whole by
design (#3254). The test now names the root of the drive the home folder is on,
which is "/" on macOS and Linux, and C:\ for the test's home on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… as the prompt quotes it

- scripts/testing/vitest-shard-weights.json: refreshed from the Windows logs of
  runs 39684923366 and 39684885971 (update-shard-weights.mjs). Last refreshed
  Oct 12, it missed one-home (215 s), routine-recovery (168 s),
  cloud-computer-auto-sleep (106 s) and 140 more e2e files; all of them landed
  in shard 4, whose Linux job ran into its 30-minute cap and was cancelled on
  main (39684885971, 39687280672). With these weights, the Linux test seconds
  per shard come to 1133/1085/1090/1159, where they were 942/958/1000/1566.
- server/cloud-team.e2e.test.ts: the prompt names a memory file the way
  workspace.ts quotes it (JSON.stringify), so on Windows its backslashes come
  doubled; the test looks for the quoted path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 2700bc9e Deployed Oct 22, 2026 by vercel[bot]
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