Repository navigation
Name each use of a Boat VM with the SDK's guards; one rest cause (C3) - #1339
Conversation
Workspaces drops its own count and lock maps for workspace_sdk::Uses, keyed by conversation id. An opening takes the first use under the VM's turn; a served connection and a background command extend it, so a rest waits for the last one and logs who still holds the VM. RestCause moves to the conversation domain and replaces WorkspaceRest. Part of #1287. The lease-side half waits for the next worker image (#1290). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcBpmR4KqePxnFf8j2359i
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcBpmR4KqePxnFf8j2359i
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcBpmR4KqePxnFf8j2359i
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d3b9b11ce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcBpmR4KqePxnFf8j2359i
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcBpmR4KqePxnFf8j2359i
|
The only red job, "Windows server library tests (server-other)", failed on one test: Generated by Claude Code |
|
The re-run of "Windows server library tests (server-other)" failed again, on four different tests this time. All four are I don't think this PR causes these:
My read is that a different wall-clock test times out on each run when this Windows shard is under load, and that it's inherited from main. The proper fix is to make those tests wait on the state they check instead of a fixed timeout. That's outside this PR, so I've left it out. Generated by Claude Code |
<!-- claude-projects-attribution: {"github_login":"Varuas37"} -->
_Requested by **Saurav** · [project
thread](https://claude.ai/code/project/chan_01UZaufydjNk2K88KGgoAfmr?thread=cmsg_01UZaufydjNk2K88KGgoAfmrX5YyyUXBGeQoMRRr3igVbS)_
**Before:** Of the 11 changes merged to main in the last day, two fixes
had no check in CI. A sidebar row losing its hover fill under its
actions (#1337), or onboarding asking for the vault passphrase (#1340),
could come back unnoticed.
**After:** The conversation stress suite (run by every PR's CI) fails if
either comes back. 2 gaps closed, no issues opened.
## Background
The daily test-gap run reviews what merged to main in the last 26 hours.
For each fix it puts the bug back and checks that a test CI runs fails.
A fix only a local script checks counts as a gap.
## The problem
- **#1337 (row hover).** When the pointer moved from a sidebar row onto
its trailing action (a channel's settings), the row lost its highlight.
Only `shared-controls.mjs --only rows` checked this, and no CI job runs
that script.
- **#1340 (onboarding vault).** The setup window opened the vault's
unlock dialog on its own. The stress `onboarding` step already refused a
vault dialog, but it ran over an unlocked vault. There the old code drew
no dialog either, so the step passed with the bug put back.
## The solution
All in `verification/desktop/scripts/conversation-stress.mjs`:
1. **`channel` step.** Once two channels exist, it finds the channel row
that is not selected (its rest and hover fills differ). It points at the
row, then at its settings beside it, and requires the same hover fill
both times.
2. **`onboarding` step.** It locks the vault through its native session,
as after a restart. Then it opens the setup window, which already
refuses any vault dialog. It unlocks the vault again afterwards.
## How we checked it
| Entry | Bug | What holds it now |
| --- | --- | --- |
| #1353 | A VM creation whose answer was lost never finished | Existing:
2 allocation tests fail with it put back |
| #1351 | A voice call ended when its chat left the panes | Existing: 2
VoiceController V16 tests fail with it put back |
| #1337 | Row hover dropped under its trailing actions | **New**
channel-step check: fails with the CSS put back (`rgba(0, 0, 0, 0), not
oklab(0.985 0 0 / 0.05)`), holds on main |
| #1340 | Onboarding asked for the passphrase | **New** locked vault in
the onboarding step: fails with the fix put back ("the setup window
opened a vault dialog on its own"), holds on main |
| #1350 #1346 #1339 #1332 | Features, copy, and SDK guard naming | Not
fixes |
| #1341 #1338 #1336 #1334 | Crate moves and refactors | Not fixes |
- Stress `--only onboarding,passphrase,channel,stop` in Chromium held
9/9 on this branch. `verification/desktop/scripts/lib/*.test.mjs` passed
698 tests. eslint and prettier are clean.
- Not run: WebKit (it cannot be downloaded in the cloud sandbox).
## Tradeoffs and follow-ups
- The hover check needs an unselected channel row. In the `stop` step
only one channel exists, and it is selected, so the check runs in the
`channel` step.
- The onboarding step briefly locks the shared vault. It unlocks it
again in a `finally`, so later steps see it unlocked.
## Rollout
Nothing special. Test-only change.
---
_Generated by [Claude
Code](https://claude.ai/code/session_018rccRX3nxAcKBWu6gcEXWB)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
Before: When a cloud VM was kept awake past its idle time, nothing said why. Nessa counted the VM's uses itself, with a count map and a lock map.
After: Every use of a VM has a name (opening, connection, background command). A refused rest logs who still holds the VM. The counting lives in workspace-sdk, the same code its own
Machinesuses.Part of #1287. Depends on nessalabs/workspace-sdk#15: this pins the SDK to that branch's head, and the pin moves to the squash commit once it merges.
Background
Nessa runs each conversation's Boat VM itself (
Workspaces). It rests a VM once nothing has used it for the idle time. Opening and resting must not overlap, or a rest could stop a VM that an opening is about to hand out.The problem
Workspacesdid this bookkeeping by hand: a count map, a lock map, and the rule that a count only goes up under the lock. Nothing checked that rule. When a VM stayed awake, a count of 1 said nothing about who held it. Nessa and the SDK also had two names for the same set of rest causes (WorkspaceRestandRestCause).The solution
sequenceDiagram participant O as Opening participant U as Uses (SDK) participant R as Rest pass O->>U: take the VM's turn O->>U: hold "opening" O-->>U: serve adds "connection", background adds "background command" R->>U: take the VM's turn alt something still holds it R->>R: log the names, keep the VM awake else idle long enough R->>R: stop the VM, then say it rested endWorkspaceskeeps oneworkspace_sdk::Uses<String>, keyed by conversation id. An opening holds"opening"under the turn. A served connection and a background command extend that use, so the VM cannot rest while either is alive.turn.rested().RestCauselives in the conversation domain and replacesWorkspaceRest.rest_cause(LeaseEndCause)maps a lease end to it in one place.How we checked it
cargo clippy -p nessa-server --all-targets -D warningsandcargo fmt --checkare clean.nessa-serverlib tests: 3,589 passed and 3 failed. The 3 failures (native_hooksa_failed_revert…, a_recorded_change_whose_marker…, andcodexstatus_cleanup_removes_descendants…) also fail on main in the cloud sandbox, which runs as root. This PR does not touch that code.pnpm test:e2e:stress --only vmBackground: 5/5 held.Tradeoffs and follow-ups
unowned, the link count, thelet_gopolling loops and the count-based cache eviction) stays as it is. Those files are part of the lease protocol fingerprint, so changing them needs a new worker image. Saurav chose to wait for the next image, and the work is listed on Show why a cloud VM refused, not "environment unreachable" #1290.Rollout
Nothing special. Merge workspace-sdk#15 first, then move this PR's SDK pin to its squash commit.
Generated by Claude Code