Skip to content

[T-103] k2d dense reference set (20 000 Sobol runs) and GT mode labelling tool #128

Closed

Description

@CodewithJha

Task T-103 · Milestone M6 — Analysis + risk · Size M · Priority P1 · Epic #6

Implements FR-EXP-001 · FR-SIM-002

Branch spike/t-103-k2d-dense-reference-set-20 — one task = one branch = one PR (doc 32 §6)

Summary

Generate reference/warehouse_v1_k2d.parquet (scrambled Sobol, seed experiments.reference_set.seed), cluster its failures with HDBSCAN, review & map clusters to GT-A…GT-D (+ emergent), and store the labelled reference artefact with its hash.

Context / motivation

MET-02, MET-04(b) and MET-08 on kinematic2d are computed against this reference (doc 19 §3).

Scope

In scope

  • scripts/build_reference_set.py (parallel workers, resumable).
  • scripts/label_reference_modes.py producing reference/warehouse_v1_k2d_modes.json + a short evidence note with plots.

Implementation guidance

  • Record the artefact sha256 in docs/evidence/T-103-reference-set.md; regenerate if k2d_model_version changes.
  • 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).

  • experiments.reference_set.n
  • experiments.reference_set.seed

Acceptance criteria

  • Reference set reproducible (hash equal on rerun).
  • Each GT mode present with documented size; emergent modes recorded.
  • 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

  • Small-n smoke test of the scripts.

Dependencies

Blocked by: #78 (T-034), #109 (T-102b), #127 (T-070b)

Blocks: #208 (T-105b)

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/build_reference_set.py
  • scripts/label_reference_modes.py
  • docs/evidence/T-103-reference-set.md

Compute-heavy; run on a spare machine while M5 proceeds.

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-103 (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 19 §3 · doc 09 §5.5 · doc 10 §7.2

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

Activity

  1. added
    type:researchTime-boxed spike / investigation
    area:simulatorSimulator backends (kinematic2d, Gazebo adapter)
    area:evalEvaluation campaigns and success criteria
    priority:P1Required for milestone exit
    taskChild task of a milestone epic
    on Nov 19, 2026
  2. CodewithJha commented on Nov 22, 2026

    @CodewithJha
    OwnerAuthor

    Shipped on main (merged PR).

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:evalEvaluation campaigns and success criteriaarea:simulatorSimulator backends (kinematic2d, Gazebo adapter)milestone:M6M6 — Analysis + riskpriority:P1Required for milestone exitsize:M1-3 daystaskChild task of a milestone epictype:researchTime-boxed spike / investigation

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions