Files
2026-05-27 23:29:53 +01:00

1.2 KiB

Tasks: retry-spec-conformance

1. New tests

  • 1.1 Add src/retry/retry.spec-conformance.test.ts with six cases: generic narrowing (type-level), deterministic seeded-Rng jitter, per-attempt signal forwarding, mid-backoff abort discriminator, backoff factory purity, RetryExhaustedError cause chain.
  • 1.2 Add src/circuit-breaker/circuit-breaker.spec-conformance.test.ts with three cases: full FSM walk in one assertion, open never invokes fn, CircuitOpenError.context.openedAt carries injected-clock timestamp.
  • 1.3 Add src/types/retry.schemas.spec-conformance.test.ts with six cases: round-trip parse + reject for every published schema.

2. Spec annotations

  • 2.1 Add **Verified by:** line under every ### RT-NN — block in openspec/specs/retry/spec.md.
  • 2.2 Update RT-05 to match the 4-arg withTimeout(fn, ms, attemptNumber, signal?) signature.
  • 2.3 Update RT-10 to reflect helper-based opt-in OTel emission (record functions are no-ops without exporter).

3. Verify

  • 3.1 bunx turbo lint typecheck test --filter=@suaveplan/retry green.
  • 3.2 bunx turbo test:coverage --filter=@suaveplan/retry 100/100/100/100.
  • 3.3 bun scripts/openspec-conformance.ts @suaveplan/retry exits 0.