Enhance Roadmap Step Handling and Off-Topic Logic
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 52s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 41s
Test Suite / playwright-tests (push) Successful in 1m51s
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 52s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 41s
Test Suite / playwright-tests (push) Successful in 1m51s
- Improved off-topic step handling by incorporating roadmap major step indices for better indexing and detection. - Refactored `collect_gap_fill_specs` to streamline the insertion logic for off-topic steps, ensuring correct placement based on major step indices. - Introduced `_normalize_roadmap_steps_coverage` function to standardize roadmap steps coverage, enhancing the handling of missing slots. - Added `prune_stripped_after_rematch` function to clean up stripped off-topic steps after rematching, improving the overall rematching process. - Updated tests to validate new rematching and off-topic handling features, ensuring robustness against edge cases. - Incremented application version to reflect these updates.
This commit is contained in:
1 parent
1d94c2ebf1
commit
713a344d17
7 files changed
+269
-53
No files matched your search
@@ -416,7 +416,14 @@ def detect_off_topic_steps(
|
||||
goal_query: Optional[str] = None,
|
||||
) -> List[Dict[str, Any]]:
|
||||
"""Schritte ohne Bezug zum Pfad-Thema (z. B. reine Kraftübungen bei Mae Geri)."""
|
||||
if brief.semantic_strength < 0.55 or len(steps) < 2:
|
||||
if len(steps) < 2:
|
||||
return []
|
||||
roadmap_stage_steps = any(
|
||||
(step.get("roadmap_match_source") == "stage_spec")
|
||||
or (step.get("roadmap_learning_goal") or "").strip()
|
||||
for step in steps
|
||||
)
|
||||
if brief.semantic_strength < 0.55 and not roadmap_stage_steps:
|
||||
return []
|
||||
|
||||
path_anti = resolve_path_anti_patterns(goal_query or "", semantic_brief=brief)
|
||||
|
||||
Reference in new issue
Block a user