mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
fix(code-runtime-python): remove NUL bytes and sync the Agent Note metering claim
- Replace four raw U+0000 bytes in protocol.spec.ts string literals with the \0 escape so the source stays plain text (a bare NUL makes text tools treat the file as binary); the runtime value is unchanged, so the bytes:8 NUL-escape assertion still holds. - Sync the Agent Note (both languages) with the corrected checkDoneValue contract: the walk bounds only the incremental allocation it would add, not the frame width, which is already parsed and capped upstream by the host's fd-3 receive buffer. Drop the "prevents a hundreds-of-MB allocation" overclaim that the code JSDoc already retracted. Re-record the note i18n pairing.
This commit is contained in:
@@ -214,17 +214,19 @@ describe('checkDoneValue', () => {
|
||||
})
|
||||
|
||||
it('rejects an over-budget string on its length before escaping it', () => {
|
||||
// A control-heavy forged string escapes to ~6x its length; the walk must
|
||||
// refuse it on the cheap `length + 2` lower bound so the escaped copy is
|
||||
// never allocated. Observable through the boundary: a string whose LENGTH
|
||||
// already exceeds the cap fails even though every character is 1 byte.
|
||||
expect(checkDoneValue(' | ||||