Skip to content

fix(homeboy): keep Homeboy's data root on the workspace volume (#710) - #712

Merged
chubes4 merged 2 commits into
mainfrom
fix/issue-710-wp-coding-agents
Oct 10, 2026
Merged

chubes4 merged 2 commits into
mainfrom
fix/issue-710-wp-coding-agents

Conversation

@chubes4

@chubes4 chubes4 commented Oct 9, 2026

Copy link
Copy Markdown
Member

Closes #710.

What

  • source_policy_resolve_homeboy_data_dir: when a workspace root is configured, HOMEBOY_DATA_DIR=<workspace>/.homeboy. An operator-set value wins, and with no workspace nothing changes.
  • homeboy-daemon, Roadie, and datamachine-worker units render Environment=HOMEBOY_DATA_DIR=… when it is set.
  • homeboy_data_dir_migrate runs in setup and upgrade once the service identity is final and before any unit renders:
    • Stops the idle daemon, refuses to move if homeboy.sqlite is still open, copies with rsync -aHAX, verifies PRAGMA integrity_check, deletes the legacy dir and leaves a symlink at ~/.local/share/homeboy.
    • Defers the move and clears the variable for that run when it isn't root, in dry-run, the daemon has jobs in flight, or the target is already populated. That way no unit ever points at an empty store.
    • Hosts that are already migrated (legacy path is a symlink) are a no-op.
  • Tests: unit rendering with and without the variable, resolver precedence, and every migration branch including a real sqlite carry-over. bridge-render.sh and homeboy-daemon-service.sh now unset an operator-exported HOMEBOY_DATA_DIR so snapshots don't drift.

Why

On the extrachill host, Homeboy's 24 GB data root was on / next to WordPress/MySQL while a dedicated 200 GB workspace volume sat beside it. A runtime-tmp leak (Extra-Chill/homeboy#15724) pushed / under Homeboy's capacity reserve and every Cook failed. That host was migrated by hand with exactly this layout (drop-ins + symlink), so the upgrade path is idempotent there.

Verification

tests/homeboy-daemon-service.sh, tests/bridge-render.sh, escaping-helpers, dead-mechanism, duplicate-mechanism, privilege-grants, homeboy-service-identity, homeboy-components, plist-rendering: all pass locally. bash -n passes on every touched script.

Notes

  • The Cook's first draft returned non-zero from the resolver when no workspace was configured. Under set -e in setup/upgrade that would have aborted every host without a workspace. Fixed here and covered by a test.
  • The Cook also skipped the migration. Without it, upgrading an existing host would have pointed units at an empty data root.

Drafted by Homeboy Cook (opencode), then the migration, the set -e fix, and the tests were finished by Extra Chill Bot directly on the controller.

Resolve HOMEBOY_DATA_DIR=<workspace>/.homeboy when a workspace root is
configured (operator value wins) and render it into the homeboy-daemon,
Roadie, and datamachine-worker units.

Setup and upgrade move an existing ~/.local/share/homeboy before any unit
renders the variable: stop the idle daemon, refuse if homeboy.sqlite is
still open, rsync, verify integrity_check, replace the legacy path with a
symlink. Non-root, dry-run, busy daemon, or an already-populated target
defer the move and clear the variable for that run, so no unit points at
an empty store. Already-migrated hosts are a no-op.

Isolate bridge-render and homeboy-daemon tests from an operator shell
that already exports HOMEBOY_DATA_DIR.
The inline ${HOMEBOY_DATA_DIR:+...} expansion left an empty line in the
worker and daemon units when no workspace data root is set, drifting the
datamachine-worker snapshot. Append it to the HOME line through a
common.sh helper that emits nothing when unset.
@chubes4
chubes4 merged commit abef1b9 into main Oct 10, 2026
86 checks passed
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.

Put Homeboy's data root (HOMEBOY_DATA_DIR) on the workspace volume, not the root disk

1 participant