Skip to content

[T-035a] SimulatorBackend port, capabilities, EpisodeRequest/Result and entry-point registry #48

Closed

Description

@CodewithJha

Task T-035a · Milestone M2 — Scenario + kinematic2d · Size S · Priority P0 · Epic #2

Implements FR-RUN-006 · NFR-EXT-001 · PR-19

Branch feat/t-035a-simulatorbackend-port-capabilities-episoderequest-result — one task = one branch = one PR (doc 32 §6)

Summary

Define backends/base.py (normative doc 05 §2.1: BackendCapabilities, EpisodeRequest, EpisodeResult, MaterializedScenario, SimulatorBackend Protocol with PLUGIN_API_VERSION) and backends/registry.py (get_backend(name, settings) via importlib.metadata.entry_points(group='roboprobe.backends')).

Context / motivation

This is the swap point that makes the runner simulator-agnostic (Liskov, doc 10 §1). Freezing it early lets k2d, replay and Gazebo backends and the worker be built in parallel.

Scope

In scope

  • Protocol + models exactly as doc 05 §2.1.
  • Registry with clear PluginError for unknown names / API version mismatch.
  • supported_params check helper assert_supports(capabilities, enabled_params) → BACKEND_UNSUPPORTED_PARAM.

Implementation guidance

  • EpisodeRequest.sim_time_budget_s / wall_timeout_s defaults come from WorkerSettings (the literal defaults in doc 05 are illustrative, doc 05 §0).
  • 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

  • Signatures match doc 05 §2.1 exactly.
  • Registry loads a dummy backend registered in a test entry point (use importlib.metadata monkeypatching).
  • Version mismatch raises PluginError.
  • Tests listed below added and green in CI; coverage of new code meets the gate in doc 18 §3.
  • Docs, config reference and CHANGELOG Unreleased updated where behaviour, keys or interfaces changed.
  • Definition of Done (doc 32 §3) satisfied.

Tests required

  • tests/unit/backends/test_registry.py.

Dependencies

Blocked by: #15 (T-002a), #16 (T-002b)

Blocks: #55 (T-035b), #56 (T-035c), #57 (T-035d), #68 (T-036a), #80 (T-040a), #103 (T-052), #202 (T-096b)

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/base.py
  • backend/src/roboprobe/backends/registry.py

Interface task — merge early; afterwards changes require doc 05 update.

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-035a (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 · doc 05 §2.1 · doc 05 §2.2 · doc 10 §1 · doc 10 §10 · ADR-0016

Requirements: FR-RUN-006 · NFR-EXT-001 · PR-19 (traceability: doc 28)

External:

Activity

  1. added
    area:coreDomain core, plugin registry, shared types
    area:simulatorSimulator backends (kinematic2d, Gazebo adapter)
    priority:P0Critical path / blocks others
    milestone:M2M2 — Scenario + kinematic2d
    taskChild task of a milestone epic
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreDomain core, plugin registry, shared typesarea:simulatorSimulator backends (kinematic2d, Gazebo adapter)milestone:M2M2 — Scenario + kinematic2dpriority:P0Critical path / blocks otherssize:S<= 1 daytaskChild task of a milestone epictype:featureNew functionality

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions