Skip to content

Milestones

List view

  • CLI for taskharbor

    No due date
    9/9 issues closed
  • ## Milestone 7: Conformance test suite Goal Build a reusable conformance test suite that verifies any TaskHarbor driver follows the same semantics for: - enqueue + scheduling (run_at) - reserve + leases (visibility timeout) - extend lease (heartbeat) - ack, retry, fail, DLQ behavior - idempotency keys and dedupe behavior - standard error contract (mismatch, expired, not inflight, invalid lease duration) Why this exists Right now memory/postgres/redis can drift without anyone noticing. Conformance makes the driver contract executable. If a new driver passes conformance, users can trust it behaves like every other backend. Deliverables - conformance/ package: - a test suite runner - a DriverFactory abstraction for spinning up a driver under test - shared helpers for deterministic timestamps, unique namespaces, and cleanup - conformance tests covering the driver contract: - Enqueue semantics (including idempotency existed=true on duplicate) - Schedule gating (run_at in future is not reservable) - Reserve lease exclusivity (no double reserve during valid lease) - Lease reclaim (expired inflight becomes runnable now, run_at cleared) - ExtendLease correctness (good token extends, wrong token mismatch, expired token expired) - Ack correctness (good token marks done, wrong/expired token errors) - Retry + Fail + DLQ semantics (attempt increments, schedule retry, terminal state not reservable) - Error contract tests for all edge cases - driver wiring: - memory driver runs conformance and passes - postgres driver runs conformance and passes (migrations + clean state) - redis driver runs conformance and passes (including idempotency) Doc updates included in this milestone Update docs to match what conformance enforces (no behavior promises that drivers don’t actually meet): - docs/driver-contract.md - docs/semantics.md - docs/postgres.md - docs/redis.md Non-goals - CLI work (that is Milestone 8) - workflow engine features (Milestones 9–10) - performance benchmarking beyond basic correctness Definition of done - go test ./... passes locally - go test -race ./... passes (conformance will touch concurrency paths) - memory + postgres pass the exact same conformance suite - redis passes conformance (or is explicitly excluded with a documented reason, but target is to pass) - docs reflect the enforced behavior and match all passing drivers Implementation order (recommended) 1) Create conformance scaffolding (factory, helpers, suite runner) 2) Add core conformance tests (enqueue/schedule/reserve/lease reclaim) 3) Add extend lease + ack tests 4) Add retry/fail/DLQ tests 5) Add error contract tests 6) Wire suite into memory, then postgres, then redis 7) Update docs to match the enforced rules 8) Confirm CI runs everything (postgres + redis services) How to run - go test ./... - go test -race ./...

    No due date
    13/13 issues closed
  • Goal Make the Postgres driver production-safe for v0.1.0: idempotent enqueue, fast reserve, and safe/idempotent ack/fail under retries and crashes. Focus - DB-enforced idempotency (no check-then-insert) - Indexes aligned with the actual reserve query - Ack/Fail correctness under retries (idempotent repeats) - Concurrency confidence (no double leasing) Done when - go test ./... - go test -race ./... - examples/basic-postgres runs end-to-end - examples/stress-postgres runs a short sanity pass without correctness bugs

    No due date
    5/5 issues closed
  • No due date
    14/14 issues closed
  • Milestone 4 (Leases + crash recovery) GitHub issues Issue 1: Define lease model + errors in core types Labels: milestone-4, core, api Body: Goal: Introduce first-class lease concepts in the public/core layer. Tasks - Add LeaseToken + Lease (token, expiresAt) types - Add core errors for lease semantics (expired, mismatch/lost, not-leased) - Keep exported surface minimal and consistent Acceptance criteria - Core types compile with no driver changes yet (feature-gated by follow-up issues) - Errors are used by drivers and worker in later issues (no stringly-typed errors) Notes - Prefer typed errors that can be checked with errors.Is

    No due date
    10/10 issues closed
  • Goal: Ship Reliability v0 with deterministic behavior: - retry policy + exponential backoff with jitter - timeout per job + context cancellation - panic recovery middleware - tests: retry->DLQ, timeout path, panic path Scope decisions (important): - Retries are computed in worker logic (policy lives in core/worker) - Drivers stay dumb: they only persist fields and perform primitive state transitions (schedule/reschedule/ack/fail/DLQ) - No leases yet (that’s Milestone 4), so retry safety is best-effort under at-least-once Exit criteria: - go test ./... - tests cover retry to DLQ, timeout, panic recovery - README/docs updated if semantics changed Sub-issues: - #2 Retry semantics + backend contract additions - #3 Retry policy + backoff implementation - #4 Worker retry wiring + attempt tracking - #5 Job timeout implementation - #6 Panic recovery middleware - #7 Reliability tests (retry/timeout/panic)

    No due date
    7/7 issues closed