forked from vhaudiquet/rhema-claw
build: ship gob in the claw image
A coding turn that starts a dev server or a build has to either wait for it or background it with `&`, and a backgrounded process is gone from the next turn's view: no id, no logs, no port. gob keeps the process table that the agent and the operator both read, so the turn returns and a later one asks what happened. The release carries a static linux binary for amd64 and arm64. The image downloads one from a pinned tag (GOB_VERSION, a build arg) and unpacks it to /usr/local/bin/gob; no package rides along. No other arch is published, so a build for one fails at the download instead of shipping a container whose shell has no gob. The image gains XDG_RUNTIME_DIR=/tmp/run with it. Left unset, gob looks for /run/user/1000, which nothing creates here, and its daemon dies with "socket not created" even though the job table is writable. The socket stays off the volume, where an NFS PVC cannot hold one. The state (state.db, the run logs) follows XDG_STATE_HOME to /data/state, so jobs survive a restart of the container. Checked on the image's own base: gob run, gob add, gob list and gob shutdown as uid 1000, no flags. The full image still cannot build before the 0.4.2 sandbox release (cargo fetch rejects the unpublished pin), so the runtime stage was built from the Dockerfile's own lines.
This commit is contained in:
1 parent
dc269472eb
commit
ea26019f0c
2 files changed
+40
-14
No files matched your search
+16
-13
@@ -346,19 +346,22 @@ same host serves both: the browser gets the web UI on `/`, the daemon
|
||||
answers `/v1` and `/healthz`; one address for the browser and the
|
||||
phone app, no CORS anywhere.
|
||||
|
||||
The image is the daemon plus `bash` and `git` (the agent's shell is
|
||||
load-bearing); the chart runs exactly one replica, the claw is
|
||||
single-node by design: one SQLite store, one dispatcher. Single-node
|
||||
is what makes restarts instant: at boot the daemon releases every
|
||||
lease the previous process left — outright, not at the dead lease's
|
||||
TTL — so a turn an update cut mid-flight answers its next message
|
||||
instead of stalling behind a ghost (the committed tool call revives
|
||||
at the top of that next dispatch). The
|
||||
store and workspaces live on a PVC, `claw.yaml` in a ConfigMap (db and
|
||||
workspace paths are pinned to the mounted volume), credentials in a
|
||||
Secret, and the bearer token is the `token` value, required since the
|
||||
daemon binds all interfaces in-cluster. `persistence.enabled=false`
|
||||
trades restart survival for disposability.
|
||||
The image is the daemon plus what the agent's shell needs: `bash` and
|
||||
`git` (the shell is load-bearing, the agent clones in its workspaces),
|
||||
`curl` for a turn that fetches a URL, and `gob` for a command that
|
||||
outlives the turn. The agent starts a build or a dev server with `gob
|
||||
add` and reads its logs and ports on a later one. The chart runs
|
||||
exactly one replica, the claw is single-node by design: one SQLite
|
||||
store, one dispatcher. Single-node is what makes restarts instant: at
|
||||
boot the daemon releases every lease the previous process left —
|
||||
outright, not at the dead lease's TTL — so a turn an update cut
|
||||
mid-flight answers its next message instead of stalling behind a ghost
|
||||
(the committed tool call revives at the top of that next dispatch).
|
||||
The store and workspaces live on a PVC, `claw.yaml` in a ConfigMap (db
|
||||
and workspace paths are pinned to the mounted volume), credentials in
|
||||
a Secret, and the bearer token is the `token` value, required since
|
||||
the daemon binds all interfaces in-cluster.
|
||||
`persistence.enabled=false` trades restart survival for disposability.
|
||||
|
||||
The UI in `web/claw` is one client of the same surface: `npm run dev`
|
||||
proxies to a local claw, `npm run build` emits the static bundle an
|
||||
|
||||
Reference in new issue
Block a user