Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

test(hooks): construct mismatch prefix immutably

haelyra303f50c57ead
diff --git a/tests/hooks/plugin-hook-bootstrap-no-echo.test.js b/tests/hooks/plugin-hook-bootstrap-no-echo.test.js
index 3d9f1cb79..e896ec48b 100644
--- a/tests/hooks/plugin-hook-bootstrap-no-echo.test.js
+++ b/tests/hooks/plugin-hook-bootstrap-no-echo.test.js
@@ -277,8 +277,11 @@ if (
);
}
- const mismatchedPrefix = Buffer.from(raw.subarray(0, 8 * 1024));
- mismatchedPrefix[mismatchedPrefix.length - 1] ^= 1;
+ const mismatchLength = 8 * 1024;
+ const mismatchedPrefix = Buffer.concat([
+ raw.subarray(0, mismatchLength - 1),
+ Buffer.from([raw[mismatchLength - 1] ^ 1])
+ ]);
assert.strictEqual(isRawPassthrough(raw, mismatchedPrefix), false);
})
)