Skip to content

[T-044] Replay: roboprobe replay <run_id> [--repeats N] [--fresh-seeds] with verdict agreement #92

Closed

Description

@CodewithJha

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

Implements FR-REP-001 · NFR-REP-001

Branch feat/t-044-replay-with-verdict-agreement — one task = one branch = one PR (doc 32 §6)

Summary

Implement runner/replay.py creating replay runs (phase=replay, replay_of, priority 10) from a run's manifest and reporting verdict/class agreement; CLI command in cli/replay.py.

Context / motivation

Replays are first-class (doc 21 §2) and feed MET-06 reproducibility.

Scope

In scope

  • Same seed by default; --fresh-seeds derives new seeds derive_seed(seed, 'replay', k).
  • Agreement report (table/JSON).
  • Bit-identical k2d trace check.

Implementation guidance

  • Replays reuse the queue — they are ordinary runs with priority and tags.
  • 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

  • k2d replay with same seed is bit-identical (trace hash).
  • Agreement summary printed; exit code 3 with --fail-on-disagreement.
  • 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/integration/runner/test_replay.py.

Dependencies

Blocked by: #88 (T-043), #91 (T-045b)

Blocks: #153 (T-082c), #209 (T-105c)

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/runner/replay.py
  • backend/src/roboprobe/cli/replay.py

Independent.

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-044 (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 14 §7 · doc 02 §3.11 · doc 19 §3 · doc 03 §UC-06

Requirements: FR-REP-001 · NFR-REP-001 (traceability: doc 28)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliCommand-line interfacearea:runnerQueue, workers, campaign orchestrationmilestone:M3M3 — Oracles + runner + storepriority:P1Required for milestone exitsize:S<= 1 daytaskChild task of a milestone epictype:featureNew functionality

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions