mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-14 13:53:29 +08:00
fix: remove unnecessary disk I/O + fix test cleanup
- isChecked() no longer calls saveState() — read-only operation should not write to disk (was causing 3x writes per tool call) - Test cleanup uses fs.rmSync(recursive) instead of fs.rmdirSync which failed with ENOTEMPTY when .tmp files remained 9/9 tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -84,7 +84,6 @@ function markChecked(key) {
|
||||
|
||||
function isChecked(key) {
|
||||
const state = loadState();
|
||||
saveState(state);
|
||||
return state.checked.includes(key);
|
||||
}
|
||||
|
||||
|
||||
@@ -308,10 +308,9 @@ function runTests() {
|
||||
})) passed++; else failed++;
|
||||
|
||||
// Cleanup: remove test-isolated state directory
|
||||
clearState();
|
||||
try {
|
||||
if (fs.existsSync(stateDir)) {
|
||||
fs.rmdirSync(stateDir);
|
||||
fs.rmSync(stateDir, { recursive: true, force: true });
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(` [cleanup] failed to remove ${stateDir}: ${err.message}`);
|
||||
|
||||
Reference in New Issue
Block a user