Skip to content

[T-059b] S-PROBE refine planner: nominal-ward bisection + Gaussian perturbations per new mode #118

Closed

Description

@CodewithJha

Task T-059b · Milestone M5 — Intelligent selection · Size S · Priority P0 · Epic #5

Implements FR-SEL-003 · FR-ANA-002

Branch feat/t-059b-s-probe-refine-planner-nominal — one task = one branch = one PR (doc 32 §6)

Summary

Implement selection/refine.py: for each new mode medoid m, a plan of refine_bisect_steps bisection points on the segment nominal→m (adaptively choosing halves by observed verdict) to find the failing point closest to nominal, then refine_perturb_n perturbations N(m, std²I) clipped to the cube.

Context / motivation

Produces the 'minimal reproducing scenario' and supports the interaction test (doc 09 §6).

Scope

In scope

  • RefinePlan serialisable; next_point(observations); oldest-unrefined-mode-first policy.

Implementation guidance

  • Pure NumPy; uses only verdicts of its own refine proposals (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.

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).

  • selection.probe.refine_bisect_steps
  • selection.probe.refine_perturb_n
  • selection.probe.refine_perturb_std

Acceptance criteria

  • On a synthetic step function the bisection converges to the boundary within tolerance 2^-steps.
  • Perturbations deterministic with seed and in bounds.
  • 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/selection/test_refine.py.

Dependencies

Blocked by: #84 (T-050a)

Blocks: #119 (T-059c)

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/refine.py

Parallel with T-059a.

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-059b (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 §6.1 · doc 09 §3.3 · doc 09 §6

Requirements: FR-SEL-003 · FR-ANA-002 (traceability: doc 28)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:selectionScenario selection strategies (BO, LSE, PROBE, baselines)milestone:M5M5 — Intelligent selectionpriority: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