Skip to content

fix(server): Windows Antigravity install no longer rolls back after validation passes - #32462

Open
juliusmarminge wants to merge 11 commits into
mainfrom
fix/issue-32457
Open

juliusmarminge wants to merge 11 commits into
mainfrom
fix/issue-32457

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Problem

On Windows, installing the managed Antigravity runtime rolls back even though validation succeeds. The UI then reports "Could not finish the Antigravity installation". The trace shows AntigravityInstallation.validate succeeding and then AntigravityInstallation.install failing with PlatformError: Unknown: ChildProcess.kill (...agy_acp_server.exe) / Failed to kill child process.

The Windows branch of validate adds a finalizer that kills the validation runtime's process tree, piped through Effect.orDie. When that finalizer runs, the runtime is exiting or has already exited. Effect's Node spawner runs taskkill unless Node has already recorded the exit. If taskkill fails because the process has gone, the spawner falls back to childProcess.kill(), which also fails for a process that has exited. orDie turns this best-effort cleanup failure into a defect, and the defect fails the whole install.

Change

The finalizer now pipes the kill through Effect.ignore instead of Effect.orDie. The kill still runs before ACP closes its pipes, but a failed kill no longer fails a validated install. Other best-effort child.kill() calls in the server, and Effect's own scope release of the same child, already ignore errors this way. Validation failures, defects and interruption still propagate. A process that really is still holding files is still caught later, when the profile directory is removed or the staging directory is renamed.

Scope and approval

Fixes #32457

Verification

  • New test in apps/server/src/provider/AntigravityInstallation.test.ts, installs on Windows when the validation process exits before it is killed. It runs the real default validate with platform: "win32" and a real Node child that answers ACP initialize and exits. Its kill waits for the child to exit, then calls the real Node kill.

    • Without the fix (line 431 back to Effect.orDie, on main at d313b2a): it fails. The install ends with phase: "failed" and installedVersion: null, and the finalizer's kill fails with PlatformError: Unknown: ChildProcess.kill (…) (cause: Error: Failed to kill child process). Two independent reviews reproduced the failure.
    • With this change at b8bb93b: the whole file passes, 30 of 30 tests (log). Re-run after merging main at ebb02a9: 30 of 30; the two changed files are byte-identical to b8bb93b.
  • vp run check:changed passes: format, lint, typecheck and the tests next to the change.

  • Runtime transcript from Linux with the real @effect/platform-node spawner (effect 4.1.2): killing a child that has already exited fails with the same error as the report (log).

    $ node kill-already-exited-child.ts
    child exited with 0 pid 4084368
    kill after exit: Cause([Fail(PlatformError: Unknown: ChildProcess.kill (node -e 'process.exit(0)') (cause: Error: Failed to kill child process))])
    
    Driver script (not committed)
    import { Effect, Exit } from "effect";
    import * as ChildProcess from "effect/process/ChildProcess";
    import * as ChildProcessSpawner from "effect/process/ChildProcessSpawner";
    import * as NodeServices from "@effect/platform-node/NodeServices";
    
    const program = Effect.scoped(
      Effect.gen(function* () {
        const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
        const child = yield* spawner.spawn(ChildProcess.make("node", ["-e", "process.exit(0)"]));
        const code = yield* child.exitCode;
        console.log("child exited with", code, "pid", child.pid);
        const exit = yield* Effect.exit(child.kill({ forceKillAfter: "1 second" }));
        console.log("kill after exit:", Exit.isSuccess(exit) ? "success" : String(exit.cause));
      }),
    );
    Effect.runPromise(program.pipe(Effect.provide(NodeServices.layer)));
  • This changes nothing on screen. The proof audit's fixture matrix finds no render path that changes: the install reaches the existing success state where it used to fail. So there are no captures.

  • cannot-verify windows: the path through native taskkill, the PyInstaller process tree and NTFS was not run on Windows. The test runs the Windows branch on Linux with a real Node child.

Verification log
  • Review round 1 (two independent reviewers): both MERGE, no findings. Notes taken: the Problem wording now describes the taskkill race.
  • Review round 2 at ebb02a9 (after merging main, two fresh independent reviewers): both MERGE, no findings. One reviewer reproduced the failure on main in a separate worktree (phase: "failed", installedVersion: null) and saw the new test pass 8 of 8 isolated reruns.
  • Proof audit pass 1 at ebb02a9: sufficient; minimum capture set is empty, no rows to add.
  • Tests: 30/30 in AntigravityInstallation.test.ts at ebb02a9; vp run check:changed passes.
  • Unverified surfaces: windows.

AI-assisted; verified with the tests and tools listed above.

juliusmarminge and others added 3 commits November 7, 2026 12:05
… validation cleanup

On Windows the default runtime validation kills the ACP process in a scope
finalizer. When that process has already exited, the kill fails and
Effect.orDie turns the best-effort cleanup into a defect, so the install
reports failed. This test drives the win32 branch with a real Node child
that exits after answering initialize.

AI-assisted; verified with the tests and tools listed above.

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

When the Antigravity validation runtime had already exited, the Windows
finalizer's best-effort kill failed and Effect.orDie turned that into a
defect that rolled back an install whose validation had passed. Ignore
the kill failure, matching other best-effort child kills in the server.

Fixes #32457

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 7, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Nov 7, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — The specified comparison adds a default-enabled sleep inhibitor and disables Android release lint tasks, beyond the Windows installation cleanup fix. Human review is required for the changed power-management default and reduced production-build diagnostics.

Notes:

  • All code in this push has already been reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 10.5 KiB 10.5 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 10.6 KiB 10.6 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.2 KiB 384.2 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: 296f913 · PR result: f8ed08a · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Windows Antigravity validation finalizer now ignores child-process kill errors. A Windows installation test verifies that installation succeeds after the validation process exits and records version fixture-new.

Changes: Windows installation validation

Layer / File(s) Summary
Validation cleanup and installation test
apps/server/src/provider/AntigravityInstallation.ts, apps/server/src/provider/AntigravityInstallation.test.ts
The Windows validation finalizer ignores errors from child.kill. The test checks that installation succeeds and records version fixture-new after the validation process exits.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related PRs

  • pingdotgg/t3code#29279: Both PRs change Windows validation cleanup. This PR changes whether kill errors fail installation; #29279 adds retry handling for the publish rename and cleanup.

Suggested reviewers: aledog007, stienswout

Merge Risk: Minimal · up to f8ed0

This change prevents a failed cleanup kill of an already-exited validation process from failing a Windows Antigravity installation that otherwise validated successfully. The change is small and has test coverage. Native Windows behavior was not tested, but no concrete merge-blocking risk is evident.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the Windows Antigravity install no longer rolls back after validation passes. It matches the finalizer change from Effect.orDie to Effect.ignore that stops a failed be…
Description check Passed The description follows the template well. It has Problem, Change, Scope and Verification sections. The Problem and Change sections clearly explain the Windows taskkill race, the Effect.orDie defect, …
Linked Issues check Passed [#32457] The whole-PR summary at reviewed head f8ed08a states that the Windows validation finalizer in apps/server/src/provider/AntigravityInstallation.ts now ignores …
Out of Scope Changes check Passed [#32457] The whole-PR summary lists two changed files: the one-line finalizer change in AntigravityInstallation.ts and a regression test in AntigravityInstallation.test.ts. The test directly exercises…
Full details: Title check

Explanation

The title names the main change: the Windows Antigravity install no longer rolls back after validation passes. It matches the finalizer change from Effect.orDie to Effect.ignore that stops a failed best-effort kill from failing a validated install. The title uses the conventional commit format and is specific. It is 85 characters, which is longer than ideal but still readable.

Full details: Description check

Explanation

The description follows the template well. It has Problem, Change, Scope and Verification sections. The Problem and Change sections clearly explain the Windows taskkill race, the Effect.orDie defect, and the Effect.ignore fix. Scope links issue #32457 and says it fixes a bug. Verification names a focused new test, the before and after results, the 30/30 test run, and a runtime transcript on Linux. It states what was not verified (native Windows taskkill, process tree, NTFS). The description also includes an AI-assisted note. It does not name the model and harness used, which the template asks for when an agent was used. The description is long and includes some extra review-log detail, but the required information is present.

Full details: Linked Issues check

Explanation

[#32457] The whole-PR summary at reviewed head f8ed08a states that the Windows validation finalizer in apps/server/src/provider/AntigravityInstallation.ts now ignores errors from the forced kill instead of converting them to defects with Effect.orDie (+1/-1). The issue requires a validated runtime to be published and activated when the already-exited validation process cannot be killed. The change removes the defect path that failed the install. A regression test in AntigravityInstallation.test.ts runs default validate with platform win32 and an exited Node child, then asserts that installation succeeds with version fixture-new. Limits: direct reads of the changed blobs were unavailable, so the exact changed lines at head were not read; the result relies on the whole-PR summary. Native Windows taskkill, process-tree, and NTFS behavior were not tested; the Windows branch ran on Linux. Incremental changes since fc3290f were not separately read.

Full details: Out of Scope Changes check

Explanation

[#32457] The whole-PR summary lists two changed files: the one-line finalizer change in AntigravityInstallation.ts and a regression test in AntigravityInstallation.test.ts. The test directly exercises the changed finalizer path, so it supports the objective. No unrelated changes appear in the summary. The direct diff could not be read, so this verdict relies on the summary; the PR description reports no other files changed.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between fc3290f and f8ed08a.

Files selected for processing: 2

  • apps/server/src/provider/AntigravityInstallation.test.ts
  • apps/server/src/provider/AntigravityInstallation.ts

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

@juliusmarminge juliusmarminge added bugfix Fix PR opened by an issue lead; enters the PR loop pr:gate-failed A land gate failed labels Nov 7, 2026
Wladefant

This comment was marked as spam.

@t3dotgg
t3dotgg dismissed Wladefant’s stale review November 8, 2026 23:30

Dismissed: unsolicited automated review from a blocked account.

@juliusmarminge juliusmarminge added pr:in-progress A lead is working on this PR and removed pr:gate-failed A land gate failed labels Nov 10, 2026
@macroscopeapp
macroscopeapp Bot dismissed their stale review November 10, 2026 14:57

Dismissing prior approval to re-evaluate b8bb93b

@juliusmarminge juliusmarminge added pr:gate-failed A land gate failed pr:in-progress A lead is working on this PR and removed pr:in-progress A lead is working on this PR pr:gate-failed A land gate failed labels Nov 10, 2026
@juliusmarminge juliusmarminge added pr:gate-failed A land gate failed and removed pr:in-progress A lead is working on this PR labels Nov 10, 2026

Copy link
Copy Markdown
Member Author

The automated pipeline stopped on this pull request and will not merge it:

someone else pushed to fix/issue-32457 (head is now fc3290f); the pipeline does not build on commits it did not review

It stays open for a person to finish or close.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 13, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge

Copy link
Copy Markdown
Member Author

The automated pipeline stopped on this pull request and will not merge it:

CI did not finish in two and a half hours

It stays open for a person to finish or close.

@juliusmarminge juliusmarminge added takeover:blocked Takeover blocked; reason in the PR body and removed takeover:in-progress A takeover lead is working on this PR labels Nov 14, 2026
@juliusmarminge juliusmarminge added takeover:in-progress A takeover lead is working on this PR and removed takeover:blocked Takeover blocked; reason in the PR body labels Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge

Copy link
Copy Markdown
Member Author

The automated pipeline stopped on this pull request and will not merge it:

the capture step could not show the problem on the base commit, so there is nothing to prove fixed.

On each commit, pair Chromium, open Settings → Providers → Antigravity, confirm no custom binary path and runtime not installed, enable Antigravity, click Install Antigravity, and wait through download and validation. Both installed runtime 1.5.13 and displayed Installed. The reported cleanup error was not observed. The base recording was repeated from another fresh T3 home after correcting the driver's terminal-state wait.

It stays open for a person to finish or close.

@juliusmarminge juliusmarminge added takeover:blocked Takeover blocked; reason in the PR body and removed takeover:in-progress A takeover lead is working on this PR labels Nov 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix PR opened by an issue lead; enters the PR loop pr:gate-failed A land gate failed size:XS 0-9 changed lines (additions + deletions). takeover:blocked Takeover blocked; reason in the PR body vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Windows: Antigravity install rolls back after successful validation because killing the already-exited validation process fails

2 participants