The Integrated Developer Environment: Forge, CI Gate, and One-Shot Agent Jobs
A developer environment is more than a Git server. The project now runs a connected loop: a forge stores repositories, a CI bridge turns pushes into isolated Kubernetes Jobs, an MCP façade exposes repository and file operations to assistants, and one-shot Pi jobs run analysis inside an ephemeral sandbox. The design avoids Docker-in-Docker and keeps cluster credentials out of the job.
Four layers, not one product
The environment separates concerns that are easy to blur:
- Git forge: Forgejo holds repositories, branches, and commits.
- Cloud-FS: Nextcloud-compatible WebDAV, reached through an MCP server, holds user files and artefacts.
- CI gate: a small bridge receives a Forgejo webhook and creates a Kubernetes Job that clones and checks the repository.
- Agent sandbox: a one-shot Pi job runs inside an ephemeral pod; the model is reached through a LiteLLM gateway.
There is no direct POSIX mount from Cloud-FS into the forge. The forge stores Git objects; Cloud-FS stores user files; the sandbox uses MCP or WebDAV for cloud files. That separation is deliberate, not an implementation shortcut.

The CI path: webhook, bridge, Job
Forgejo is digest-pinned, uses OIDC against Keycloak, and persists its SQLite database on a volume. The CI path is not Forgejo Actions with a Docker runner. A push or pull-request webhook goes to a bridge service in its own namespace. The bridge verifies the X-Forgejo-Signature HMAC-SHA256 signature, then creates a batch/v1 Job in the same namespace.
The bridge's RBAC is intentionally narrow: it can create, read, list, and delete Jobs, and read pod logs. The Job itself receives no cluster credentials. It clones the repository, checks the commit, and runs the repository's gate script. The gate image is digest-pinned. This is the difference between "CI as a service" and "CI as a privileged cluster agent".
Live proof from the reference environment: a push to a demo repository produced a Job that completed with CI-GATE OK; the Job log showed the repository name and run timestamp. The bridge image was rebuilt after the Job template was hardened, and the deployed digest changed accordingly.
Operational scars are part of the design:
- Forgejo must allow the bridge's private cluster host in
GITEA__webhook__ALLOWED_HOST_LIST; otherwise deliveries are rejected. - A webhook secret is honoured when the hook is created, not when a hook is patched; the bridge therefore verifies the signature at delivery time.
- The bridge reaches the Kubernetes API through the cluster's server CA. A wrong CA bundle produces
CERTIFICATE_VERIFY_FAILED. - The gate script must use
echofor its status line; a bareCI-GATE OKis interpreted as a command.
The façade: MCP as an operating layer
The devtools-façade is an MCP service, not a Git backend. It requires a Bearer token and exposes a small tool surface:
| Tool | What it does |
|---|---|
repo_clone |
clones a forge repository and returns HEAD and file list |
repo_grep |
clones and searches a repository |
pi_run / repo_analyse |
creates a one-shot Pi Job over a repository |
job_result |
reads Job status and pod-log tail |
fs_list / fs_read / fs_write |
reads and writes Cloud-FS through an MCP server |
matrix_report |
sends a report to a Matrix room |
The façade connects the three layers through MCP. It does not mount Cloud-FS into the forge and does not run a long-lived agent. Its egress is explicitly limited to the model gateway, the MCP servers, the ingress controller, DNS, and the Kubernetes API.
Open WebUI can register the façade as an MCP tool server. That registration is persistent configuration, not an environment variable: after first start the database is authoritative. The startup log Initialized 0 tool server(s) is not an error; the prefetch counts OpenAPI connections, while MCP connections are used in chat and UI.

Live proof: repo_clone returned a repository HEAD and file list; fs_list("") returned the Cloud-FS root; pi_run created a Job whose log contained a model answer.
One-shot Pi jobs and the encapsulation jump
The agent sandbox is deliberately short-lived. A pi-devbox Job runs the Pi coding agent in an Alpine Node image with an ephemeral home and /tmp, non-root UID 65534, RuntimeDefault seccomp, a read-only root filesystem, and an egress allowlist. The repository is cloned into /tmp, because the root filesystem is read-only. The model call goes through LiteLLM.
The next step is encapsulation: a pi-unkernel Job runs a Debian 13 guest as WebAssembly inside the pod. The guest boots in under a second, the repository is provided through a 9p mount, and the model is reached through the gateway. The roast is never copied into the guest's ext4 filesystem; that would exhaust the guest memory. A live Job completed with a real model answer.
There is also a browser-guest demo: user code stays in the browser, and only prompts cross the gateway. The page uses COOP/COEP and vendored WebAssembly assets. It is a product demonstration, not an Open WebUI Function; Open WebUI Functions are backend Python, while the browser guest is client-side.
Security boundaries and honest edges
The hardening is network- and workload-level:
- Namespace-wide default-deny policies in the forge and CI namespaces, with explicit allow rules for DNS, ingress, the model gateway, and the Kubernetes API.
- Owner, team, data-classification, data-owner, and data-retention labels on Deployments, Jobs, Services, PVCs, and Ingresses.
- Container security contexts with dropped capabilities, non-root users, read-only root filesystems, and seccomp.
- A k8up-managed PVC annotation, which also satisfies the storage-encryption audit through restic at-rest encryption.
- Security headers on the forge Ingress.
Not every audit policy can be satisfied without breaking the service. Forgejo's official image boots through s6-overlay as root and needs chown/su-exec capabilities; non-root, drop-ALL, and read-only root filesystem are therefore deliberate deviations. Per-pod logging sidecars are not used because node-level Promtail/Loki collects stdout. TLS terminates at the load balancer, not at the Ingress object. The namespace default-deny exists even though a selective-policy audit flags allow policies as "not default-deny". These are documented deviations, not hidden zero-fail claims.
Lessons
- Jobs are not GitOps objects. They are manifests under examples, not long-lived Kustomize resources.
- MCP ports are namespace-blocked. The façade and Open WebUI need explicit NetworkPolicy rules; a default-deny namespace does not automatically open the MCP ports.
- ConfigMap environment changes need a rollout. ArgoCD sync updates the ConfigMap, but a running pod does not restart just because
envFromdata changed. - Read-only root filesystems need writable scratch space. The Pi Job clones into
/tmp, not into the root. - Service VIPs are not a reliable egress target under default-deny. The cluster API endpoint must be addressed directly and allowed by IP block.
- Cloud-FS is not a POSIX mount for the forge. MCP/WebDAV is the bridge, and the sandbox keeps its own ephemeral filesystem.
What is live
| Layer | Verified outcome |
|---|---|
| Forge | Forgejo serves repositories over HTTPS; OIDC login works; data persists after pod restart |
| CI gate | A demo push creates a Job that completes and logs CI-GATE OK |
| Façade | Repository clone, Cloud-FS listing, and a Pi Job with a model answer all work |
| Agent sandbox | pi-devbox and pi-unkernel Jobs complete; the unkernel guest boots as WebAssembly |
| Browser guest | A Playwright test verifies crossOriginIsolated, guest output, and a single mocked gateway request |
Next steps
The remaining work is integration, not a new platform: wire the unkernel guest into the façade as one guest per request, close the egress allowlist for all Pi job variants, and publish the browser guest and forge as public entry points. The environment is already usable; the next phase makes it reproducible for a wider cohort.
Call to Action
- Try the loop: clone a repository, push a change, and inspect the resulting CI Job.
- Read the manifests: compare the forge, bridge, façade, and one-shot Job definitions to see where the security boundaries sit.
- Join the community: discuss sovereign developer environments in the Matrix channel
#opendesk-ce-public:matrix.openedusuite.org.
A developer environment built from a forge, a CI gate, an MCP façade, and ephemeral agent jobs — sovereign, reproducible, and honest about its limits.