Skip to content

[T-027] TaskSpec loader for tasks/warehouse_delivery_v1.yaml (time-limit formula, TBD guard) #40

Closed

Description

@CodewithJha

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

Implements FR-SIM-001 · FR-SIM-003

Branch feat/t-027-taskspec-loader-for-time-limit — one task = one branch = one PR (doc 32 §6)

Summary

Implement scenario/task.py loading the task file of doc 06 §7 into core.types.TaskSpec, computing T_max = min(cap, factor · L_path / max_speed + offset), and failing on any TBD_T091/TBD_T092 placeholder when strict=True.

Context / motivation

Both backends and the oracles depend on the task definition (start, goal, tolerances, nominal path, injected obstacle). The placeholders are filled by the Gazebo tasks T-091/T-092; kinematic2d uses a provisional goal until then.

Scope

In scope

  • tasks/warehouse_delivery_v1.yaml (doc 06 §7) and tasks/paths/warehouse_delivery_v1.csv (provisional polyline, replaced in T-092).
  • load_task(path, *, strict) -> TaskSpec; time_limit_s(task, max_speed) -> float.
  • CI check script scripts/check_no_tbd.py (wired into CI later) that fails if TBD remains in release builds.

Implementation guidance

  • Provisional goal: pick a pose ~12–15 m from Dock A through one aisle on the k2d world (T-032) and mark it provisional: true; T-092 will replace it with Gazebo-verified coordinates. Document this in the PR.
  • 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

  • Task loads; T_max formula unit-tested incl. cap at 120 s.
  • Strict mode rejects TBD placeholders with a clear message.
  • 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/scenario/test_task.py.

Dependencies

Blocked by: #32 (T-020a), #15 (T-002a)

Blocks: #41 (T-028), #50 (T-032)

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/scenario/task.py
  • tasks/warehouse_delivery_v1.yaml
  • tasks/paths/warehouse_delivery_v1.csv
  • scripts/check_no_tbd.py

Parallel with T-021–T-026.

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-027 (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 06 §1 · doc 06 §7 · doc 10 §7.1

Requirements: FR-SIM-001 · FR-SIM-003 (traceability: doc 28)

Activity

  1. added
    area:scenarioScenario space, sampling, scenario files
    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:scenarioScenario space, sampling, scenario filesmilestone: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