Skip to content

[vm-tools] Add a VM startup script loader - #4725

Open
gwdp wants to merge 9 commits into
mainfrom
gwdp/vm-tools-startup-20261022
Open

gwdp wants to merge 9 commits into
mainfrom
gwdp/vm-tools-startup-20261022

Conversation

@gwdp

@gwdp gwdp commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Why

Give macOS VM images a small, reusable way to run startup scripts.

How

Add @expo/vm-tools. Its installer writes a per-user launchd agent and a standalone runner. At login, including automatic login when Tart runs with --no-graphics, the agent waits for /usr/local/share/vm-tools/startup.sh and runs it with Bash once per boot. Installation itself does not run the script.

The script owns its environment, processes and cleanup. The runner waits for it, returns its exit status and does not retry failed runs. Output goes to ~/Library/Logs/vm-tools.log.

Test Plan

Eight package tests, typecheck, lint and formatting pass. Recent local VM trials exercised startup with this version; hosted worker validation is separate.

LLM authorship

Codex and Claude Code wrote and revised the code and tests through multiple planning and review rounds with Gabe. We considered different startup arrangements, then kept vm-tools focused on loading the script and left service ownership to the script. Gabe directed the changes and reviewed the implementation and wording.

— Codex

@gwdp
gwdp force-pushed the gwdp/vm-tools-startup-20261022 branch from f54aedf to c93982b Compare October 22, 2026 23:59
@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.20290% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.62%. Comparing base (82845de) to head (2aea4e4).

Files with missing lines Patch % Lines
packages/vm-tools/src/commands/daemon.ts 91.84% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4725      +/-   ##
==========================================
+ Coverage   75.59%   75.62%   +0.03%     
==========================================
  Files        1055     1058       +3     
  Lines       52469    52538      +69     
  Branches    11471    11478       +7     
==========================================
+ Hits        39660    39725      +65     
- Misses      11829    11833       +4     
  Partials      980      980              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gwdp
gwdp force-pushed the gwdp/vm-tools-startup-20261022 branch from c93982b to b2965e5 Compare October 23, 2026 06:42
@gwdp
gwdp added this pull request to stack #4726 October 23, 2026 06:59
@gwdp
gwdp force-pushed the gwdp/vm-tools-startup-20261022 branch 2 times, most recently from 3a27130 to 4d04c31 Compare October 24, 2026 04:01
@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

devin-ai-integration[bot]

This comment was marked as outdated.

@gwdp
gwdp force-pushed the gwdp/vm-tools-startup-20261022 branch from 4d04c31 to b3b3f72 Compare October 24, 2026 07:47
@gwdp gwdp changed the title [vm-tools] Run guest startup scripts [vm-tools] Run the VM startup script once per boot Oct 26, 2026
@gwdp
gwdp removed this pull request from stack #4726 October 26, 2026 05:41
@gwdp
gwdp added this pull request to stack #4753 October 26, 2026 05:42
gwdp and others added 3 commits October 26, 2026 00:18
Edited-by: Codex

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gwdp
gwdp force-pushed the gwdp/vm-tools-startup-20261022 branch from d616274 to 76ccc7d Compare October 26, 2026 07:19
@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

@gwdp gwdp added the needs review Issue is ready to be reviewed by a maintainer label Oct 26, 2026
No source changes. Refresh the pull-request event after its old base SHA
was compared with a newer GitHub merge checkout.
@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

Do not include main-only changelogs from GitHub merge checkouts when the
stack reports an older base SHA. Keep all existing validation rules.
@gwdp gwdp changed the title [vm-tools] Run the VM startup script once per boot [vm-tools] Add a VM startup script loader Oct 26, 2026
@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

@gwdp
gwdp marked this pull request as ready for review October 27, 2026 00:19
@gwdp
gwdp requested a review from szdziedzic October 27, 2026 00:19
Restore the unchanged changelog workflow as requested.
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding a changeset!

@gwdp
gwdp removed this pull request from stack #4753 October 27, 2026 01:35
@gwdp
gwdp added this pull request to stack #4765 October 27, 2026 01:36
@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

@gwdp
gwdp removed this pull request from stack #4765 October 27, 2026 06:32
@gwdp
gwdp added this pull request to stack #4767 October 27, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review Issue is ready to be reviewed by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants