Repository navigation
fix: write Hermes bootstrap marker after headless install - #12487
adriannoes wants to merge 2 commits into
Conversation
Packaged install.sh --skip-setup never stamps .hermes-bootstrap-complete. Write the install.ps1 schema after a usable runtime is in place so --check and theme activation succeed.
Extract the stamp helper, correct packaged-vs-upstream install.sh comments, and add a one-shot migration for usable runtimes that are only missing the marker.
Automated AI review
The packaged installer already writes Verified: the marker the helper writes ( The packaged
|
install.sh fails after the Python stage, then the user re-runs omarchy install ai hermes |
Merge-base | PR head |
|---|---|---|
install.sh runs again |
yes | no, the runtime is stamped first |
| Result | install completes, --check passes |
prints "Hermes Desktop has been installed." and launches, with no ~/.local/bin/hermes, no Node deps, and a failing --check |
| Later re-runs | can repair | skip install.sh, because the marker now exists |
Reproduced in an isolated harness whose stub install.sh follows upstream main() stage order. Migration 1789746834.sh stamps such runtimes in the same way.
Impact: the recovery described in the installer's own error message ("Re-run this command after resolving the installer error") stops working, and the marker no longer means the install finished, which the comment in omarchy-install-hermes-cli relies on.
Suggested change: do not stamp before the readiness and repair checks. Stamp only after an install.sh run has completed, or require stronger evidence than hermes --version that every upstream stage completed.
Stamping a runtime the user installed makes Remove Hermes delete it
omarchy-remove-ai-hermes treats the marker as the only proof that Omarchy owns ~/.hermes/hermes-agent, and deletes that checkout, bootstrap-cache, bin and node without prompting when the marker exists. hermes-remove-test.sh asserts that a runtime without the marker survives removal, local changes included. The migration's only ownership check is that the hermes-desktop package is present.
user-installed ~/.hermes/hermes-agent (no marker, local commit) + hermes-desktop package
without the migration → Remove Hermes keeps the runtime and the local commit
with the migration → marker written → Remove Hermes deletes the runtime and the local commit
The installer's pre-install stamp also leaves a marker when the same run then refuses the runtime ("moved beyond the packaged desktop release"). That marker's pinnedCommit is the package release, not the checkout's HEAD. Reproduced in the same isolated harness, default ~/.hermes layout only.
Impact: on the default layout, removing Hermes can delete a user's own checkout and local work without asking.
Suggested change: backfill only runtimes with evidence that Omarchy installed them, never stamp ahead of the adoption and refusal checks, and add a test where a markerless user runtime survives the migration or an installer refusal followed by Remove Hermes.
Rebase onto current quattro
bin/omarchy-install-ai-hermes on quattro is now a thin wrapper around omarchy-install-hermes-cli --now, and a trial merge conflicts in that file and in test/shell.d/hermes-desktop-install-test.sh. On quattro, --check also requires the seeded native app, so a backfilled marker alone does not make it pass for runtimes without that app.
Note: if a backfill is kept, it does not re-run omarchy-theme-set-hermes --activate, so a skin activation missed by the one-shot migration 1788619462.sh only happens at the next theme change.
Review information
Test scope: Source review of the PR head, merge-base and current quattro, plus the upstream Hermes Agent source and hermes-desktop package build files for 2026.8.31-3 and 2026.9.7. The PR's tests and additional failure and ownership scenarios ran in an isolated sandbox with stubbed install.sh, package and systemd commands. No real Hermes installation, desktop session or package manager was used. The reporter's machine and actual install history were not available.
AI process: Opus 5.5 Medium coordination and synthesis, independent Opus 5.5 Xhigh and GPT 6 Sol Xhigh technical assessments with targeted follow-up questions, Opus 5.5 Medium editorial check.
Opt out: To stop receiving these reviews, reply to this comment saying so.
|
Thanks for digging into #12206, @adriannoes. I reviewed this at The marker is already written. The packaged Two regressions, both reproduced on the worker against this head:
It also conflicts with Codex Medium gave a second opinion through Next step: this waits on the maintainer, and my recommendation is to close it. The useful open question is on #12206: how the reporter's runtime came to exist without a marker. It could be an older standalone Hermes install, the desktop app's own bootstrap, or an interrupted |
|
Closing this for now. Happy to reopen with a cleaner approach if the bug shows up again. |
Fixes #12206
omarchy install ai hermessets up the runtime with the packagedhermes-desktop
install.sh --skip-setup. That path never writes~/.hermes/hermes-agent/.hermes-bootstrap-complete.Omarchy's own readiness check (
omarchy-install-hermes-cli --check)requires that file, so
omarchy-theme-set-hermes --activateand theone-shot migration
1788619462.shkeep saying Hermes isn't ready evenwhen the install works. Windows
install.ps1already stamps the samemarker; this closes the gap on the Omarchy headless path.
.hermes-bootstrap-completeafter a usable headless runtime isin place (same schema as
install.ps1/writeBootstrapMarker(),without
desktopVersion).omarchy-stamp-hermes-bootstrapused by the installer.1789746834.shbackfills the marker on already-usableinstalls that are only missing the file (does not re-run
install.sh).Tests:
hermes-desktop-install-test.sh,hermes-bootstrap-migration-test.sh(plus related hermes cli/theme/migration tests). Stubbed
--skip-setupleaves no marker; Omarchy stamps a valid one;
--checkpasses; migrationis a no-op without desktop/usable runtime and is idempotent.