Enhance Rematch Logic and Slot Filtering in Planning Path
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 45s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m13s

- Introduced `filter_rematch_slot_indices` to exclude preserved slots from rematching, improving the accuracy of slot assignments.
- Added `_slot_priority_for_rematch` to prioritize existing slot assignments during rematching, enhancing the robustness of the rematch process.
- Updated `_run_roadmap_rematch_loop` to utilize the new filtering and prioritization logic, ensuring better handling of rematch scenarios.
- Enhanced tests in `test_planning_path_rematch.py` to validate the new filtering behavior and ensure correct exercise restoration when not rejected.
- Bumped version to reflect the new features and improvements.
This commit is contained in:
Lars committed 2026-06-12 12:33:00 +02:00
1 parent f3710ac0a1
commit b8f65e04c5
4 files changed
+223 -6

No files matched your search

@@ -27,6 +27,7 @@ from planning_exercise_profiles import PlanningTargetProfile
from planning_path_qa_pipeline import run_multistage_path_qa
from planning_path_rematch import (
collect_rematch_slot_indices,
filter_rematch_slot_indices,
prune_stripped_after_rematch,
rematch_roadmap_slots,
)
@@ -1709,6 +1710,12 @@ def _run_roadmap_rematch_loop(
slot_indices.add(int(midx))
if int(midx) not in rematch_reasons:
rematch_reasons[int(midx)] = "refine_stage_spec"
slot_indices = filter_rematch_slot_indices(
steps,
slot_indices,
stripped_off_topic=current_stripped if round_idx == 0 else [],
off_topic_steps=off_topic_before_strip if round_idx == 0 and use_initial_off_topic else [],
)
if not slot_indices:
break