mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-14 22:13:41 +08:00
fix: cubic-dev-ai round 2 — 3 issues across SKILL.md + pruning
P1: Gate message asked for raw production data records — changed to
"redacted or synthetic values" to prevent sensitive data exfiltration
P2: SKILL.md description now includes MultiEdit (was missing after
MultiEdit gate was added in previous commit)
P2: Session key pruning now caps __prefixed keys at 50 to prevent
unbounded growth even in theoretical edge cases
9/9 tests pass.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -64,7 +64,10 @@ function saveState(state) {
|
||||
if (state.checked.length > MAX_CHECKED_ENTRIES) {
|
||||
const sessionKeys = state.checked.filter(k => k.startsWith('__'));
|
||||
const fileKeys = state.checked.filter(k => !k.startsWith('__'));
|
||||
state.checked = [...sessionKeys, ...fileKeys.slice(-(MAX_CHECKED_ENTRIES - sessionKeys.length))];
|
||||
// Cap session keys at 50 to prevent unbounded growth
|
||||
const cappedSession = sessionKeys.length > 50 ? sessionKeys.slice(-50) : sessionKeys;
|
||||
const remaining = MAX_CHECKED_ENTRIES - cappedSession.length;
|
||||
state.checked = [...cappedSession, ...fileKeys.slice(-Math.max(remaining, 0))];
|
||||
}
|
||||
fs.mkdirSync(STATE_DIR, { recursive: true });
|
||||
// Atomic write: temp file + rename prevents partial reads
|
||||
|
||||
Reference in New Issue
Block a user