Skip to content

[T-019] Golden trace fixtures for oracle tests (straight, collision, graze, stuck, AMCL jump, abort, spin) #69

Closed

Description

@CodewithJha

Task T-019 · Milestone M3 — Oracles + runner + store · Size S · Priority P0 · Epic #3

Implements FR-ORC-001 · FR-ORC-006

Branch test/t-019-golden-trace-fixtures-for-oracle — one task = one branch = one PR (doc 32 §6)

Summary

Create the hand-crafted golden traces of doc 08 §7 in backend/tests/fixtures/traces/*.parquet, generated by a reviewable script, together with an expected.yaml listing the expected verdict/class/ρ per oracle (±1e-9).

Context / motivation

Oracle tasks (T-036a…T-038b) can then be implemented in parallel against the same fixtures, and the expected values double as executable documentation of doc 08 §3.

Scope

In scope

  • scripts/make_golden_traces.py building traces analytically (no simulator).
  • Fixtures: straight_pass, head_on_collision, graze_near_miss, stuck_in_corner, amcl_jump, nav_abort, spin_instability, oscillation.
  • tests/fixtures/traces/expected.yaml with expected r per oracle computed by hand formulas (document the derivation inline).

Implementation guidance

  • Expected values must be computed independently from the oracle implementations (hand formulas in the script), otherwise the tests are circular.
  • 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

  • Script is deterministic; fixtures committed.
  • Each fixture's expected values documented with the formula used.
  • 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/oracles/test_golden_fixtures_load.py (fixtures load & validate).

Dependencies

Blocked by: #47 (T-018), #25 (T-017)

Blocks: #70 (T-036b), #71 (T-036c), #72 (T-037a), #73 (T-037b), #74 (T-037c), #75 (T-038a), #76 (T-038b)

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:

  • scripts/make_golden_traces.py
  • backend/tests/fixtures/traces/**

Unblocks all oracle tasks.

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-019 (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 08 §7 · doc 08 §3 · doc 18 §4.2

Requirements: FR-ORC-001 · FR-ORC-006 (traceability: doc 28)

Activity

  1. added
    type:testTest suites and test infrastructure
    area:oracleVerdict oracles / safety properties
    priority:P0Critical path / blocks others
    milestone:M3M3 — Oracles + runner + store
    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:oracleVerdict oracles / safety propertiesmilestone:M3M3 — Oracles + runner + storepriority:P0Critical path / blocks otherssize:S<= 1 daytaskChild task of a milestone epictype:testTest suites and test infrastructure

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions