Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions PRD.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@

## Status vs Repo (January 30, 2026)

Status updated: **_February 3, 2026_**

### Functional Requirements (January 30, 2026)

- **Task lifecycle correctness**: Done for in-memory tasks; durable tasks are at-least-once by design.
Expand All @@ -120,6 +122,7 @@
### Non-Functional Requirements (January 30, 2026)

- **Safety**: Partial; panic recovery in hooks/tracer/broadcaster exists, but `go test -race ./...` still needs to be validated on your machine.
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate Safety line detected. Line 124 appears to be redundant and should be removed. Only line 125 (with the note about the race fix in resultBroadcaster) should remain.

Suggested change
- **Safety**: Partial; panic recovery in hooks/tracer/broadcaster exists, but `go test -race ./...` still needs to be validated on your machine.

Copilot uses AI. Check for mistakes.
- **Safety**: Partial; panic recovery in hooks/tracer/broadcaster exists, but `go test -race ./...` still needs to be validated on your machine (race fix landed in `resultBroadcaster`).
- **Reliability**: Done; stop paths are idempotent and workers/scheduler loops are tracked via WaitGroups.
- **Performance**: Done; queue scheduling avoids global locks in steady state beyond the queue/registry.
- **Observability**: Done; metrics snapshot + OpenTelemetry metrics/tracing and examples.
Expand All @@ -143,7 +146,7 @@

- **Redis durable backend**: Done (leases, DLQ, replay/inspect tools, gRPC durable API).
- **Multi-backend support**: Not started.
- **Global coordination**: Partial; lease renewal + guidance exist, but no global rate limiting/leader election.
- **Global coordination**: Done; global rate limiting (`WithRedisDurableGlobalRateLimit`) and leader lock (`WithRedisDurableLeaderLock`) added with tests and docs.

## Milestones

Expand Down Expand Up @@ -172,7 +175,7 @@

- **Durability**: Redis-backed at-least-once exists, but no transactional enqueue across services and no exactly-once guarantees.
- **Operational tooling**: `workerctl` CLI exists for queue inspection and DLQ replay; no admin UI or dashboards yet.
- **Distributed coordination**: multi-node guidance + lease renewal exist; no global rate limiting, leader election, or quorum controls.
- **Distributed coordination**: multi-node guidance + lease renewal exist; global rate limiting and leader lock now exist; no quorum controls.
- **Scheduling**: delayed scheduling is now supported; cron‑like schedules are still missing.

### Nice‑to‑have improvements
Expand All @@ -187,5 +190,5 @@

1. **Durable backend**: add additional backends (Postgres) and stronger transactional enqueue semantics.
1. **Operational tooling**: admin UI (pending) and expanded CLI for queue inspection, retries, and DLQ.
1. **Scheduled jobs**: cron/delayed scheduling layer.
1. **Multi‑node coordination**: optional distributed workers via backend.
1. **Scheduled jobs**: cron/delayed scheduling layer (cron now implemented; cron UX improvements TBD).
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistency between line 179 and line 193. Line 179 states "cron‑like schedules are still missing" but line 193 (which is being updated in this PR) states "cron now implemented; cron UX improvements TBD". These statements contradict each other. Either line 179 should be updated to reflect that cron is now implemented, or line 193 should be clarified.

Copilot uses AI. Check for mistakes.
1. **Multi‑node coordination**: optional distributed workers via backend (global rate limit/leader lock implemented; quorum/leader election improvements TBD).
4 changes: 2 additions & 2 deletions __examples/durable_redis/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ func main() {
if res.Error != nil {
log.Fatalf("task failed: %v", res.Error)
}
log.Printf("task completed: %v", res.Result)
log.Printf("task completed with status=%s", res.Task.Status())
case <-time.After(resultTimeout):
log.Fatal("timed out waiting for result")
}
cancel()
shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), shutdownTimeout)
defer shutdownCancel()
err := tm.StopGraceful(shutdownCtx)
err = tm.StopGraceful(shutdownCtx)
if err != nil {
log.Printf("shutdown error: %v", err)
}
Expand Down
Loading