Skip to content

fix: peer dependency ranges state what the code needs - #48

Merged
Systerr merged 1 commit into
mainfrom
fix/peer-dependency-ranges
Oct 5, 2026
Merged

Systerr merged 1 commit into
mainfrom
fix/peer-dependency-ranges

Conversation

@Systerr

@Systerr Systerr commented Oct 5, 2026

Copy link
Copy Markdown
Member

The optional peers were declared as * (any version), and the framework as ^5.0.1. That claimed compatibility with versions the code doesn't work with.

A real bug behind it

SqsTaskQueue gets the attempt count from ApproximateReceiveCount, which it requests with MessageSystemAttributeNames. That parameter exists only from @aws-sdk/client-sqs 3.572.0 (I bisected the published packages: 3.569.0 doesn't have it, 3.572.0 does). An older client silently drops it. Every delivery then reads as attempt 1, so a failing task is never dead-lettered and is retried forever. * allowed exactly that.

Changes

  • Peers (all still optional):

    Package Range Why this floor
    @adaptivestone/framework ^5.1.0 the version the adapter was validated on (AGENTS.md also refers to ≥5.1 behavior)
    mongoose ^9.0.0 what the Mongo drivers are tested with; framework 5 uses mongoose 9
    @aws-sdk/client-sqs ^3.572.0 the receive-count API above
    @aws-sdk/client-s3, @aws-sdk/s3-request-presigner ^3.572.0 one documented AWS SDK floor (the S3 driver needs nothing newer than 3.0)
  • Warning: SqsTaskQueue warns once when SQS returns no ApproximateReceiveCount, so an old or unusual client is visible in the logs. New test included.

  • Dev versions updated to the latest on npm: framework 5.5.0, mongoose 9.11.0, AWS SDK 3.1146.0, @types/node 26.6.4.

  • Docs: the README install table and AGENTS.md list the minimum versions; CHANGELOG entry added.

Checks

611 tests (609 pass, 2 skipped as before) against the updated dev versions. tsc, types:check, Biome, build and smoke pass.

Not covered: CI tests only the latest versions, not the floors. A job that also tests the minimums would need its own lockfile.

…pdated

- peers: @adaptivestone/framework ^5.1.0, mongoose ^9.0.0, AWS SDK clients ^3.572.0 (was `*`)
- @aws-sdk/client-sqs before 3.572 silently drops MessageSystemAttributeNames, so every delivery
  read as attempt 1 and a failing task was never dead-lettered; SqsTaskQueue now also warns once
  when SQS returns no ApproximateReceiveCount
- dev: framework 5.5, mongoose 9.11, AWS SDK 3.1146, @types/node 26.6.4
- README install table and AGENTS.md list the minimum versions
@Systerr
Systerr merged commit 0335e0a into main Oct 5, 2026
5 of 9 checks passed
@github-code-quality

Copy link
Copy Markdown

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/node-test

The overall line coverage in commit be68121 in the fix/peer-dependency-... branch remains at 97%, unchanged from commit dc4cc4c in the main branch.

Show a line coverage summary of the most impacted files.
File main dc4cc4c fix/peer-dependency-... be68121 +/-
src/enqueue.ts 99% 96% -3%
src/drivers/sqs.ts 99% 99% 0%
src/helpers/sleep.ts 93% 93% 0%
src/resizeTask.ts 96% 96% 0%

@Systerr
Systerr deleted the fix/peer-dependency-ranges branch October 5, 2026 20:11
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.

1 participant