Skip to content

fix(install): bump BOI pin v3.3.1→v3.3.2 + atomic-rename deploy (FIX-017)#18

Merged
mrap merged 1 commit into
developfrom
fix/boi-versions-bump-atomic-deploy
Jun 17, 2026
Merged

fix(install): bump BOI pin v3.3.1→v3.3.2 + atomic-rename deploy (FIX-017)#18
mrap merged 1 commit into
developfrom
fix/boi-versions-bump-atomic-deploy

Conversation

@mrap

@mrap mrap commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Problem

The deployed BOI daemon kept flapping between v3.3.2 and v3.3.1, silently regressing off the released stability cluster. Root cause: VERSIONS still pinned BOI_VERSION=v3.3.1 while v3.3.2 was the released latest. The codex-parity test suite runs install.sh, whose install_or_upgrade_boi read the stale pin and reverted ~/.boi/src/boi to v3.3.1 → rebuilt in place → relinked, on every run.

Separately, that in-place rebuild overwrote the Mach-O the running daemon was mapped from → macOS AMFI SIGKILLed the live daemon ("Code Signature Invalid"; crash report boi-2026-06-16-142615.ips).

Fix

  1. VERSIONS: BOI_VERSION v3.3.1 → v3.3.2 (the released latest) so install.sh short-circuits ("already installed ✓") instead of reverting → stops the flap.
  2. install.sh: deploy the built binary as a real file via atomic rename (cp to a sibling tmp + mv -f) instead of ln -sf to the live cargo build output. Atomic rename(2) gives boi_bin a fresh inode so a live daemon keeps its own inode until its next restart instead of being AMFI-killed. Fast-path guard now requires a non-symlink real file ([ ! -L ]) to force one-time migration off the old symlink layout.

Review

Counter-reviewed (sonnet code-reviewer): mergeable. Blast-radius clean — doctor boi_health uses is_file() (works for a real file), NoBrokenSymlinks scans only .hex//.agents/, no test hard-codes the symlink contract (test-boi-upgrade.sh/test-boi-install.sh already branch on [ -L ] and accept a real file), rename is same-filesystem/atomic and set -euo pipefail-guarded, ad-hoc Mach-O signature survives cp.

Known residuals (tracked in fix-backlog FIX-017, not closed here)

  • MEDIUM: cargo build at install.sh:421 still writes target/release/boi in place, so a migration run where a daemon is still on the old symlink could AMFI on relink. Window is empty for the shipped v3.3.2→v3.3.2 (incremental no-op) but real for future bumps unless the build also targets a temp dir.
  • LOW: test-boi-upgrade.sh 6b cleanup restore no-ops after the real-file switch (benign; on_exit rm -rf cleans up).

🤖 Generated with Claude Code

…017)

The stale BOI_VERSION=v3.3.1 pin made install.sh (run by codex-parity tests)
revert ~/.boi/src/boi to v3.3.1 + rebuild + relink on every run — a version
flap that regressed the deployed daemon off the v3.3.2 stability cluster.

Two changes:
- VERSIONS: BOI_VERSION v3.3.1 → v3.3.2 (the released latest) so install.sh
  short-circuits instead of reverting.
- install.sh: deploy the built binary as a real file via atomic rename
  (cp tmp + mv) instead of `ln -sf` to the live cargo build output. Rebuilding
  in place overwrote the Mach-O the running daemon was mapped from → macOS AMFI
  SIGKILLed it ("Code Signature Invalid"); atomic rename gives a fresh inode so
  the live process keeps its own until its next restart. Fast-path now requires
  a non-symlink real file (`[ ! -L ]`) to force one-time migration off the old
  symlink layout.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mrap mrap merged commit 9b0c59e into develop Jun 17, 2026
5 checks passed
@mrap mrap deleted the fix/boi-versions-bump-atomic-deploy branch June 17, 2026 18:28
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