Skip to content

fix(tests): update stale GLM arity assertion broken by #12925 - #13402

Closed
KooshaPari wants to merge 1 commit into
cheaper-inference:release/v3.8.51from
KooshaPari:pr/13319-glm-test-fix
Closed

KooshaPari wants to merge 1 commit into
cheaper-inference:release/v3.8.51from
KooshaPari:pr/13319-glm-test-fix

Conversation

@KooshaPari

Copy link
Copy Markdown
Contributor

Summary

tests/unit/glm-sse-transform-arity.test.ts fails on release/v3.8.51 base at af49d4972, independently of any PR. Every PR targeting this base inherits a red Unit Tests job.

Root cause

#12770 added an arity guard asserting the GLM call ends with suppressThinkClose. #12925 then legitimised the buffer-size argument (GLM_STREAM_BUFFER_BYTES), so the call now ends with three more positionals after suppressThinkClose. The second assertion is stale.

Fix

Update the assertion to expect GLM_STREAM_BUFFER_BYTES as the final argument while keeping the hardcoded 65536 dead-literal guard from #12770.

- assert.match(call, /suppressThinkClose\s*\)\s*$/);
+ assert.match(call, /GLM_STREAM_BUFFER_BYTES\s*\)\s*$/, "call should end with GLM_STREAM_BUFFER_BYTES, not a hardcoded literal");

Also updated the JSDoc to explain the change.

Tests

✔ createSSETransformStreamWithLogger has no highWaterMark slot
✔ GLM translateSseResponse does not pass a 16th positional to the stream helper

Related

Fixes #13319

…nce#12925

cheaper-inference#12925 legitimised the buffer-size argument in GLM's
createSSETransformStreamWithLogger call, replacing the hardcoded 65536
with the named constant GLM_STREAM_BUFFER_BYTES. The test in
glm-sse-transform-arity.test.ts still asserted the call ended with
suppressThinkClose, which is no longer the last argument.

Update the assertion to expect GLM_STREAM_BUFFER_BYTES as the final
argument while keeping the hardcoded-65536 dead-literal guard from
cheaper-inference#12770.

Fixes cheaper-inference#13319
Copilot AI lite review requested due to automatic review settings September 12, 2026 05:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks! The release branch already rewrote tests/unit/glm-sse-transform-arity.test.ts for #12925. It now asserts that the helper declares streamBufferBytes as its last parameter and that GLM fills that slot with the named constant. That covers exactly what this PR updates. Closing as covered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: glm-sse-transform-arity test is red on release/v3.8.51 base (af49d4972), failing unrelated PRs

3 participants