Goal: Ship Containust as a production-ready container runtime Date: 2026-04-02 Standards: 90%+ test coverage for library crates, zero clippy warnings, no banned patterns
- Functions: max 25 lines
- Files: max 300 lines
- Module public items: max 10
- Function params: max 4 (else use struct)
- Banned:
.unwrap()in lib crates,panic!,todo!,dbg!,print!,println! - Naming:
snake_casemodules/fn,PascalCasetypes,SCREAMING_SNAKE_CASEconstants - Error handling:
Result<T, E>,thiserror, no.unwrap()— use?with.map_err() - unsafe: requires
// SAFETY:comment with justification - Immutability: create new objects, never mutate in-place
- CI:
cargo check,cargo fmt --check,cargo clippy -- -D warnings,cargo test,cargo deny check - Test naming:
<unit>_<scenario>_<expected_outcome>()
| Crate | Tests | Source Files | Needs Tests |
|---|---|---|---|
| containust-common | 27 | 5 | MINOR — constants.rs missing tests |
| containust-core | 4 | 14 | MAJOR — namespaces, cgroups, filesystem, capability |
| containust-compose | 66 | 8 | MODERATE — parser/mod.rs, resolver, distroless, import |
| containust-image | 31 | 6 | MODERATE — registry, source, fuse missing |
| containust-runtime | 45 | 10 | MAJOR — backend/mod.rs, engine, container edge cases |
| containust-ebpf | 22 | 5 | MODERATE — tracer, file/net monitor, programs |
| containust-sdk | 5 | 3 | MODERATE — builder, graph_resolver, event listener |
| containust-tui | 3 | 6 | MODERATE — app, dashboard, container views |
| containust-cli | 0 | 10 | CRITICAL — all commands untested |
-
1.1Create.github/workflows/ci.yml- Jobs: check, fmt, clippy, test, deny
- Matrix: Linux (full), macOS (check+test), Windows (check+test)
- Trigger: push/PR to main
-
1.2Createdeny.toml(cargo-deny config) -
1.3Addcargo-denyaction to CI -
1.4Verify CI config validity locally
-
2.1Testcommands/run.rs— ctst run command parsing -
2.2Testcommands/ps.rs— list containers -
2.3Testcommands/stop.rs— stop container -
2.4Testcommands/exec.rs— exec into container -
2.5Testcommands/logs.rs— container log retrieval -
2.6Testcommands/images.rs— image management -
2.7Testcommands/build.rs— build command -
2.8Testcommands/plan.rs— plan command -
2.9Testcommands/convert.rs— docker-compose converter -
2.10Test CLI integration (subcommand routing via clap)
-
3.1Testlib.rs— module exports, public API -
3.2Testnamespace/mod.rs— namespace flag combinations -
3.3Testnamespace/pid.rs— PID namespace creation -
3.4Testnamespace/mount.rs— mount namespace -
3.5Testnamespace/network.rs— network namespace -
3.6Testnamespace/uts.rs— UTS namespace (hostname) -
3.7Testnamespace/ipc.rs— IPC namespace -
3.8Testnamespace/user.rs— user namespace -
3.9Testcgroup/mod.rs— cgroup v2 manager -
3.10Testcgroup/cpu.rs— CPU resource limits -
3.11Testcgroup/memory.rs— memory limits -
3.12Testcgroup/io.rs— I/O limits -
3.13Testfilesystem/overlayfs.rs— overlay mount -
3.14Testfilesystem/pivot_root.rs— pivot_root -
3.15Testfilesystem/mount.rs— bind mounts -
3.16Testcapability.rs— capability dropping
-
4.1Testbackend/mod.rs— backend detection -
4.2Testbackend/linux.rs— Linux native backend -
4.3Testbackend/vm/mod.rs— VM backend -
4.4Testbackend/vm/initramfs.rs— initramfs builder -
4.5Testcontainer.rs— state machine transitions -
4.6Testengine.rs— deployment orchestration
-
5.1Fixcontainust-runtime/tests/e2e_test.rs -
5.2Createtests/integration/directory structure -
5.3Integration test: parse + validate.ctstfile -
5.4Integration test: full deploy order resolution -
5.5Integration test: SDK lifecycle (create → start → stop)
-
6.1ctst vm start— manual QEMU VM start -
6.2ctst vm stop— stop QEMU VM -
6.3Add to CLI command registration inmain.rs
-
7.1Tests for--features ebpfin containust-ebpf -
7.2Test program loading/unloading lifecycle -
7.3Test tracer start/stop
-
8.1Testbuilder.rs— ContainerBuilder fluent API -
8.2Testgraph_resolver.rs— GraphResolver -
8.3Testevent.rs— EventListener
-
9.1Testapp.rs— app state machine -
9.2Testui/dashboard.rs— dashboard rendering -
9.3Testui/container.rs— container detail view
-
10.1containust-commonconstants.rstests -
10.2containust-composedistroless.rstests -
10.3containust-composeimport.rstests -
10.4containust-imageregistry.rstests -
10.5containust-imagefuse.rstests -
10.6containust-runtimecontainer.rsedge cases
-
11Distribution packaging (deb, rpm, Homebrew) -
12Publish to crates.io -
13Code coverage reporting with badges -
14Benchmark suite -
15Example templates -
16API stability audit
| Track | Sub-agent | Scope | Tasks |
|---|---|---|---|
| CLI Agent | general-purpose |
containust-cli tests | Task #8: 2.1-2.10 |
| Core Agent | general-purpose |
containust-core tests | Task #9: 3.1-3.16 |
| Runtime+VM Agent | general-purpose |
runtime backend + vm cmds | Task #10: 4.1-4.6, 6.1-6.3 |
| Tests+Integration | general-purpose |
SDK, TUI, eBPF, E2E | Task #11: 5.1-5.5, 7.1-7.3, 8.1-8.3, 9.1-9.3 |
| Infra Agent | general-purpose |
CI/CD + deny | Task #12: 1.1-1.4 |