Implement Roadmap Review Features and Enhance Progression Path Management
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Successful in 47s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m13s
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Successful in 47s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m13s
- Added support for editable major steps in the roadmap, allowing users to modify phase, learning goals, and order before exercise matching. - Introduced a new `roadmap_override` feature to facilitate customized retrieval without re-invoking the roadmap AI. - Updated the `ExerciseProgressionPathBuilder` component to incorporate these new features, enhancing user interaction and flexibility. - Incremented application version to 0.8.207 to reflect these changes.
This commit is contained in:
1 parent
0677663268
commit
f074a8bef0
9 files changed
+514
-76
No files matched your search
@@ -53,10 +53,12 @@ from planning_exercise_suggest import (
|
||||
from planning_progression_roadmap import (
|
||||
MajorStep,
|
||||
ProgressionRoadmapContext,
|
||||
RoadmapOverridePayload,
|
||||
StageSpecArtifact,
|
||||
build_roadmap_unfilled_gap_specs,
|
||||
progression_roadmap_to_api_dict,
|
||||
resolve_step_exercise_kind_filter,
|
||||
roadmap_context_from_override,
|
||||
run_progression_roadmap_pipeline,
|
||||
stage_spec_retrieval_query,
|
||||
)
|
||||
@@ -74,6 +76,8 @@ class ProgressionPathSuggestRequest(BaseModel):
|
||||
include_roadmap_preview: bool = False
|
||||
include_llm_roadmap: bool = True
|
||||
roadmap_first: bool = False
|
||||
roadmap_only: bool = False
|
||||
roadmap_override: Optional[RoadmapOverridePayload] = None
|
||||
progression_graph_id: Optional[int] = Field(default=None, ge=1)
|
||||
exercise_kind_any: Optional[List[str]] = None
|
||||
|
||||
@@ -492,21 +496,29 @@ def suggest_progression_path(
|
||||
cur, goal_query, semantic_brief
|
||||
)
|
||||
|
||||
path_target_profile, first_intent_summary, path_intent = _build_path_target_profile(
|
||||
cur,
|
||||
goal_query=goal_query,
|
||||
semantic_brief=semantic_brief,
|
||||
include_llm_intent=body.include_llm_intent,
|
||||
)
|
||||
|
||||
roadmap_first = bool(body.roadmap_first)
|
||||
include_roadmap = roadmap_first or body.include_roadmap_preview
|
||||
roadmap_only = bool(body.roadmap_only)
|
||||
include_roadmap = roadmap_first or body.include_roadmap_preview or roadmap_only
|
||||
progression_roadmap: Optional[Dict[str, Any]] = None
|
||||
roadmap_ctx: Optional[ProgressionRoadmapContext] = None
|
||||
roadmap_unfilled: List[Tuple[int, StageSpecArtifact]] = []
|
||||
roadmap_gap_offers: List[Dict[str, Any]] = []
|
||||
roadmap_edited = False
|
||||
|
||||
if include_roadmap:
|
||||
if body.roadmap_override is not None:
|
||||
try:
|
||||
roadmap_ctx = roadmap_context_from_override(
|
||||
goal_query,
|
||||
max_steps=max_steps,
|
||||
semantic_brief=semantic_brief,
|
||||
override=body.roadmap_override,
|
||||
)
|
||||
except ValueError as exc:
|
||||
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
||||
progression_roadmap = progression_roadmap_to_api_dict(roadmap_ctx)
|
||||
progression_roadmap["roadmap_edited"] = True
|
||||
roadmap_edited = True
|
||||
max_steps = int(roadmap_ctx.max_steps)
|
||||
roadmap_first = True
|
||||
elif include_roadmap:
|
||||
roadmap_ctx = run_progression_roadmap_pipeline(
|
||||
goal_query,
|
||||
max_steps=max_steps,
|
||||
@@ -516,6 +528,37 @@ def suggest_progression_path(
|
||||
)
|
||||
progression_roadmap = progression_roadmap_to_api_dict(roadmap_ctx)
|
||||
|
||||
if roadmap_only:
|
||||
return {
|
||||
"goal_query": goal_query,
|
||||
"max_steps_requested": max_steps,
|
||||
"steps": [],
|
||||
"step_count": 0,
|
||||
"target_profile_summary": None,
|
||||
"semantic_brief_summary": brief_to_summary_dict(semantic_brief),
|
||||
"semantic_llm_applied": semantic_llm_applied,
|
||||
"query_intent_summary": {},
|
||||
"progression_graph_id": body.progression_graph_id,
|
||||
"path_qa": None,
|
||||
"gap_fill_offers": [],
|
||||
"progression_roadmap": progression_roadmap,
|
||||
"roadmap_first": False,
|
||||
"roadmap_only": True,
|
||||
"roadmap_edited": roadmap_edited,
|
||||
"roadmap_unfilled_count": 0,
|
||||
"retrieval_phase": "roadmap_only",
|
||||
}
|
||||
|
||||
path_target_profile, first_intent_summary, path_intent = _build_path_target_profile(
|
||||
cur,
|
||||
goal_query=goal_query,
|
||||
semantic_brief=semantic_brief,
|
||||
include_llm_intent=body.include_llm_intent,
|
||||
)
|
||||
|
||||
roadmap_unfilled: List[Tuple[int, StageSpecArtifact]] = []
|
||||
roadmap_gap_offers: List[Dict[str, Any]] = []
|
||||
|
||||
used: Set[int] = set()
|
||||
steps: List[Dict[str, Any]] = []
|
||||
planned_ids: List[int] = []
|
||||
@@ -721,6 +764,8 @@ def suggest_progression_path(
|
||||
retrieval_parts.append("gap_fill_offers")
|
||||
if include_roadmap:
|
||||
retrieval_parts.append("roadmap_preview")
|
||||
if roadmap_edited:
|
||||
retrieval_parts.append("roadmap_edited")
|
||||
if roadmap_unfilled:
|
||||
retrieval_parts.append("roadmap_unfilled")
|
||||
|
||||
@@ -738,6 +783,8 @@ def suggest_progression_path(
|
||||
"gap_fill_offers": gap_fill_offers,
|
||||
"progression_roadmap": progression_roadmap,
|
||||
"roadmap_first": roadmap_first,
|
||||
"roadmap_only": False,
|
||||
"roadmap_edited": roadmap_edited,
|
||||
"roadmap_unfilled_count": len(roadmap_unfilled),
|
||||
"retrieval_phase": "+".join(retrieval_parts),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user