Skip to content

test: narrow error-path gaps for combineAbortSignals and response validation truncation#118

Merged
andrewkoltsov merged 1 commit into
masterfrom
claude/linear-access-check-LUBr7
Jun 4, 2026
Merged

test: narrow error-path gaps for combineAbortSignals and response validation truncation#118
andrewkoltsov merged 1 commit into
masterfrom
claude/linear-access-check-LUBr7

Conversation

@andrewkoltsov

Copy link
Copy Markdown
Owner

Summary

  • Export combineAbortSignals from requestTimeout.ts (internal-only, not re-exported from src/index.ts) to allow direct unit testing
  • Add test/requestTimeout.combineAbortSignals.test.ts covering all 7 branches: no upstream signal, pre-aborted timeout, pre-aborted upstream, timeout fires, upstream fires, cleanup removes listeners, no double-abort
  • Add test/responseValidation.truncation.test.ts covering truncation to 3 issues, path-prefixed vs. root-level formatting, valid payload passthrough, and endpoint propagation in error details

Test plan

  • npx vitest run — all tests pass (422 → 422, 0 failures)
  • npx tsc --noEmit — no type errors
  • CI green

Generated by Claude Code

@andrewkoltsov

Copy link
Copy Markdown
Owner Author

Reviewed. I do not see any blocking issues here.

The only production change is exporting combineAbortSignals from its source module for direct tests; it is still not re-exported from src/sdk/index.ts, so this does not expand the package-level SDK surface. The added tests are focused and cover the abort precedence/cleanup cases plus response-validation truncation and issue formatting without relying on live Librus credentials.

Verified locally on e5649ab:

  • npm test — 26 files, 422 tests passed
  • npm run build — passed
  • npm run lint — passed
  • npm run format:check — passed

Minor non-blocking thought: if we want to keep the internal boundary extra explicit, we could later annotate combineAbortSignals as internal, but for this PR I think the tradeoff is reasonable.

@andrewkoltsov andrewkoltsov merged commit a6ab4bd into master Jun 4, 2026
11 checks passed
@andrewkoltsov andrewkoltsov deleted the claude/linear-access-check-LUBr7 branch June 4, 2026 11:16
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.

2 participants