Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Container and Cache Execution Design

This document covers the low-level interactions that enable Devflow to orchestrate fast, deterministic container execution while maintaining a strictly stack-agnostic core.

1. The Stack-Agnostic Boundary

A core invariant of Devflow’s design is that orchestration is generic; semantics are specific.

Whether the runtime profile is host or container, the Extension behavior remains identical. If the profile is containerized, the devflow-cli executor seamlessly wraps the extension’s generic Output Action into a container volume-mounted string without the extension knowing.

2. Container Lifecycle & Engine Determinism

By default, Devflow projects should utilize profile = "container" to guarantee environment reproducibility.

3. The Unified Cache (DWF_CACHE_ROOT)

Devflow implements an aggressive caching strategy pushing dependencies out of ephemeral containers onto the long-lived host disk.

4. Debugging and Troubleshooting

When container execution issues arise, developers need clear visibility into the proxy translation.

5. Teardown and Cache Invalidations

Developers risk exhausting their local disk space if abandoned container images and $DWF_CACHE_ROOT binaries accumulate unbounded over time. Because Devflow multi-stage builds aggressively pull OS and language toolchains, image storage can quickly reach tens of gigabytes.

6. Security Hardening and Bake Process

To maintain professional-grade security, Devflow images follow a “Hardened by Default” policy.

7. Process Stability and Shell Semantics

The Bash Requirement

While Devflow core remains shell-agnostic, the generated GitHub Actions workflows utilize /bin/bash for their execution environment. This is a deliberate choice to support:

Reliable Termination

To prevent “zombie” processes or CLI hangs during shutdown (especially when help is printed), devflow-cli implements an explicit std::process::exit(0) immediately after printing help. This ensures that any background threads or file handles are forcibly closed by the OS, providing an instant return to the user prompt.