Skip to content

justfile: harden macOS bring-up, fold up into dm1 - #722

Merged
norrietaylor merged 4 commits into
mainfrom
fix/just-mac-bringup
Jul 13, 2026
Merged

justfile: harden macOS bring-up, fold up into dm1#722
norrietaylor merged 4 commits into
mainfrom
fix/just-mac-bringup

Conversation

@norrietaylor

@norrietaylor norrietaylor commented Jul 11, 2026

Copy link
Copy Markdown
Member

small justfile fixes, found while bringing this stack up on macOS and linux after the CI improvements went through

norrietaylor and others added 2 commits July 10, 2026 20:57
`just artifacts` runs `minimal materialize` through the shim, which
executes in a VM and syncs outputs back over an overlay. On a cold cache
that sync can transiently drop the output file, failing the very first
`just dm1` with:

  copying output file I/O error at path …/usr/share/virtio-linux/Image:
  No such file or directory (os error 2)

Re-running succeeds. Wrap the two macOS materialize calls in a small
retry helper (up to 3 attempts, clearing the partial output between
tries) so bring-up survives the flake instead of aborting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E6SWKgFLoRffVAUrkAWtz6
`dm1` was a macOS gate that just called `just up`, and `up` was the
shared bring-up body. Since `up`'s only caller was `dm1` and `dm3` has
its own body, inline `up` into `dm1` and drop the `up` recipe. `dm1` is
already macOS-gated, so the inlined body sheds the Linux `LD_LIBRARY_PATH`
branch. Build steps are invoked in the recipe body (not as recipe deps)
to preserve the clean Linux SKIP. Comments referencing `just up` now
point at `dm1`/`dm3`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E6SWKgFLoRffVAUrkAWtz6
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ba1c7faf-5b5b-4cb4-83ed-3766e88af5ba

📥 Commits

Reviewing files that changed from the base of the PR and between 60df88f and b0fc196.

📒 Files selected for processing (1)
  • justfile
📝 Walkthrough

Walkthrough

The justfile now retries macOS artifact materialization, explicitly builds and configures the DM1 stack, and changes DM3 VM startup to use a configurable readiness timeout without socket symlink bridging.

Changes

DM1 and DM3 bring-up workflows

Layer / File(s) Summary
Resilient artifact materialization
justfile
The macOS materialization path retries failed output copies, removes partial output, and waits between attempts.
Explicit DM1 bring-up
justfile
DM1 now runs its build chain, exports MINVMD_* variables and PATH, and invokes minimal ls; related workflow comments are updated.
Direct DM3 socket coordination
justfile
DM3 sets MINVMD_READY_TIMEOUT_SECS, boots the VM, removes socket symlink setup, and updates status messaging.

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

Sequence Diagram(s)

sequenceDiagram
  participant Justfile
  participant Artifacts
  participant Minvmd
  participant Minimal
  Justfile->>Artifacts: build required artifacts and dependencies
  Justfile->>Minvmd: export MINVMD configuration
  Justfile->>Minimal: invoke minimal ls
  Minimal->>Minvmd: use configured VM integration
Loading

Possibly related PRs

  • gominimal/minimal#691: Adds just env wiring for the MINVMD_* variables and PATH used by these bring-up flows.

Suggested reviewers: bryan-minimal, twitchyliquid64

Poem

I’m a rabbit with a justfile to tune,
Building bright stacks beneath sun and moon.
Retries mend artifacts when copies go astray,
DM1 boots clearly, DM3 finds its way.
No socket links to trip in the night—
MINVMD hops onward, ready and right.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main changes: macOS bring-up hardening and inlining the up workflow into dm1.

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

norrietaylor and others added 2 commits July 11, 2026 01:22
`just dm3` bridged the CLI socket with `ln -sf <runtime>/minimal/
minimald.sock <state>/providers/local-0/ssh.sock`. Since the socket/path
coordination fix (#690) minvmd binds that <state> ssh.sock DIRECTLY, so
the symlink clobbers minvmd's own live socket with a link to a stale
runtime path — every `minimal` dial then falls through to a native
autospawn that exits 1, failing the recipe on an otherwise-healthy VM.

Drop the symlink block (minvmd's direct bind is already the exact path
the CLI dials) and raise MINVMD_READY_TIMEOUT_SECS to 150 (overridable):
the generic guest kernel can spend 40-50s probing hardware before pid-1
(minimald) starts, overrunning minvmd's 60s READY default on a cold boot.

Validated by the equivalent manual bring-up: `minvmd run --detach`
without the symlink, then `minimal ls` reaches the VM on the first try.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JTLRizuWQ3GuZmBBv27Nt7
@norrietaylor
norrietaylor merged commit ed6df12 into main Jul 13, 2026
28 checks passed
@norrietaylor
norrietaylor deleted the fix/just-mac-bringup branch July 13, 2026 19:38
norrietaylor added a commit that referenced this pull request Jul 14, 2026
Resolve the conflicts from the commits that landed on main since this
branch's merge-base (#721, #732, #734, #735, #722), keeping main's
content and re-applying the `min` binary-target rename on top.

- justfile: main folded `up` into `dm1` (#722), so the branch's older
  `up` recipe is dropped rather than resurrected. Main's `dm1` invoked
  the `{{minimal}}` variable this branch renames, which would have left
  `just` unable to resolve it; it now invokes `{{min-bin}}`.
- CI lanes: keep main's rewritten jobs and steps, renaming only the CLI
  build flags and built-binary paths (`--bin min`, `target/debug/min`).

Also point the sessions example project at `./target/debug/min`; the
binary path it documented no longer exists after the rename.

Published release asset names (`minimal-linux-amd64`, ...), the macOS
`minimal` shim, and the `minimal` crate and lib target are deliberately
left alone.
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.

2 participants