Skip to content

test(queue): eliminate typed-queue DLQ timing flake #1667

Description

@rickylabs

Problem

packages/queue/tests/typed-queue_test.ts:31 is nondeterministic in the repo-wide suite. During PR #1665 verification at immutable SDK-only source head 9a26c107a, one root run ended 4202 passed / 1 failed / 19 ignored: the DLQ assertion expected one item but observed two. The PR changes nothing under packages/queue.

The same test passed when run alone, passed when paired with the new SDK KV test, and later repo-wide runs at the identical head ended 4203 passed / 0 failed / 19 ignored. The formal evaluator also ran the root suite once at that same product head and did not hit the failure. This is a timing/state-isolation flake, not an SDK regression.

Impact

  • creates false-red required CI and forces costly attribution/reruns;
  • wastes coordinator and evaluator time and tokens;
  • can hide a real queue regression behind an accepted "known flake" narrative if left unowned.

Acceptance

  • A deterministic reproduction or stress loop demonstrates the pre-fix duplicate-DLQ outcome.
  • The test and/or queue lifecycle is repaired so each case owns and drains its state deterministically.
  • Repeated isolated, paired, and repo-suite executions remain green without retry-until-pass logic.
  • The structured test report preserves exact failure attribution if the invariant regresses.

Evidence

Observed during NetScript 0.0.7 PR #1665 Tier-A/formal evaluation. The branch was SDK/docs-only; isolated and identical-head reruns distinguish this from the leaf delta.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:queuepackages/queue: queue backends, delivery, dead-letterpriority:p2Mediumtype:testTests only

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions