Enhance Roadmap Slot Matching and Gap Offer Logic
Deploy Development / deploy (push) Successful in 45s
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 1m22s
Deploy Development / deploy (push) Successful in 45s
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 1m22s
- Introduced `_roadmap_step_passes_post_match_gate` to validate steps after matching, ensuring only relevant steps proceed. - Enhanced `_enrich_roadmap_unfilled_gap_offers` to generate AI gap offers for unfilled roadmap slots, improving exercise suggestions. - Updated `suggest_progression_path` to incorporate new gap offer logic and streamline the handling of roadmap steps. - Refined frontend logic in `applyMatchStepsToSlots` to better manage step assignments and improve clarity in slot handling. - Bumped version to 0.8.231 to reflect the new features and improvements.
This commit is contained in:
1 parent
d448c3191f
commit
63c99b0ec5
5 files changed
+245
-93
No files matched your search
@@ -183,3 +183,43 @@ def test_rematch_excludes_replaced_exercise_from_used():
|
||||
match_slot_fn=_fake_match,
|
||||
)
|
||||
assert 99 in seen_used[0]
|
||||
|
||||
|
||||
def test_rematch_unfilled_leaves_placeholder_step():
|
||||
specs = _stage_specs()
|
||||
ctx = ProgressionRoadmapContext(
|
||||
goal_query="Mae Geri",
|
||||
max_steps=3,
|
||||
stage_specs=specs,
|
||||
)
|
||||
steps = [
|
||||
{"exercise_id": 10, "title": "OK", "roadmap_major_step_index": 0},
|
||||
{"exercise_id": 99, "title": "Falsch", "roadmap_major_step_index": 1},
|
||||
]
|
||||
|
||||
def _no_match(cur, *, stage_spec, **kwargs):
|
||||
return None, stage_spec
|
||||
|
||||
ordered, log, unfilled = rematch_roadmap_slots(
|
||||
None,
|
||||
tenant=None,
|
||||
body=None,
|
||||
goal_query="Mae Geri",
|
||||
max_steps=3,
|
||||
semantic_brief=None,
|
||||
path_target_profile=None,
|
||||
path_intent="",
|
||||
roadmap_ctx=ctx,
|
||||
steps=steps,
|
||||
slot_indices={1},
|
||||
rematch_reasons={1: "stage_mismatch"},
|
||||
match_slot_fn=_no_match,
|
||||
)
|
||||
|
||||
assert len(ordered) == 2
|
||||
slot1 = ordered[1]
|
||||
assert slot1["exercise_id"] is None
|
||||
assert slot1["slot_status"] == "unfilled"
|
||||
assert slot1["roadmap_match_source"] == "unfilled"
|
||||
assert log[0]["action"] == "rematch_unfilled"
|
||||
assert len(unfilled) == 1
|
||||
Reference in new issue
Block a user