Repository navigation
test(deepseek): stop pinning Node's one-shot zstd decoder to the first frame - #710
Conversation
…t frame The frame-walking test asserted that zlib.zstdDecompressSync returns only the first of 40 concatenated frames. That was true when the walker was written, but nodejs/node#65865 (shipped in 26.10.0 and in 24.22.0 LTS) makes Node decode every frame, so the assertion fails on current Node 24 LTS and 26 while the walker itself is still correct. The assertion tested Node, not Codeman: the walker's own 40-frame checks stay, and the comments now say which Node versions stop at the first frame, since the supported range (>=22) still includes them.
|
Thanks @JDProfresh, this is a clean catch. The PR drops the one assertion in I reproduced it on Node 24.22.1: master's copy of the test fails with exactly the assertion you quoted, and your version passes 22/22 there and on Node 22. The release versions match Node's changelogs too. One small thing I will fix at merge time, so there is nothing for you to do: A related detail from testing: on 24.22.1 the one-shot decoder now throws This will be merged with that edit on top. Thanks again. |
- docs/architecture-invariants.md DeepSeek mechanism (1): the decoder stops at the first frame only before Node 24.22 and 26.10 (nodejs/node#65865) - src/deepseek-transcript.ts:33: reflow the over-long comment line to the width of the lines around it - docs/deepseek-integration.md:241: same reflow Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… zstd decoder to the first frame
|
Merged in 1.46.0 (https://github.com/Ark0N/Codeman/releases/tag/codeman%401.46.0). Thank you for the clean catch and for checking both Node changelogs. As promised, the architecture notes now give the same "before 24.22 and 26.10 (nodejs/node#65865)" wording, and the two long lines are reflowed. |
npm testfails on current Node 24 LTS and 26 because one assertion intest/deepseek-transcript.test.tspins a Node behaviour that Node has since fixed, not anything in Codeman.Problem
"zstd frame walking > decodes every frame, not just the first" opens by checking that
zlib.zstdDecompressSyncreturns only the first of 40 concatenated frames, which is the reasondecodeZstdFrames()walks frame headers itself. nodejs/node#65865 ("zlib: improve zstd decoding across chunk boundaries") makes Node decode every frame. It shipped in 26.10.0 and in 24.22.0 LTS (both changelogs list it; 22.x does not), so on those versions the one-shot call returns 40 lines and the test fails:The other 21 tests in the file pass, including the walker's own 40-frame checks on the next two lines. CI stays green only because it runs Node 22.
What it does
zstdFrameRangesfinds 40 frames,decodeZstdFramesreturns 40 lines) stay as they are.src/deepseek-transcript.tsand indocs/deepseek-integration.mdto say Node stops at the first frame before 24.22 and 26.10. The walker stays:enginesis>=22, so supported versions still truncate, and it stays correct on a Node that decodes every frame.No runtime code changes.
Tests
npm test -- test/deepseek-transcript.test.ts: 22 passed on Node 26.12.1 (new decoder) and on 26.2.0 (old decoder). Before the change, 26.12.1 failed that one test.npm teston Node 26.12.1: 12,569 passed. The one failure,test/tui/tui-switch-guard.test.tsline 239, also fails on unmodified master here: tmux 3.2a exits 0 onshow-options -gvfor an unset option, where newer tmux errors.