mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-12-02 00:37:18 +00:00
## Summary Adds run-level controls for clone behavior, managed run branch setup/pushes, and metadata branch writes/pushes so workflows can opt out of Fabro-managed Git behavior without relying on provider-specific `skip_clone` settings. This closes fabro-sh/fabro#240. ## What Changed - Introduced `[run.clone]`, `[run.run_branch]`, and `[run.meta_branch]` settings with defaults that preserve current behavior. - Removed user-facing `skip_clone` from Docker/Daytona config while mapping the new run-level clone setting into the internal sandbox runtime options. - Gated run branch setup/push, metadata branch writer creation/push, and PR branch output on the new settings. - Enforced invalid combinations: pull requests require an enabled pushed run branch, and disabling the run branch also disables metadata branch behavior. - Updated OpenAPI, the generated TypeScript API client, frontend fixture data, and docs for the new configuration shape. ## Testing - `cargo nextest run -p fabro-config -p fabro-types -p fabro-workflow -p fabro-server` - `cargo build -p fabro-api` - `cd lib/packages/fabro-api-client && bun run generate` - `cd lib/packages/fabro-api-client && bun run typecheck` - `cd apps/fabro-web && bun run typecheck` - `cd apps/fabro-web && bun test` - `cargo build --workspace` - `cargo +nightly-2026-04-14 fmt --check --all` - `cargo +nightly-2026-04-14 clippy --workspace --all-targets -- -D warnings` - `cargo insta pending-snapshots` - `git diff --check` ## Post-Deploy Monitoring & Validation - Validation window: first 24 hours after release; owner: release owner/on-call engineer. - Log queries/search terms: `run_branch`, `meta_branch`, `clone.enabled`, `skip_clone`, `pull request requires an enabled pushed run branch`, `metadata branch`. - Healthy signals: runs without custom branch config continue creating and pushing run/meta branches; runs with `[run.clone] enabled = false` start provider sandboxes without cloning; runs with branch pushes disabled complete without Git push errors. - Failure signals: increased run startup failures for Docker/Daytona, unexpected PR creation conflicts, missing metadata for default-config runs, or validation errors for configurations that previously used default settings. - Mitigation trigger: if default-config runs stop producing expected branch/metadata artifacts or sandbox startup failures increase, roll back the release or temporarily restore previous defaults while investigating the run-level setting resolution path. --- [](https://github.com/EveryInc/compound-engineering-plugin) 🤖 Generated with GPT-5 via [Codex](https://openai.com/codex) Co-authored-by: Haroldo Olivieri <6575718+haroldolivieri@users.noreply.github.com>
58 lines
2.8 KiB
Text
58 lines
2.8 KiB
Text
---
|
|
title: "Clone-based Docker sandboxes and per-run logs"
|
|
date: "2026-04-26"
|
|
---
|
|
|
|
<Warning>
|
|
**Docker is now the default runtime sandbox provider.** Docker sandboxes no longer bind-mount the caller's working directory. They create a container workspace and clone the run manifest's GitHub origin into `/workspace`.
|
|
|
|
To migrate:
|
|
1. Use `--sandbox local` or `[run.sandbox] provider = "local"` when a run must operate directly on the host working tree.
|
|
2. For Docker or Daytona runs without a GitHub origin, set `[run.clone] enabled = false`.
|
|
3. Make sure private GitHub repositories have GitHub App credentials configured before running clone-based sandboxes.
|
|
</Warning>
|
|
|
|
## Clone-based Docker sandboxes
|
|
|
|
Docker now uses the same clone-shaped runtime model as Daytona. When the run manifest includes a GitHub origin, Fabro clones that repository into the sandbox workspace and configures git lifecycle operations inside the sandbox.
|
|
|
|
This is a breaking sandbox change:
|
|
|
|
- Docker no longer bind-mounts host workspaces.
|
|
- Docker and Daytona accept GitHub origins only when cloning.
|
|
- Present non-GitHub origins fail unless `[run.clone] enabled = false`.
|
|
- Absent origins and `[run.clone] enabled = false` runs create empty workspaces without repository files.
|
|
|
|
The packaged Docker Compose service mounts the host Docker socket so the server can create sibling run containers. Operators remain responsible for Docker socket permissions, Docker Desktop behavior, `DOCKER_HOST`, TLS, and remote daemon security.
|
|
|
|
## Run logs
|
|
|
|
Each server-dispatched run now gets its own worker tracing log at `runtime/server.log`. The server also exposes the log through `GET /api/v1/runs/{id}/logs`, so tools can fetch execution-time tracing for a single run without grepping the process-wide server log.
|
|
|
|
`fabro dump` now includes the same log as `run.log` when it is available. Dumps still succeed for older runs or submitted runs that do not have a worker log yet.
|
|
|
|
## Operators
|
|
|
|
Worker subprocesses continue writing to the main `<storage>/logs/server.log`, and also mirror worker tracing into the per-run file. `FABRO_LOG` still controls log verbosity; if a server config sets `[server.logging] level`, that level is now propagated to workers unless the parent process already set `FABRO_LOG`.
|
|
|
|
Server logs can also go to stdout, which is useful for containers and process supervisors:
|
|
|
|
```toml
|
|
[server.logging]
|
|
destination = "stdout"
|
|
```
|
|
|
|
## More
|
|
|
|
<Accordion title="API">
|
|
- New `GET /api/v1/runs/{id}/logs` endpoint returns the per-run worker log
|
|
- Server settings now include `server.logging.destination` with `file` and `stdout` values
|
|
</Accordion>
|
|
|
|
<Accordion title="CLI">
|
|
- `fabro dump` now includes per-run worker logs as `run.log` when they are available
|
|
</Accordion>
|
|
|
|
<Accordion title="Fixes">
|
|
- Fixed web requests being served from non-canonical hosts instead of redirecting to the configured canonical host
|
|
</Accordion>
|