Repository navigation
Description
Task
T-035b· Milestone M2 — Scenario + kinematic2d · Size S · Priority P0 · Epic #2Implements FR-RUN-006 · FR-SCN-005
Branch
feat/t-035b-kinematic2dbackend-adapter-materialize-run-episode— one task = one branch = one PR (doc 32 §6)
Summary
Wrap the k2d episode in the SimulatorBackend port: deterministic materialize (world dict + resolved obstacle pose written as JSON to the workdir), run_episode writing trace.parquet + episode.log, cooperative cancel, capabilities (deterministic=True).
Context / motivation
Makes kinematic2d usable by the worker, CLI and experiments through the same interface as Gazebo.
Scope
In scope
backends/kinematic2d/backend.py; entry pointroboprobe.backends: kinematic2d.- Infra errors returned in
EpisodeResult.infra_error, never raised (contract). backend_metaincludesk2d_model_version.
Implementation guidance
- Check
assert_supportsfor enabled params; unsupported ⇒ error at campaign creation, not at runtime. - 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
- Materialising the same scenario twice yields byte-identical files (FR-SCN-005).
- Backend contract suite (T-035d) passes.
- Cancel stops within 10 s (actually ≪ 1 s).
- 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/unit/backends/kinematic2d/test_backend.py.
Dependencies
Blocked by: #54 (T-033d), #48 (T-035a)
Blocks: #78 (T-034), #94 (T-046)
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/backends/kinematic2d/backend.py- backend/pyproject.toml (entry point line)
Small adapter.
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-035b (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 §2.2 · doc 10 §7 · doc 18 §4.3
Requirements: FR-RUN-006 · FR-SCN-005 (traceability: doc 28)
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsBacklog
Activity
roboprobe.bootstrap) and plugin entry-point registries #94