The home of a session's pod stays the agent's; a start fails when its pod ends #42

Merged
mikluko merged 1 commit from server-pod into main 2026-11-16 06:25:04 +00:00
Owner

The two failures of the city on 0.2.0 that are the server's (specs-18's reading on spec-bb1.23).

  1. Mounts. bd's credentials were one file at /home/city/.config/beads/credentials, so the kubelet made /home/city/.config root's and goose panicked "Failed to create config directory: Permission denied" (Claude Code very likely the same).
    • roomcity.toml now refuses a Secret mounted inside the home (/home/city, or [kube] home), with the reason and the way out. The pod then has no mount under ~/.config, ~/.claude, ~/.local or ~/.cache; a test checks the pod spec for exactly that.
    • A Secret with a key may name path_env: the Job puts that variable in the pod's environment with the file's path. bd's own variable is BEADS_CREDENTIALS_FILE (gc's tests set it). So the manifests change the dolt Secret to something like {name = "dolt", key = "credentials", mount_path = "/run/roomcity/secrets/dolt/credentials", path_env = "BEADS_CREDENTIALS_FILE"}; the old line is now an error at the server's start, which says why.
    • Not done, and not needed by the failure: the work directory is mounted under the home too (/home/city/city/.gc/agents/<agent>), so its parents there are root's; they are not directories an agent writes in.
  2. Start. It looks at the session's Job every second and fails when the pod has ended, with the pod's state (host exited 1 Error, ImagePullBackOff ...) and the last 15 lines of its log in the answer gc sees, and deletes the Job as for any failed start. The server's service account needs get on pods/log (the Role has pods already).

Behind #39 (observe.v1) in the queue: both touch the Jobs interface and its fakes, and the second to land rebases.

Assisted-By: Claude noreply@anthropic.com

The two failures of the city on 0.2.0 that are the server's (specs-18's reading on spec-bb1.23). 1. Mounts. bd's credentials were one file at `/home/city/.config/beads/credentials`, so the kubelet made `/home/city/.config` root's and goose panicked "Failed to create config directory: Permission denied" (Claude Code very likely the same). - `roomcity.toml` now refuses a Secret mounted inside the home (`/home/city`, or `[kube] home`), with the reason and the way out. The pod then has no mount under `~/.config`, `~/.claude`, `~/.local` or `~/.cache`; a test checks the pod spec for exactly that. - A Secret with a `key` may name `path_env`: the Job puts that variable in the pod's environment with the file's path. bd's own variable is `BEADS_CREDENTIALS_FILE` (gc's tests set it). So the manifests change the `dolt` Secret to something like `{name = "dolt", key = "credentials", mount_path = "/run/roomcity/secrets/dolt/credentials", path_env = "BEADS_CREDENTIALS_FILE"}`; the old line is now an error at the server's start, which says why. - Not done, and not needed by the failure: the work directory is mounted under the home too (`/home/city/city/.gc/agents/<agent>`), so its parents there are root's; they are not directories an agent writes in. 2. Start. It looks at the session's Job every second and fails when the pod has ended, with the pod's state (`host exited 1 Error`, `ImagePullBackOff ...`) and the last 15 lines of its log in the answer gc sees, and deletes the Job as for any failed start. The server's service account needs `get` on `pods/log` (the Role has pods already). Behind #39 (observe.v1) in the queue: both touch the `Jobs` interface and its fakes, and the second to land rebases. Assisted-By: Claude <noreply@anthropic.com>
Keep the home of a session's pod the agent's, and fail a start when its pod ends
Some checks failed
test / changelog (pull_request) Failing after 6s
image / image (pull_request) Successful in 16s
test / go (pull_request) Successful in 1m10s
5d2c625053
bd's credentials were a file mounted at ~/.config/beads/credentials, so
the kubelet made ~/.config root's and the agent could make no directory
of its own beside it: goose panicked "Failed to create config directory:
Permission denied". A Secret mounted inside the home (/home/city, or
[kube] home) is now refused when roomcity.toml is read, and a Secret with
a key may name path_env, the variable the pod holds the file's path in:
bd takes BEADS_CREDENTIALS_FILE.

A start waited out its 100 seconds although its pod had already failed.
It now looks at the pod every second and fails when the pod has ended,
with the pod's state and the last lines of its log in the answer gc sees.

Assisted-By: Claude <noreply@anthropic.com>
mikluko force-pushed server-pod from 5d2c625053
Some checks failed
test / changelog (pull_request) Failing after 6s
image / image (pull_request) Successful in 16s
test / go (pull_request) Successful in 1m10s
to 72909397bd
All checks were successful
test / changelog (pull_request) Successful in 6s
image / image (pull_request) Successful in 16s
test / go (pull_request) Successful in 51s
2026-11-16 06:22:29 +00:00
Compare
mikluko deleted branch server-pod 2026-11-16 06:25:04 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/roomcity!42
No description provided.