Repository navigation
Description
Task
T-051a· Milestone M3 — Oracles + runner + store · Size XS · Priority P0 · Epic #3Implements FR-SEL-001 · PR-04
Branch
feat/t-051a-s-random-baseline-uniform-prior— one task = one branch = one PR (doc 32 §6)
Summary
Implement RandomStrategy (S-RANDOM) in selection/baselines/random.py: u ~ U[0,1]^d mapped through priors, np.random.default_rng(seed)-derived stream.
Context / motivation
Primary baseline for every hypothesis (H1–H4) and the strategy used by the M3 exit test.
Scope
In scope
- Entry point
S-RANDOM. - Phase
baseline.
Implementation guidance
- Use
PriorSamplerfrom T-023. Stateless beyond the RNG;state_dictstores the number of draws. - 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
- Passes contract suite.
- Marginal KS tests vs prior.
- 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/selection/test_random.py.
Dependencies
Blocked by: #84 (T-050a)
Blocks: #99 (T-049)
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/selection/baselines/random.py
Doc 16 names baselines.py; use a baselines/ package (one module per strategy) so S-RANDOM/LHS/SOBOL/GRID/OFAT can be built in parallel — update doc 16 in the PR.
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-051a (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 07 §3 · doc 07 §2 · doc 19 §1
Requirements: FR-SEL-001 · PR-04 (traceability: doc 28)
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsBacklog
Activity