dw-kit 1.3.5 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,6 +63,11 @@ export function summarize(events) {
63
63
  const byHook = {};
64
64
  const byTask = {};
65
65
  const bySupplyChain = { scan_run: 0, block: 0, allow: 0, sync: 0 };
66
+ // ADR-0005 sunset review: separate OSV catches from fixture catches.
67
+ // A catch from a curated namespace fixture is NOT evidence the OSV-based
68
+ // guard worked; conflating them would compromise the 2026-08-12 retire/keep decision.
69
+ const supplyChainBySource = { osv: 0, fixture: 0, mixed: 0, unknown: 0 };
70
+ const supplyChainPartial = { partial_syncs: 0, partial_scans: 0 };
66
71
 
67
72
  for (const e of events) {
68
73
  if (e.event === 'skill') bySkill[e.name] = (bySkill[e.name] || 0) + 1;
@@ -72,6 +77,19 @@ export function summarize(events) {
72
77
  const action = e.action || e.name || 'scan_run';
73
78
  if (bySupplyChain[action] === undefined) bySupplyChain[action] = 0;
74
79
  bySupplyChain[action]++;
80
+
81
+ // Track block/allow source for sunset-review integrity.
82
+ // Pre-install mode reports block_source explicitly (fixture vs osv vs mixed).
83
+ // Scan/JSON/update-db modes report source=osv directly.
84
+ if (action === 'block' || action === 'allow') {
85
+ const src = e.block_source || e.source || 'unknown';
86
+ const key = src === 'pre-install-mixed' ? 'mixed' : src.startsWith('fixture+') ? 'mixed' : src;
87
+ if (supplyChainBySource[key] === undefined) supplyChainBySource[key] = 0;
88
+ supplyChainBySource[key]++;
89
+ }
90
+
91
+ if (action === 'sync' && e.partial === true) supplyChainPartial.partial_syncs++;
92
+ if (action === 'scan_run' && e.partial_snapshot === true) supplyChainPartial.partial_scans++;
75
93
  }
76
94
  }
77
95
 
@@ -81,6 +99,8 @@ export function summarize(events) {
81
99
  byHook,
82
100
  byTask,
83
101
  bySupplyChain,
102
+ supplyChainBySource,
103
+ supplyChainPartial,
84
104
  dateRange:
85
105
  events.length > 0 ? { from: events[0].ts, to: events[events.length - 1].ts } : null,
86
106
  };