MCPcopy Create free account
hub / github.com/EvoMap/evolver / recordSuppression

Function recordSuppression

src/gep/issueReporter.js:160–174  ·  view source on GitHub ↗
(signals, classification)

Source from the content-addressed store, hash-verified

158// Remember a suppressed report locally so it is observable and dedup-tracked,
159// without opening a public issue.
160function recordSuppression(signals, classification) {
161 try {
162 const state = readState();
163 const errorKey = computeErrorKey(signals);
164 let recentKeys = Array.isArray(state.recentIssueKeys) ? state.recentIssueKeys : [];
165 if (!recentKeys.includes(errorKey)) recentKeys.push(errorKey);
166 if (recentKeys.length > 20) recentKeys = recentKeys.slice(-20);
167 writeState(Object.assign({}, state, {
168 recentIssueKeys: recentKeys,
169 lastSuppressedAt: new Date().toISOString(),
170 lastSuppressedBucket: classification.bucket,
171 lastSuppressedReason: classification.reason,
172 }));
173 } catch (_) {}
174}
175
176function formatRecentEvents(events) {
177 if (!Array.isArray(events) || events.length === 0) return '_No recent events available._';

Callers 1

maybeReportIssueFunction · 0.85

Calls 3

computeErrorKeyFunction · 0.85
readStateFunction · 0.70
writeStateFunction · 0.70

Tested by

no test coverage detected