Implement Phase E2 Enhancements for Planning Exercise Suggestion
Deploy Development / deploy (push) Successful in 40s
Test Suite / pytest-backend (push) Successful in 51s
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 1m20s
Deploy Development / deploy (push) Successful in 40s
Test Suite / pytest-backend (push) Successful in 51s
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 1m20s
- Introduced path reordering functionality using LLM with `ordered_step_indices`, allowing for dynamic adjustment of exercise progression paths. - Added AI gap filling capabilities, enabling the system to propose new exercises when unbridgeable gaps are detected. - Updated the backend to support new request parameters for path reordering and AI gap filling. - Enhanced frontend components to reflect these new features, including alerts for AI proposals and adjustments in exercise display. - Incremented version to 0.8.187 and updated changelog to document these significant enhancements in planning AI functionality.
This commit is contained in:
1 parent
c6b8c396ad
commit
c2c736dafc
9 files changed
+447
-35
No files matched your search
@@ -1,5 +1,6 @@
|
||||
"""Tests Planungs-KI Phase E — Pfad-QA."""
|
||||
from planning_exercise_path_builder import _pick_best_path_hit
|
||||
from planning_exercise_path_qa import apply_llm_path_reorder
|
||||
|
||||
|
||||
def test_pick_best_path_hit_prefers_semantic_score():
|
||||
@@ -14,3 +15,21 @@ def test_pick_best_path_hit_prefers_semantic_score():
|
||||
def test_pick_best_path_hit_skips_used():
|
||||
hits = [{"id": 1, "title": "A", "score": 0.5, "semantic_score": 0.5}]
|
||||
assert _pick_best_path_hit(hits, {1}) is None
|
||||
|
||||
|
||||
def test_apply_llm_path_reorder_permutation():
|
||||
steps = [{"exercise_id": 1}, {"exercise_id": 2}, {"exercise_id": 3}]
|
||||
reordered, applied, notes = apply_llm_path_reorder(
|
||||
steps,
|
||||
{"ordered_step_indices": [0, 2, 1], "sequence_notes": ["Vertiefung vor Anwendung"]},
|
||||
)
|
||||
assert applied is True
|
||||
assert [s["exercise_id"] for s in reordered] == [1, 3, 2]
|
||||
assert notes
|
||||
|
||||
|
||||
def test_apply_llm_path_reorder_invalid_ignored():
|
||||
steps = [{"exercise_id": 1}, {"exercise_id": 2}]
|
||||
reordered, applied, _ = apply_llm_path_reorder(steps, {"ordered_step_indices": [0, 0]})
|
||||
assert applied is False
|
||||
assert reordered == steps
|
||||
Reference in new issue
Block a user