fix: deduplicate synthetic quality exclusions
Build and publish Eldorado documentation / build (pull_request) Successful in 32s

This commit is contained in:
jarvis-at-skic committed 2026-10-04 11:11:42 +00:00
1 parent f1743156b6
commit 237c6767ab
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -117,7 +117,7 @@ export function calculate(f) {
kpis['deployment-rework-rate']=result(effects.filter(r=>r.planned===false && Boolean(r.incident_id)).length,effects.length,as_of,{unknown:effects.filter(r=>typeof r.planned!=='boolean' || (r.planned===false && !Object.hasOwn(r,'incident_id'))).length});
const [affected,accepted]=matureDefects(f.changes,f.defects,as_of,start,end);
const matureChanges=unique(f.changes).filter(r=>visible(r,as_of) && within(r.accepted_at,start,end) && time(r.accepted_at)+horizon(r)<=time(as_of));
kpis['escaped-quality-rate']=result(affected,accepted,as_of,{unknown:matureChanges.filter(r=>r.linkage_complete!==true).length,exclusions:{outside_window_immature_or_late:f.changes.length-matureChanges.length},pending_triage_count:unique(f.defects).filter(r=>visible(r,as_of) && r.confirmed!==true).length});
kpis['escaped-quality-rate']=result(affected,accepted,as_of,{unknown:matureChanges.filter(r=>r.linkage_complete!==true).length,exclusions:{outside_window_immature_or_late:unique(f.changes).length-matureChanges.length},pending_triage_count:unique(f.defects).filter(r=>visible(r,as_of) && r.confirmed!==true).length});
const attempts=unique(f.attempts).filter(r=>visible(r,as_of));
kpis['policy-effects']=result(attempts.filter(r=>r.actual_effect===true).length,attempts.length,as_of,{unknown:attempts.filter(r=>typeof r.actual_effect!=='boolean').length,blocked_count:attempts.filter(r=>r.blocked===true).length});
const {eligible}=taskCohort(f.events,start,end,as_of);