Repository navigation
Description
Task
T-036a· Milestone M3 — Oracles + runner + store · Size S · Priority P0 · Epic #3Implements FR-ORC-001 · FR-ORC-003
Branch
feat/t-036a-oracle-base-class-oracle-registry— one task = one branch = one PR (doc 32 §6)
Summary
Implement oracles/base.py (Oracle ABC with id, failure_class, severity, PLUGIN_API_VERSION, evaluate(trace, task) -> OracleResult), oracles/registry.py (entry-point group roboprobe.oracles) and oracles/infra.py (InfraCheck, doc 08 §3.8).
Context / motivation
Infrastructure problems must never be counted as robot failures (doc 08 §1 principle 4). InfraCheck runs first and yields INVALID/F-INFRA.
Scope
In scope
clip(z)helper and shared vectorised utilities (oracles/_signals.py).- InfraCheck rules: backend
infra_error; trace duration <min(5 s, T_max)while not at goal; sampling gap >max_gap_s; mean RTF <min_rtf; Nav2 not ACTIVE withinstartup_timeout_s; spawn pose error >spawn_tolerance_m. - Oracle contract suite
tests/contract/oracles/(robustness ∈ [−1,1]; purity — no I/O, enforced by patchingopen/socket).
Implementation guidance
- Thresholds come from
core.settings.OracleThresholds(doc 27 §4.6), passed in the constructor. No module-level numeric literals except mathematical constants. - 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.
Configuration keys
From the configuration reference (doc 27). Keys marked (new) must be added to the typed settings models and appear in the generated reference (T-003c).
oracles.infra.max_gap_soracles.infra.min_rtforacles.infra.startup_timeout_soracles.infra.spawn_tolerance_m
Acceptance criteria
- InfraCheck flags each condition with a distinct reason code.
- Oracle contract suite exists and runs against registered oracles.
- Registry rejects plugin API mismatch.
- 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/oracles/test_infra.py,tests/contract/oracles/test_oracle_contract.py.
Dependencies
Blocked by: #15 (T-002a), #19 (T-003a), #48 (T-035a)
Blocks: #70 (T-036b), #71 (T-036c), #72 (T-037a), #73 (T-037b), #74 (T-037c), #75 (T-038a), #76 (T-038b), #205 (T-098)
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/oracles/base.pybackend/src/roboprobe/oracles/registry.pybackend/src/roboprobe/oracles/infra.pybackend/src/roboprobe/oracles/_signals.pybackend/tests/contract/oracles/**
Interface task for the oracle stream; individual oracles follow in parallel.
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-036a (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 §6 · doc 08 §1 · doc 08 §3.8 · doc 08 §4 · doc 18 §4.3 · ADR-0006
Requirements: FR-ORC-001 · FR-ORC-003 (traceability: doc 28)
External:
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsBacklog
Activity
oracles/clearance.py) #70oracles/goal.py) #71oracles/progress.py) #72oracles/localization.py) #73oracles/nav.py) #74oracles/stability.py) #75oracles/oscillation.py) #76sim-nightly.ymlworkflow #205