Enhance Slot Difference Annotation and Rematch Suggestion Logic
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Successful in 44s
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 44s
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
- Introduced `_annotate_slot_diffs` to mark trivial ID swaps in slot differences, improving clarity in comparison results. - Added `_actionable_slot_diffs` to filter out non-actionable differences, streamlining the evaluation process. - Implemented `_build_rematch_suggestion_diffs` to generate suggestions based on rematch logs, enhancing the path optimization workflow. - Updated `_build_progression_compare_response` to incorporate actionable slot differences and rematch suggestions, improving the response structure. - Enhanced frontend components to display rematch suggestions and handle trivial differences more effectively. - Bumped version to reflect the new features and improvements.
This commit is contained in:
1 parent
e828a5da32
commit
dccb065181
11 files changed
+552
-84
No files matched your search
@@ -911,16 +911,37 @@ export function draftHasLibrarySlotAssignments(draft) {
|
||||
return slotsToSlotAssignments(draft).length >= 1
|
||||
}
|
||||
|
||||
/** Diff-Einträge nur für Slots, die vorher schon eine Bibliotheks-Übung hatten. */
|
||||
export function curatedSlotDiffs(comparison) {
|
||||
const diffs = comparison?.slot_diffs
|
||||
if (!Array.isArray(diffs)) return []
|
||||
return diffs.filter((d) => d?.baseline_exercise_id != null)
|
||||
/** Alle Slot-Diffs inkl. reiner ID-Tausche (gleicher Titel). */
|
||||
export function compareSlotDiffs(comparison, { actionableOnly = false } = {}) {
|
||||
if (actionableOnly && Array.isArray(comparison?.slot_diffs_actionable)) {
|
||||
return comparison.slot_diffs_actionable
|
||||
}
|
||||
return Array.isArray(comparison?.slot_diffs) ? comparison.slot_diffs : []
|
||||
}
|
||||
|
||||
/** Vergleich würde eine bestehende Zuordnung ändern (Dialog bei Match). */
|
||||
/** Inhaltliche Abweichungen (nicht nur gleicher Titel, andere ID). */
|
||||
export function compareResponseHasActionableSlotChanges(res) {
|
||||
const count = res?.slot_diff_count
|
||||
if (count != null) return Number(count) > 0
|
||||
return compareSlotDiffs(res, { actionableOnly: true }).length > 0
|
||||
}
|
||||
|
||||
/** Diff-Einträge nur für Slots, die vorher schon eine Bibliotheks-Übung hatten. */
|
||||
export function curatedSlotDiffs(comparison, { actionableOnly = true } = {}) {
|
||||
return compareSlotDiffs(comparison, { actionableOnly }).filter(
|
||||
(d) => d?.baseline_exercise_id != null,
|
||||
)
|
||||
}
|
||||
|
||||
/** Vergleich würde eine bestehende Zuordnung inhaltlich ändern (Dialog bei Match). */
|
||||
export function compareResponseHasCuratedSlotChanges(res) {
|
||||
return curatedSlotDiffs(res).length > 0
|
||||
return curatedSlotDiffs(res, { actionableOnly: true }).length > 0
|
||||
}
|
||||
|
||||
export function compareResponseHadRematchWithoutActionableDiffs(res) {
|
||||
if (compareResponseHasActionableSlotChanges(res)) return false
|
||||
const rematch = res?.proposed_path_qa_pipeline?.rematch_log
|
||||
return Array.isArray(rematch) && rematch.length > 0
|
||||
}
|
||||
|
||||
/** Alle Graph-Übungs-IDs für Retriever-Boost (Slots + Geschwister + gespeichertes Artefakt). */
|
||||
@@ -1063,10 +1084,9 @@ export function applyMatchStepsToSlots(draft, apiSteps) {
|
||||
return syncProgressionRoadmapFromSlots({ ...draft, slots: nextSlots, dirty: true })
|
||||
}
|
||||
|
||||
/** Vergleichs-Antwort: mindestens ein Slot mit anderer Übung als im Ist-Stand. */
|
||||
/** Vergleichs-Antwort: mindestens ein inhaltlicher Slot-Unterschied. */
|
||||
export function compareResponseHasSlotChanges(res) {
|
||||
const count = res?.slot_diff_count ?? res?.slot_diffs?.length ?? 0
|
||||
return Number(count) > 0
|
||||
return compareResponseHasActionableSlotChanges(res)
|
||||
}
|
||||
|
||||
/** Nur ausgewählte Slots aus Optimierungs-Vorschlag übernehmen. */
|
||||
|
||||
Reference in new issue
Block a user