Repository navigation
Description
Task
T-045b· Milestone M3 — Oracles + runner + store · Size M · Priority P0 · Epic #3Implements FR-CLI-001 · PR-02
Branch
feat/t-045b-cli-campaign-create-start-pause— one task = one branch = one PR (doc 32 §6)
Summary
Implement cli/campaign.py per doc 05 §11, including campaign run <config.yaml> --inline --workers N that creates, starts and drives a campaign in-process (orchestrator loop + N worker threads) — the CI workhorse.
Context / motivation
Every dashboard action must be possible from the CLI (FR-CLI-001); --inline makes end-to-end campaigns runnable without Docker (NFR-PORT-001).
Scope
In scope
- Campaign config YAML validated by
schemas/campaign.schema.json;configs/campaigns/k2d_random_100.yaml,k2d_probe_smoke.yaml. status --watchlive table (Rich).--fail-on-failure→ exit 3.runs requeue --stuckandqueue statshelpers (runbook RB-05).
Implementation guidance
- Inline mode uses the same composition root as services (T-046) with thread-based workers; no special code paths in runner modules.
- Standards: respect the layering contracts (doc 16 §2) and conventions in doc 34; no hard-coded tunables — thresholds/defaults come from typed settings (doc 27); no magic numbers (ruff
PLR2004); public APIs typed (mypy strict) and documented.
Acceptance criteria
-
roboprobe campaign run configs/campaigns/k2d_random_100.yaml --inline --workers 4completes 100 runs. - Lifecycle commands respect the state machine (T-041c).
- Tests listed below added and green in CI; coverage of new code meets the gate in doc 18 §3.
- Docs, config reference and CHANGELOG
Unreleasedupdated where behaviour, keys or interfaces changed. - Definition of Done (doc 32 §3) satisfied.
Tests required
tests/integration/cli/test_campaign_cmds.py.
Dependencies
Blocked by: #86 (T-041b), #80 (T-040a), #89 (T-045a)
Blocks: #92 (T-044), #96 (T-045c), #99 (T-049), #109 (T-102b)
Parallelization notes
Files / paths owned by this task — avoid editing other paths; shared files (pyproject.toml entry points, cli/main.py, api/routers/__init__.py, router.tsx, docker/compose.yaml, ci.yml) are append-only:
backend/src/roboprobe/cli/campaign.pybackend/src/roboprobe/cli/runs.pyconfigs/campaigns/*.yaml
Independent command modules.
Definition of Done
Per doc 32 §3 and AGENTS.md §5: lint, format, mypy strict and import-linter green; tests added and passing; docs updated; PR template completed with Closes #<this issue>; Conventional Commit messages referencing T-045b (doc 16 §6); commits authored only by the repository owner identity (AGENTS.md §4); CI green; reviewer checklist (doc 32 §5.1) satisfied.
References
Design docs: doc 05 §11 · doc 14 §2 · doc 30 §RB-05 · doc 17 §3
Requirements: FR-CLI-001 · PR-02 (traceability: doc 28)
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsBacklog
Activity
db upgradeandspace validate|register|list#89roboprobe replay <run_id> [--repeats N] [--fresh-seeds]with verdict agreement #92orchestrator,worker,api) and ad-hocrun --scenario,scenario export#96experiment run|report(concurrency-limited) #109