Files
suaveplan/openspec/archive/2026-04-29-timing-spec-conformance/tasks.md
2026-05-27 23:29:53 +01:00

1.1 KiB

Tasks: timing-spec-conformance

1. Inline drift fixes

  • 1.1 Add recordSchedulerQueueDepth (lazy ObservableGauge) to src/otel/timing-otel.ts.
  • 1.2 Re-export recordSchedulerQueueDepth from src/index.ts.
  • 1.3 Wire scheduler.schedule / per-task finally / handle-cancel / top-level cancel / dispose to call recordSchedulerQueueDepth(_tasks.size).
  • 1.4 Wire stopwatch.stop to call recordStopwatchElapsed(_accumulated).
  • 1.5 Wire createTimer.start interval callback to call incrementTimerTick() before user onTick.

2. Spec-conformance tests

  • 2.1 Add src/timing.spec-conformance.test.ts covering TM-03/04/06/07/08/11 implicit scenarios and the new queue-depth helper.

3. Spec annotations

  • 3.1 Add **Verified by:** line under every TM-NN requirement in openspec/specs/timing/spec.md.

4. Verify

  • 4.1 bunx turbo lint typecheck test --filter=@suaveplan/timing green.
  • 4.2 bunx turbo test:coverage --filter=@suaveplan/timing 100/100/100/100.
  • 4.3 bun scripts/openspec-conformance.ts @suaveplan/timing exits 0.