Repository navigation
Commit 3917a95
fix(runtime): mount the project a composed service runs from in container mode
Every process the container environment runs is given the project directory as
its working directory, but the environment was built over the workspace path
alone. That carries the project only for a service authored in the workspace
tree. A service a workspace *composes* is resolved into the module cache, or to
wherever an overlay points — both outside the workspace — so the container
started with a working directory that does not exist inside it:
OCI runtime exec failed: exec failed: unable to start container process:
chdir to cwd (".../services/<svc>/code") set in config.json failed:
no such file or directory
which the caller reports as `cannot run uv sync: process exited with code 127`,
naming uv rather than the missing mount. No composed Python service could run
under `--runtime-context container`; the native and Nix backends were
unaffected, which is why this survived — the module cache has always been
outside the workspace, so this is not new with overlays.
The same file already gets it right at the image-runtime environment
(`runtime.go:1165`, which passes `s.Service.SourceLocation`); the asymmetry
inside one file was the tell.
Classification: a fix, in the agent that owns the runner environment. The
workspace mount stays for a service that lives in the workspace, and the
project is mounted at its own path only when that mount does not already
cover it, so nothing changes for a service the workspace holds.
Testing: `go build`, `go vet`, `go mod tidy -diff`, `go test ./...` (81s, ok —
the Docker-backed cases ran, `nix` skipped as it always does here), and
`go test -race ./...`. The new test fails on `main` with exactly the 127 above
and passes with the fix. Not verified: Kubernetes deployment paths, which this
does not touch.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 5f9c11d commit 3917a95
2 files changed
Lines changed: 101 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
258 | 270 | | |
259 | 271 | | |
260 | 272 | | |
| |||
0 commit comments