Route desktop leases to the desktop base and fix silent create failures - #1257
Conversation
Two lab defects that compound: `create` failed with no diagnostic, and when it did succeed a --desktop lease landed on the wrong base. remote.sh runs over a non-interactive SSH shell, which does not source the login profile and so has no Homebrew on PATH. The repository sets core.hookspath, and those hooks call git-lfs. With git-lfs unreachable the hook exits non-zero and `set -e` aborts mid-command: `create` died right after staging its archive, reporting only exit 2 with nothing on stderr. The script now sets the PATH it needs instead of depending on how it was launched, which is the same convention the launcher branches already follow. base_for() ignored the desktop flag, so `--desktop` still resolved to the plain base. That base has no console session, no Homebrew, and no desktop tooling, so desktop-bootstrap failed and semantic UI automation could never run -- while the lease itself looked healthy. Thread desktop through to base_for and route macOS 26/27 desktop leases to keypath-macos-N-desktop. Managed lanes are excluded: only the managed base carries MDM enrollment, so a managed desktop lease keeps its base and takes desktop capability from the launcher. warmup_lease's remaining call sites are reached only when desktop is 0, so they keep the default. The existing desktop tests asserted the lease id but never the base, which is why this regressed invisibly. They now assert the recorded base_name for macOS 26 and 27, and that a managed desktop lease keeps the managed base. Reverting base_for makes the suite fail, confirming the tests bite. Verified against the real lab: create now runs through the controller with no PATH workaround and provisions `type=template-keypath-macos-27-desktop-base` with console user keypathqa, where it previously produced the plain base. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Reviewed the diff. Two things worth a second look, otherwise this looks solid (the
Minor: the new desktop-base test coverage only exercises macOS 26 for the managed+desktop path (and 27 for the plain unmanaged+desktop path) — no test combines macOS 27 with managed-functional + desktop. Not blocking, just a coverage gap given |
The provisioning guard called `df` on /System/Volumes/Data, the boot disk. Parallels writes clones to its configured VM folder, which on this host is an external volume, so the guard measured a filesystem the clone never touched. A full clone passed admission with 113 GiB free on the boot disk and then exhausted the external container it was really consuming. Make the measured path configurable via KEYPATH_LAB_DISK_RESERVE_PATH, defaulting to the previous location so behavior is unchanged until an operator points it at the real clone root. Emit that path in both the disk_reserve and disk_reserve_busy lines: a guard aimed at the wrong filesystem should be visible in the log instead of silently passing. Resolve df and awk absolutely. This guard runs before the environment is established and must not depend on PATH being well-formed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Reviewed the diff. One thing worth double-checking before merge:
Everything else looks solid: the PATH-bootstrap fix for non-interactive SSH (matches the existing |
Two lab defects that compound.
createfailed with no diagnostic, and when it did succeed a--desktoplease landed on the wrong base.Silent
createfailureremote.shruns over a non-interactive SSH shell, which does not source the login profile and therefore has no Homebrew onPATH. The repository setscore.hookspath, and those hooks callgit-lfs. Withgit-lfsunreachable the hook exits non-zero andset -eaborts mid-command —createdied immediately after staging its archive, reporting only exit 2 with nothing on stderr.The script now sets the
PATHit needs rather than depending on how it was launched. That matches the convention the launcher branches inwarmup_desktop/warmup_leasealready follow.Desktop leases landed on the wrong base
base_for()took only(macos, lane)and ignored the desktop flag, so--desktopstill resolved tokeypath-macos-N. That base has no console session, no Homebrew, and no desktop tooling —desktop-bootstrapfailed on it and semantic UI automation could never run, while the lease itself looked healthy.desktopis now threaded through tobase_for, routing macOS 26/27 desktop leases tokeypath-macos-N-desktop.Managed lanes are deliberately excluded: only the managed base carries MDM enrollment, so a managed desktop lease keeps its base and takes desktop capability from the launcher.
warmup_lease's remaining call sites are reached only whendesktopis0, so they keep the default.Why it regressed invisibly
The existing desktop tests asserted the lease id but never which base was used. They now assert the recorded
base_namefor macOS 26 and 27, and that a managed desktop lease keeps the managed base. Revertingbase_formakes the suite fail, confirming the assertions bite.Note: in test mode
warmup_desktopcalls the stub launcher without--parallels-template, so the calls log cannot carry that flag — the recordedbase_nameis the assertable signal.Verification
Against the real lab, through the normal controller with no PATH workaround:
Console user in the guest is
keypathqa— the session is inherited as intended. Previously this same command produced the plain base.Scripts/lab/tests/keypath-lab-tests.shpasses; lease was artifact-collected and destroyed.Follow-up, not fixed here
The desktop base itself still lacks tooling: no Homebrew, no
peekaboo, nomcporter, and/Applicationsholds only Safari and Utilities. Sodesktop-bootstrap --install-toolsstill fails on it. That is a base-image provisioning task (install tools, re-checkpoint), not a code fix, and it is the same stepdocs/testing/remote-installer-lab.mdalready records as outstanding for the macOS 26 base. Worth noting becausea6f4fa161marked this base proven with "signed Peekaboo Lab Host approvals," which does not match the base as it exists today.🤖 Generated with Claude Code