mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-14 22:13:41 +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) {
|
function isChecked(key) {
|
||||||
const state = loadState();
|
const state = loadState();
|
||||||
saveState(state);
|
|
||||||
return state.checked.includes(key);
|
return state.checked.includes(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -308,10 +308,9 @@ function runTests() {
|
|||||||
})) passed++; else failed++;
|
})) passed++; else failed++;
|
||||||
|
|
||||||
// Cleanup: remove test-isolated state directory
|
// Cleanup: remove test-isolated state directory
|
||||||
clearState();
|
|
||||||
try {
|
try {
|
||||||
if (fs.existsSync(stateDir)) {
|
if (fs.existsSync(stateDir)) {
|
||||||
fs.rmdirSync(stateDir);
|
fs.rmSync(stateDir, { recursive: true, force: true });
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(` [cleanup] failed to remove ${stateDir}: ${err.message}`);
|
console.error(` [cleanup] failed to remove ${stateDir}: ${err.message}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user