Checkpoint: File edits

Automatic checkpoint created by Claude Code
- Branch: claude/guidance-control-plane-uhmR3
- Timestamp: 2026-02-02T03:50:43Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rUvandClaude Opus 4.5 committed 2026-02-02 03:50:43 +00:00
1 parent 5a73c9af58
commit 010943b83d
1 file changed
+5 -3
+5 -3
View File
@@ -427,14 +427,16 @@ export class ThreatDetector {
}
/**
* Add signal with LRU eviction
* Add signal with batch eviction.
* Trims 10% at once to amortize the O(n) splice cost instead of
* calling shift() (O(n)) on every insertion.
*/
private addSignal(signal: ThreatSignal): void {
this.signals.push(signal);
// LRU eviction
if (this.signals.length > this.maxSignals) {
this.signals.shift();
const trimCount = Math.max(1, Math.floor(this.maxSignals * 0.1));
this.signals.splice(0, trimCount);
}
}
}