|
| 1 | +# Containust — Product Readiness Work Tracker |
| 2 | + |
| 3 | +> **Goal**: Ship Containust as a production-ready container runtime |
| 4 | +> **Date**: 2026-04-02 |
| 5 | +> **Standards**: 90%+ test coverage for library crates, zero clippy warnings, no banned patterns |
| 6 | +
|
| 7 | +## Strict Coding Rules (ALL sub-agents must follow) |
| 8 | +- **Functions**: max 25 lines |
| 9 | +- **Files**: max 300 lines |
| 10 | +- **Module public items**: max 10 |
| 11 | +- **Function params**: max 4 (else use struct) |
| 12 | +- **Banned**: `.unwrap()` in lib crates, `panic!`, `todo!`, `dbg!`, `print!`, `println!` |
| 13 | +- **Naming**: `snake_case` modules/fn, `PascalCase` types, `SCREAMING_SNAKE_CASE` constants |
| 14 | +- **Error handling**: `Result<T, E>`, `thiserror`, no `.unwrap()` — use `?` with `.map_err()` |
| 15 | +- **unsafe**: requires `// SAFETY:` comment with justification |
| 16 | +- **Immutability**: create new objects, never mutate in-place |
| 17 | +- **CI**: `cargo check`, `cargo fmt --check`, `cargo clippy -- -D warnings`, `cargo test`, `cargo deny check` |
| 18 | +- **Test naming**: `<unit>_<scenario>_<expected_outcome>()` |
| 19 | + |
| 20 | +--- |
| 21 | + |
| 22 | +## Current Test Status (Baseline) |
| 23 | + |
| 24 | +| Crate | Tests | Source Files | Needs Tests | |
| 25 | +|---|---|---|---| |
| 26 | +| containust-common | 27 | 5 | MINOR — constants.rs missing tests | |
| 27 | +| containust-core | 4 | 14 | MAJOR — namespaces, cgroups, filesystem, capability | |
| 28 | +| containust-compose | 66 | 8 | MODERATE — parser/mod.rs, resolver, distroless, import | |
| 29 | +| containust-image | 31 | 6 | MODERATE — registry, source, fuse missing | |
| 30 | +| containust-runtime | 45 | 10 | MAJOR — backend/mod.rs, engine, container edge cases | |
| 31 | +| containust-ebpf | 22 | 5 | MODERATE — tracer, file/net monitor, programs | |
| 32 | +| containust-sdk | 5 | 3 | MODERATE — builder, graph_resolver, event listener | |
| 33 | +| containust-tui | 3 | 6 | MODERATE — app, dashboard, container views | |
| 34 | +| containust-cli | 0 | 10 | CRITICAL — all commands untested | |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## TIER 1 — Critical (Show-stoppers) |
| 39 | + |
| 40 | +### 1. CI/CD Pipeline |
| 41 | +- [ ] `1.1` Create `.github/workflows/ci.yml` |
| 42 | + - Jobs: check, fmt, clippy, test, deny |
| 43 | + - Matrix: Linux (full), macOS (check+test), Windows (check+test) |
| 44 | + - Trigger: push/PR to main |
| 45 | +- [ ] `1.2` Create `deny.toml` (cargo-deny config) |
| 46 | +- [ ] `1.3` Add `cargo-deny` action to CI |
| 47 | +- [ ] `1.4` Verify CI config validity locally |
| 48 | + |
| 49 | +### 2. containust-cli Tests (CRITICAL — 0 tests, 10 commands) |
| 50 | +- [ ] `2.1` Test `commands/run.rs` — ctst run command parsing |
| 51 | +- [ ] `2.2` Test `commands/ps.rs` — list containers |
| 52 | +- [ ] `2.3` Test `commands/stop.rs` — stop container |
| 53 | +- [ ] `2.4` Test `commands/exec.rs` — exec into container |
| 54 | +- [ ] `2.5` Test `commands/logs.rs` — container log retrieval |
| 55 | +- [ ] `2.6` Test `commands/images.rs` — image management |
| 56 | +- [ ] `2.7` Test `commands/build.rs` — build command |
| 57 | +- [ ] `2.8` Test `commands/plan.rs` — plan command |
| 58 | +- [ ] `2.9` Test `commands/convert.rs` — docker-compose converter |
| 59 | +- [ ] `2.10` Test CLI integration (subcommand routing via clap) |
| 60 | + |
| 61 | +### 3. containust-core Tests (MAJOR — 14 source files) |
| 62 | +- [ ] `3.1` Test `lib.rs` — module exports, public API |
| 63 | +- [ ] `3.2` Test `namespace/mod.rs` — namespace flag combinations |
| 64 | +- [ ] `3.3` Test `namespace/pid.rs` — PID namespace creation |
| 65 | +- [ ] `3.4` Test `namespace/mount.rs` — mount namespace |
| 66 | +- [ ] `3.5` Test `namespace/network.rs` — network namespace |
| 67 | +- [ ] `3.6` Test `namespace/uts.rs` — UTS namespace (hostname) |
| 68 | +- [ ] `3.7` Test `namespace/ipc.rs` — IPC namespace |
| 69 | +- [ ] `3.8` Test `namespace/user.rs` — user namespace |
| 70 | +- [ ] `3.9` Test `cgroup/mod.rs` — cgroup v2 manager |
| 71 | +- [ ] `3.10` Test `cgroup/cpu.rs` — CPU resource limits |
| 72 | +- [ ] `3.11` Test `cgroup/memory.rs` — memory limits |
| 73 | +- [ ] `3.12` Test `cgroup/io.rs` — I/O limits |
| 74 | +- [ ] `3.13` Test `filesystem/overlayfs.rs` — overlay mount |
| 75 | +- [ ] `3.14` Test `filesystem/pivot_root.rs` — pivot_root |
| 76 | +- [ ] `3.15` Test `filesystem/mount.rs` — bind mounts |
| 77 | +- [ ] `3.16` Test `capability.rs` — capability dropping |
| 78 | + |
| 79 | +### 4. containust-runtime Tests (MAJOR — engine crate) |
| 80 | +- [ ] `4.1` Test `backend/mod.rs` — backend detection |
| 81 | +- [ ] `4.2` Test `backend/linux.rs` — Linux native backend |
| 82 | +- [ ] `4.3` Test `backend/vm/mod.rs` — VM backend |
| 83 | +- [ ] `4.4` Test `backend/vm/initramfs.rs` — initramfs builder |
| 84 | +- [ ] `4.5` Test `container.rs` — state machine transitions |
| 85 | +- [ ] `4.6` Test `engine.rs` — deployment orchestration |
| 86 | + |
| 87 | +### 5. Integration/E2E Tests |
| 88 | +- [ ] `5.1` Fix `containust-runtime/tests/e2e_test.rs` |
| 89 | +- [ ] `5.2` Create `tests/integration/` directory structure |
| 90 | +- [ ] `5.3` Integration test: parse + validate `.ctst` file |
| 91 | +- [ ] `5.4` Integration test: full deploy order resolution |
| 92 | +- [ ] `5.5` Integration test: SDK lifecycle (create → start → stop) |
| 93 | + |
| 94 | +--- |
| 95 | + |
| 96 | +## TIER 2 — Important (Before first release) |
| 97 | + |
| 98 | +### 6. CLI — vm commands |
| 99 | +- [ ] `6.1` `ctst vm start` — manual QEMU VM start |
| 100 | +- [ ] `6.2` `ctst vm stop` — stop QEMU VM |
| 101 | +- [ ] `6.3` Add to CLI command registration in `main.rs` |
| 102 | + |
| 103 | +### 7. eBPF Feature Testing |
| 104 | +- [ ] `7.1` Tests for `--features ebpf` in containust-ebpf |
| 105 | +- [ ] `7.2` Test program loading/unloading lifecycle |
| 106 | +- [ ] `7.3` Test tracer start/stop |
| 107 | + |
| 108 | +### 8. containust-sdk Tests |
| 109 | +- [ ] `8.1` Test `builder.rs` — ContainerBuilder fluent API |
| 110 | +- [ ] `8.2` Test `graph_resolver.rs` — GraphResolver |
| 111 | +- [ ] `8.3` Test `event.rs` — EventListener |
| 112 | + |
| 113 | +### 9. containust-tui Tests |
| 114 | +- [ ] `9.1` Test `app.rs` — app state machine |
| 115 | +- [ ] `9.2` Test `ui/dashboard.rs` — dashboard rendering |
| 116 | +- [ ] `9.3` Test `ui/container.rs` — container detail view |
| 117 | + |
| 118 | +### 10. Additional Test Coverage (reach 90%) |
| 119 | +- [ ] `10.1` containust-common `constants.rs` tests |
| 120 | +- [ ] `10.2` containust-compose `distroless.rs` tests |
| 121 | +- [ ] `10.3` containust-compose `import.rs` tests |
| 122 | +- [ ] `10.4` containust-image `registry.rs` tests |
| 123 | +- [ ] `10.5` containust-image `fuse.rs` tests |
| 124 | +- [ ] `10.6` containust-runtime `container.rs` edge cases |
| 125 | + |
| 126 | +--- |
| 127 | + |
| 128 | +## TIER 3 — Polish (Post-launch) |
| 129 | +- [ ] `11` Distribution packaging (deb, rpm, Homebrew) |
| 130 | +- [ ] `12` Publish to crates.io |
| 131 | +- [ ] `13` Code coverage reporting with badges |
| 132 | +- [ ] `14` Benchmark suite |
| 133 | +- [ ] `15` Example templates |
| 134 | +- [ ] `16` API stability audit |
| 135 | + |
| 136 | +--- |
| 137 | + |
| 138 | +## Parallel Execution Plan |
| 139 | + |
| 140 | +| Track | Sub-agent | Scope | Tasks | |
| 141 | +|-------|-----------|-------|-------| |
| 142 | +| CLI Agent | `general-purpose` | containust-cli tests | Task #8: 2.1-2.10 | |
| 143 | +| Core Agent | `general-purpose` | containust-core tests | Task #9: 3.1-3.16 | |
| 144 | +| Runtime+VM Agent | `general-purpose` | runtime backend + vm cmds | Task #10: 4.1-4.6, 6.1-6.3 | |
| 145 | +| 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 | |
| 146 | +| Infra Agent | `general-purpose` | CI/CD + deny | Task #12: 1.1-1.4 | |
0 commit comments