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
@@ -750,12 +750,14 @@ export function applyMatchStepsToSlots(draft, apiSteps) {
|
||||
siblings: [...(slot.siblings || [])],
|
||||
}))
|
||||
|
||||
const touchedMajors = new Set()
|
||||
for (const step of steps) {
|
||||
if (step.roadmap_major_step_index == null || !Number.isFinite(Number(step.roadmap_major_step_index))) {
|
||||
continue
|
||||
}
|
||||
const idx = Number(step.roadmap_major_step_index)
|
||||
if (idx < 0 || idx >= nextSlots.length) continue
|
||||
touchedMajors.add(idx)
|
||||
|
||||
const isProposal = Boolean(step.is_ai_proposal) || step.exercise_id == null
|
||||
if (isProposal) {
|
||||
@@ -773,6 +775,12 @@ export function applyMatchStepsToSlots(draft, apiSteps) {
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < nextSlots.length; i += 1) {
|
||||
if (!touchedMajors.has(i)) {
|
||||
nextSlots[i].primary = emptySlotExercise()
|
||||
}
|
||||
}
|
||||
|
||||
return syncProgressionRoadmapFromSlots({ ...draft, slots: nextSlots, dirty: true })
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user