Enhance Path QA and Progression Review Logic
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 44s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 41s
Test Suite / playwright-tests (push) Successful in 1m27s
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 44s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 41s
Test Suite / playwright-tests (push) Successful in 1m27s
- Introduced `_resolve_hint_major_index` to accurately map hints to major step indices, improving the handling of optimization hints in path evaluations. - Added `_problematic_slots_from_path_qa` to identify and categorize problematic slots based on baseline QA, enhancing the quality assessment process. - Updated `_slot_suggestion_accepted` to incorporate new parameters for slot problems and stage specifications, refining the decision-making process for slot suggestions. - Enhanced `ProgressionGraphEditor` to improve user notifications regarding identified issues and suggestions, ensuring clearer communication of path evaluation results. - Modified `buildProgressionComparePayload` and `buildUnifiedSlotReviewComparePayload` to support baseline evaluations, streamlining the comparison process for proposed paths.
This commit is contained in:
1 parent
a1e4ad66df
commit
3468b2066e
4 files changed
+251
-29
No files matched your search
@@ -494,20 +494,31 @@ export default function ProgressionGraphEditor({ graphId, embedded = false, onSa
|
||||
}
|
||||
|
||||
const runMatchCompareFlow = async (synced, { source = 'match' } = {}) => {
|
||||
setMatchNotice('Pfad bewerten und je Slot passende Verbesserungen prüfen…')
|
||||
setMatchNotice('Schritt 1/2: Pfad bewerten (wie „Graph bewerten“)…')
|
||||
const baselineRes = await fetchPathEvaluate(synced)
|
||||
const { draft: evaluated, remainingOffers } = applyEvaluateResult(synced, baselineRes)
|
||||
setDraft(evaluated)
|
||||
const mergedAfterEval = mergeGapOffersForDraft(evaluated, baselineRes)
|
||||
setGapFillOffers(mergedAfterEval.length > 0 ? mergedAfterEval : remainingOffers)
|
||||
|
||||
setMatchNotice('Schritt 2/2: Verbesserungsvorschläge für gemeldete Schachstellen…')
|
||||
const reviewRes = await api.suggestProgressionPath({
|
||||
...buildMatchRequestBase(synced),
|
||||
...buildEvaluateRequest(synced),
|
||||
evaluate_only: false,
|
||||
unified_slot_review: true,
|
||||
baseline_evaluate_steps: slotsToEvaluateSteps(synced),
|
||||
include_llm_intent: false,
|
||||
auto_rematch_after_qa: false,
|
||||
})
|
||||
const qa = reviewRes?.path_qa || null
|
||||
setPathQa(qa)
|
||||
setDraft((prev) => (prev ? { ...prev, lastFindings: qa } : prev))
|
||||
|
||||
const compareRes = buildProgressionComparePayload(null, reviewRes)
|
||||
setGapFillOffers(mergeGapOffersForDraft(synced, reviewRes, reviewRes))
|
||||
if (!reviewRes?.unified_slot_review) {
|
||||
throw new Error(
|
||||
'Match-Review nicht verfügbar — Backend-Stand prüfen (unified_slot_review fehlt in der Antwort).',
|
||||
)
|
||||
}
|
||||
|
||||
const compareRes = buildProgressionComparePayload(baselineRes, reviewRes)
|
||||
setGapFillOffers(mergeGapOffersForDraft(evaluated, baselineRes, reviewRes))
|
||||
presentMatchCompare(compareRes, { source })
|
||||
return compareRes
|
||||
}
|
||||
@@ -523,11 +534,15 @@ export default function ProgressionGraphEditor({ graphId, embedded = false, onSa
|
||||
const baselineQa = res?.baseline_path_qa || null
|
||||
const diffCount = res?.slot_diff_count ?? compareDiffsForDialog(res).length
|
||||
const rejectedCount = res?.slot_diff_count_rejected ?? rejectedCompareDiffs(res).length
|
||||
const problemCount = res?.match_summary?.problem_slot_count
|
||||
?? (res?.problem_slots ? Object.keys(res.problem_slots).length : 0)
|
||||
const bPct = pathQaQualityPercent(baselineQa)
|
||||
let notice =
|
||||
diffCount > 0
|
||||
? `Match: ${diffCount} Verbesserung(en) — je Slot gegen deinen Pfad (${bPct != null ? `${bPct} %` : 'QS'}) geprüft.`
|
||||
: 'Match: Keine messbare Verbesserung gegenüber deinem Pfad.'
|
||||
? `Match: ${diffCount} Verbesserung(en) für gemeldete Schachstellen.`
|
||||
: problemCount > 0
|
||||
? `Match: ${problemCount} Schachstelle(n) erkannt, aber kein Bibliotheks-Ersatz mit Gewinn — KI-Angebote im Panel prüfen.`
|
||||
: 'Match: Keine Schachstellen — Pfad wirkt konsistent.'
|
||||
if (rejectedCount > 0) {
|
||||
notice += ` ${rejectedCount} Vorschlag/Vorschläge verworfen (Verschlechterung oder neutral).`
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user