Enhance Stage Mismatch Handling and Roadmap Slot Purging
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 44s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m15s

- Introduced `_purge_stage_mismatch_roadmap_slots` to clear slots with persistent stage mismatches, improving the relevance of exercise suggestions.
- Updated `collect_gap_fill_specs` to handle stage mismatch issues more effectively, providing clearer rationale and title hints for off-topic exercises.
- Modified `_filter_learning_goal_candidate_ids` to enforce stricter filtering criteria, ensuring only relevant candidates are considered.
- Enhanced `rematch_roadmap_slots` to incorporate slot assignment history, preventing conflicts with previously assigned exercises.
- Bumped version to 0.8.230 to reflect the new features and improvements.
This commit is contained in:
Lars committed 2026-06-12 07:57:19 +02:00
1 parent 8a4be795f4
commit d448c3191f
6 files changed
+201 -35

No files matched your search

+13
View File
@@ -116,6 +116,7 @@ def rematch_roadmap_slots(
rematch_reasons: Mapping[int, str],
match_slot_fn,
rejected_by_major: Optional[Mapping[int, Set[int]]] = None,
slot_assignment_history: 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.
@@ -180,6 +181,18 @@ def rematch_roadmap_slots(
)
reason = str(rematch_reasons.get(int(major_idx)) or "rematch_slot")
if new_step:
try:
new_eid = int(new_step.get("exercise_id") or 0)
except (TypeError, ValueError):
new_eid = 0
hist = (
slot_assignment_history.get(int(major_idx), set())
if slot_assignment_history
else set()
)
if new_eid > 0 and new_eid in hist:
new_step = None
if new_step:
steps_by_major[int(major_idx)] = new_step
rematch_log.append(