Enhance Stage Specification Refinement and Rematch Logic
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 44s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m22s

- Updated `max_rematch_rounds` in `ProgressionPathSuggestRequest` to allow for a maximum of 3 rounds, improving flexibility in rematch processes.
- Introduced `_track_rejected` function to track rejected exercises by major step index, enhancing the rematch logic to account for previously rejected exercises.
- Enhanced `_run_roadmap_rematch_loop` to utilize the new rejection tracking, ensuring better handling of off-topic steps during rematching.
- Improved `detect_off_topic_steps` to incorporate refined scoring and reasoning for stage fit, enhancing the accuracy of off-topic detection.
- Updated `refine_stage_spec_artifact` to merge stage exclusion phrases more effectively, improving the clarity of anti-pattern handling.
- Bumped version to 0.8.228 to reflect the new features and improvements.
This commit is contained in:
Lars committed 2026-06-11 22:11:31 +02:00
1 parent f36a747efa
commit a49987408b
9 files changed
+269 -74

No files matched your search

+4
View File
@@ -115,6 +115,7 @@ def rematch_roadmap_slots(
slot_indices: Set[int],
rematch_reasons: Mapping[int, str],
match_slot_fn,
rejected_by_major: Optional[Mapping[int, Set[int]]] = None,
) -> Tuple[List[Dict[str, Any]], List[Dict[str, Any]], List[Tuple[int, StageSpecArtifact]]]:
"""
Ersetzt nur betroffene Slots; andere Schritte und used-Set bleiben konsistent.
@@ -152,6 +153,9 @@ def rematch_roadmap_slots(
}
if old and old.get("exercise_id") is not None:
used.add(int(old["exercise_id"]))
for rejected_id in rejected_by_major.get(int(major_idx), set()) if rejected_by_major else set():
if rejected_id > 0:
used.add(int(rejected_id))
planned_ids, anchor_id, anchor_variant_id = _context_before_major(
steps_by_major, int(major_idx)
)