Skip to content

feat(bot-computers): switch to Linux-only Bot computers and remove macOS VMs (F4) - #945

Open
sambitcreate wants to merge 39 commits into
pr/f2-linux-setup-settingsfrom
pr/f4-remove-macos-computers
Open

sambitcreate wants to merge 39 commits into
pr/f2-linux-setup-settingsfrom
pr/f4-remove-macos-computers

Conversation

@sambitcreate

Copy link
Copy Markdown
Owner

Summary

  • Makes Debian 13 + XFCE Linux VMs the sole Bot computers path, removes the AIDEN_BOT_COMPUTERS_LINUX feature flag and macOS VM provisioning/TCC permission UI (bot-computer-base-screen.tsx), and adds one-time first-launch cleanup of Aiden's legacy macOS VMs/IPSWs (never touching other Lume/Cua VMs) with per-Bot migration notes and a dismissible Settings notice showing freed disk space.
  • Fails closed on unmigrated macOS state before reconcile() completes, serializes the migration pass under inTurn(undefined, ...), and preserves partial macosMigration state if interrupted before completedAt.
  • Updates macOS signing (package.json mac.signIgnore, scripts/sign-macos.mjs, scripts/verify-macos-package.mjs) to ignore and pre/post-verify the packaged Linux arm64 guest cua-driver ELF (size, ELF64-aarch64 header, SHA-256).
  • Updates AGENTS.md, README.md, PRODUCT.md, docs/bot-computers.md, docs/plans/README.md, onboarding copy, and adds release notes in docs/release-notes/v0.71.0.md (keeping shipped v0.70.0.md untouched).
  • Plan reference: docs/plans/linux-desktop-bots-plan.md (PR 7 / F4).

Stack

Verification

  • npm run test:bot-computers: 276+46 pass
  • npm run test:bot-sign-in: 20/20 pass
  • node --test scripts/sign-macos.test.mjs scripts/verify-macos-package.test.mjs scripts/ci-test-registry.test.mjs: 56/56 pass
  • npm run type-check: 0 errors
  • npm run check:aiden-rules: pass (102 allowlist entries, 4 inline allowances)
  • eslint on all modified/added .ts/.tsx/.mjs files: 0 issues
  • Live Mac Studio (SambitscStudio2): full Linux-only setup, loopback SSH-tunneled VNC, Chromium AT-SPI (52 live elements), and removeEverything() verified live.
  • Adversarial audit: 0 remaining P0/P1/P2 findings.

Remaining checks

  • Hosted GitHub Actions CI run on this PR head.
  • Interactive light/dark Settings & migration-notice screenshots and signed npm run package:verify on owner Mac.

… Chromium sign-in behind AIDEN_BOT_COMPUTERS_LINUX
- Remove macOS Bot computer creation, restore image pins/downloads, TCC
  permission step/base viewer, Safari sign-in path, and Linux feature
  flags (linux-feature-flag.ts, linux-guest-flag.ts,
  bot-computer-base-screen.tsx); make Debian 13 + XFCE Linux the sole
  Bot computer path with macOS 14+ host requirement.
- Incorporate Linux provisioning fixes (drop deb822 debian.sources before
  writing pinned snapshot.debian.org sources.list, start LightDM before
  installing guest cua-driver, count runningCount() in
  currentMaxRunningLimit()) and wire verified vendored Linux arm64
  cua-driver resolution.
- Add one-time first-launch macOS cleanup migration: stop and delete
  only Aiden macOS VMs and .ipsw/.ipsw.part caches, clear legacy
  credentials, preserve Bot computer records for automatic Linux
  re-cloning after Set up, append one-time migration note to each Bot's
  MEMORY.md, and show a dismissible Settings notice.
- Update Settings, Bot Computer section, onboarding bento tile and
  code-drawn Linux XFCE illustration, packaged acceptance scripts,
  docs, AGENTS.md, .memory/bot-computers.md, and add
  docs/release-notes/v0.70.0.md warning about automatic macOS removal.
…recover staging base, remove dead linux-base helper
…ning, pass AT-SPI env to Chromium, drop unused lume cp
…4-remove-macos-computers; move release notes to v0.71.0

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

The one-time migration can permanently skip two required side effects after transient failures, so these should be made retryable before merge.

Reviewed changes I reviewed the complete Linux-only Bot-computer transition, including migration, provisioning, runtime, renderer, packaging, documentation, and test changes.

  • Linux guest stack — Debian/XFCE provisioning, isolated shell execution, tunneled VNC, the pinned guest driver, AT-SPI controls, setup/update recovery, and VM resource limits replace the macOS guest path.
  • One-time migration — Startup removes Aiden-owned macOS VMs and IPSWs, preserves Bot assignments, resets setup, clears credentials, writes Bot-memory notes, and reports reclaimed storage.
  • Product and distribution surfaces — Settings, onboarding, IPC contracts, analytics, signing verification, release documentation, and focused test suites are updated for Linux-only behavior.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏

Comment thread main/services/bot-computers/host.ts Resolved
Comment thread main/services/bot-computers/host.ts Outdated
});
for (const botId of migratedBotIds) {
stale.delete(botId);
await Promise.resolve(deps.onMacosComputerMigrated?.(botId, BOT_COMPUTER_LINUX_MIGRATION_BOT_NOTE)).catch(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The migration record and each Bot's migratedFromMacos flag are persisted before this callback runs. Because rejection is swallowed here, a transient Bot-memory failure permanently loses the promised note; every later reconcile bypasses delivery. Track note delivery separately so failed writes retry without duplicating successful notes.

Technical details
# Bot migration note is not retryable

## Affected sites
- main/services/bot-computers/host.ts:1770 — migration state is persisted before note delivery
- main/services/bot-computers/host.ts:1798 — delivery failure is logged and ignored
- main/services/bot-computers/bot-computers-main.ts:102 — the production callback writes through `botMemory.apply`

## Required outcome
- A transient Bot-memory failure must retry on a later reconciliation.
- Bots whose note succeeded must not receive duplicates.

## Suggested approach
- Persist pending/delivered note state independently of `migratedFromMacos`, and clear it only after the callback succeeds.
- Add a behavioral test whose callback rejects once and succeeds on the next reconcile.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No new issues found in the CI map correction. Approval remains pending on the two open migration threads from the prior review.

Reviewed changes I reviewed the E2E source-map correction added since the prior Pullfrog review.

  • Corrected Bot settings coverage — Changed the bot-computer-tab.spec.ts mapping to the plural renderer/components/settings/bot-computers prefix so edits to the current settings files select that E2E spec.
  • Validated selection behavior — Confirmed the corrected prefix selects bot-computer-tab.spec.ts for bot-computers-settings.tsx, and the focused 15-test CI mapping suite passes.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | Fix it ➔ | View workflow run | Using GPT Sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

The new tunnel recovery still has a startup race that can publish a dead screen endpoint; this should be fixed before merge.

Reviewed changes I reviewed the migration retry work, tunnel and shared-folder recovery, AT-SPI editability propagation, driver refusal handling, stacked provisioning updates, and test-registration cleanup added since the prior Pullfrog review.

  • Retried migration side effects — Persisted failed legacy-secret cleanup and per-Bot memory-note delivery so later reconciliation can retry them independently.
  • Hardened Linux runtime recovery — Added guest-writable VirtioFS round-trip checks, SSH tunnel exit handling, and retry/readiness changes from the merged Linux setup stack.
  • Refined element safety facts — Propagated explicit editability from driver booleans and AT-SPI states so ambiguous text and entry roles classify erase keys correctly.
  • Preserved driver recovery guidance — Retained bounded cua-driver 0.38 top-level hints for isError refusals and registered the new element parser test in CI.
  • Cleaned Linux-only fixtures — Removed the obsolete guestOs property from the Bot computer tool test.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏

Comment thread main/services/bot-computers/host.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

The new AT-SPI editability inference can let Backspace/Delete in a read-only field bypass destructive-action classification and should be corrected before merge.

Reviewed changes I reviewed the tunnel-race fix, cua-driver 0.38 element-fact changes, refusal-hint bounding, and stacked branch integrations added since the prior Pullfrog review.

  • Closed the tunnel startup race — Rechecked tunnel exit after the awaited exposure probe and added a targeted teardown-and-retry test for that startup window.
  • Aligned element facts with cua-driver 0.38 — Replaced synthetic editable and states handling with derivation from the fields emitted by the pinned Linux driver while keeping field values out of Bot facts.
  • Preserved recovery guidance — Bounded refusal detail construction so a top-level cua-driver hint survives the later 1,000-character error cap.
  • Integrated stacked updates — Merged the current Linux setup and driver-tool stack heads into the Linux-only cutover branch.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No new issues found in this delta. Approval remains pending on the open migration-note soft-failure thread.

Reviewed changes I reviewed the fail-closed editability correction and its parser and end-to-end approval coverage added since the prior Pullfrog review.

  • Failed closed on ambiguous editability — Stopped inferring editable: true from cua-driver 0.38.0 text/entry roles or captured values while preserving explicit driver booleans and excluding values from Bot facts.
  • Covered destructive-key classification — Added parser and end-to-end tests proving ambiguous read-only text/entry controls keep Backspace/Delete on the destructive press path while password fields retain credential behavior.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | Fix it ➔ | View workflow run | Using GPT Sol | 𝕏

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant