You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The launcher keyed the container name off the mutable .garden shard file while the
bind mount used a fixed /home/<user> path. The decoupling let a container strand
under a name matching no checkout (the "lost container"), and the host<->container
path mismatch (-v $SCRIPT_DIR:/home/kris) made git canonicalize journal-worktree
paths to a bind-mount source that did not exist inside the container, corrupting
the journal worktree on every op.
Identity is now derived purely from the checkout's canonical path
(<hostname>-<basename>-<hash8>), pinned into --name/--hostname at creation, so it
is collision-free, stable, and self-healing; the .garden file and GARDEN env knob
are gone (common.sh resolves via its hostname -s fallback). The checkout is
bind-mounted at its own host path and the bot user's home is relocated to match
(entrypoint usermod -d, launcher GARDEN_HOME), so an absolute path denotes the
same file inside the container and out -- which also fixes the journal-worktree
corruption. The container's unix user (name + uid) is baked per-build to match the
host user, tagging the image per-user (garden-<user>); nothing is pinned to one
account. Adds a `create` subcommand for headless bring-up.
Verified: two concurrent instances (endolin-garden, endolin-garden2) with mirrored
homes, correct GARDEN/GARDEN_ROOT, idempotent re-attach, and a clean git worktree
add whose gitdir target exists in-container.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The garden lives in the bot user's home directory; that directory is what `<garden-root>` refers to throughout this document. Each host has a logical **`GARDEN` identity** — the shard name that keys job claims, per-host worker counts, journal index entries, and the leader marker, and **must be unique across running instances**. Its resolution order (`GARDEN` env → the gitignored `<garden-root>/.garden` file → `hostname -s`), the `.garden` naming knob, why an exported env var does not reach the `--user` units, and the container-rename move all live in [context/first-run/identity.md](context/first-run/identity.md).
82
+
The garden lives in the bot user's home directory; that directory is what `<garden-root>` refers to throughout this document, and the container **mirrors** it — the checkout is bind-mounted at its own host path and the bot user's home is relocated to match, so an absolute path denotes the same file inside the container and out. Each instance has a logical **`GARDEN` identity** — the shard name that keys job claims, per-host worker counts, journal index entries, and the leader marker, and **must be unique across running instances**. That identity is **derived from the checkout's location**, `<hostname>-<basename>-<hash8>` of the canonical path, and pinned into the container's `--name`/`--hostname` at creation; the fleet reads it back through `common.sh`'s `hostname -s` fallback. There is no `.garden` file or `GARDEN` env knob to set — distinct directories yield distinct instances automatically, and the only cross-instance requirement the human must ensure is that **hosts have unique short hostnames**. The derivation, the multi-instance recipe, and the expert overrides live in [context/first-run/identity.md](context/first-run/identity.md). The container's unix user matches the **host** user (name + uid, baked per-build), so nothing is pinned to one maintainer's account.
83
83
84
84
Each host configures its bot identity once in the garden repo's local git config:
0 commit comments