Enhance Gap Fill and Rematch Logic in Progression Path
Deploy Development / deploy (push) Successful in 40s
Test Suite / pytest-backend (push) Successful in 47s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 39s
Test Suite / playwright-tests (push) Successful in 1m22s
Deploy Development / deploy (push) Successful in 40s
Test Suite / pytest-backend (push) Successful in 47s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 39s
Test Suite / playwright-tests (push) Successful in 1m22s
- Introduced `_step_neighbors_at_index` to safely retrieve neighboring steps without causing IndexErrors, improving robustness in gap fill specifications. - Updated `collect_gap_fill_specs` to utilize the new neighbor retrieval function, ensuring safe access to adjacent steps during gap fill processing. - Enhanced rematch logic in `_run_roadmap_rematch_loop` to incorporate `max_rematch_rounds`, allowing for controlled iterations during roadmap rematching. - Improved handling of unfilled roadmap slots in `collect_rematch_slot_indices`, ensuring accurate identification of gaps in the progression path. - Added tests to validate the new gap fill handling and rematch logic, ensuring reliability in path suggestion features.
This commit is contained in:
1 parent
de939481ba
commit
df93da9a03
6 files changed
+217
-53
No files matched your search
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Auto-Rematch nach Pfad-QS — betroffene Roadmap-Slots erneut matchen (Phase A).
|
||||
Auto-Rematch nach Pfad-QS — betroffene Roadmap-Slots erneut matchen (Phase A/B).
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -14,6 +14,7 @@ def collect_rematch_slot_indices(
|
||||
off_topic_steps: Sequence[Mapping[str, Any]],
|
||||
optimization_hints: Sequence[Mapping[str, Any]],
|
||||
stage_specs: Sequence[StageSpecArtifact],
|
||||
roadmap_unfilled: Optional[Sequence[Any]] = None,
|
||||
) -> Tuple[Set[int], Dict[int, str]]:
|
||||
"""Major-Step-Indizes für rematch_slot + Begründung pro Slot."""
|
||||
spec_by_pos = list(stage_specs)
|
||||
@@ -64,6 +65,18 @@ def collect_rematch_slot_indices(
|
||||
if midx is not None:
|
||||
_register(midx, str(hint.get("reason") or hint.get("issue") or "rematch_slot"))
|
||||
|
||||
for item in roadmap_unfilled or []:
|
||||
if isinstance(item, (list, tuple)) and len(item) >= 2:
|
||||
idx, spec = item[0], item[1]
|
||||
midx = getattr(spec, "major_step_index", idx)
|
||||
_register(int(midx), "Keine passende Übung für Roadmap-Stufe")
|
||||
elif isinstance(item, dict):
|
||||
midx = _resolve_major(item)
|
||||
if midx is not None:
|
||||
issue = str(item.get("issue") or "roadmap_unfilled")
|
||||
r = (item.get("reasons") or [issue])[0] if item.get("reasons") else issue
|
||||
_register(midx, str(r))
|
||||
|
||||
return indices, reasons
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user