Skip to content

[T-043] Provenance manifest builder (manifest.json, schema v1) #88

Closed

Description

@CodewithJha

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

Implements FR-REP-002 · PR-08

Branch feat/t-043-provenance-manifest-builder-schema-v1 — one task = one branch = one PR (doc 32 §6)

Summary

Implement runner/manifest.py ManifestBuilder (Builder pattern) producing the manifest of doc 21 §4: code git SHA/dirty flag, uv.lock hash, backend image digest/versions, space/task/SUT hashes, scenario, all derived seeds, materialised file hashes, config snapshot, hashed host info, timing.

Context / motivation

Every run must be reproducible and auditable (TM-12, TM-15); replays and bundle imports read this file.

Scope

In scope

  • schemas/manifest.schema.json.
  • Stored as artefact and in runs.manifest jsonb.
  • Host names hashed; only relative paths.

Implementation guidance

  • Git SHA injected at build time (ROBOPROBE_GIT_SHA build arg / package metadata), never shelling out to git at runtime in containers.
  • 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

  • Manifest validates against schema for k2d runs.
  • No absolute host paths or raw hostnames inside.
  • Config snapshot contains the resolved oracle thresholds and backend settings.
  • 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/runner/test_manifest.py.

Dependencies

Blocked by: #80 (T-040a)

Blocks: #92 (T-044), #140 (T-078b)

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/manifest.py
  • schemas/manifest.schema.json

Independent module; worker calls it via one hook.

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-043 (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 21 §4 · doc 21 §2 · ADR-0014 · doc 31 §3

Requirements: FR-REP-002 · PR-08 (traceability: doc 28)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreDomain core, plugin registry, shared typesarea:runnerQueue, workers, campaign orchestrationmilestone:M3M3 — Oracles + runner + storepriority: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