Sort pending tasks by priority (Critical > High > Medium > Low) with
oldest-first tie-breaking before dispatch. Add exponential backoff for
failed dispatches (5s, 10s, 20s...) and dead-letter tasks that exceed
MaxRetries (default 3) by marking them StatusFailed via UpdateTask.
New Task fields: MaxRetries, RetryCount, LastAttempt, FailReason.
New constant: StatusFailed.
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add SQLiteRegistry and RedisRegistry implementations of the AgentRegistry
interface, mirroring the AllowanceStore persistence pattern. SQLiteRegistry
uses modernc.org/sqlite directly with a proper agents table schema, WAL mode,
and UPSERT semantics. RedisRegistry uses go-redis/v9 with TTL-based natural
reaping and SCAN for listing. Add RegistryConfig struct and
NewAgentRegistryFromConfig factory function to config.go.
Full test parity with existing MemoryRegistry tests, including concurrent
access under -race, persistence round-trip, and skip-if-no-Redis pattern.
Co-Authored-By: Virgil <virgil@lethean.io>
- DefaultBaseURL was api.core-agentic.dev (nonexistent domain). Changed
to http://localhost:8080 for local dev. Set AGENTIC_BASE_URL for prod.
- HourlyRateLimit and CostCeiling on ModelQuota annotated as reserved:
stored but not enforced. Enforcement requires AllowanceStore interface
changes (sliding window) — deferred.
- Phase 6 marked complete in TODO.md.
Co-Authored-By: Virgil <virgil@lethean.io>
Tests were spawning real claude subprocess, causing 55s+ runtime and
failures on machines where claude is installed. Use PATH-prepended mock
script (exit 1) — same pattern as existing gh mocks. Suite now runs in
~5s.
Co-Authored-By: Charon <developers@lethean.io>
registerAgent hardcodes ConcurrentJobs: 5, but the concurrent test
launches 10 goroutines. Override with ConcurrentJobs: 0 (unlimited)
so all 10 dispatches succeed as intended.
Co-Authored-By: Charon <developers@lethean.io>
Implements RedisStore using github.com/redis/go-redis/v9 with Lua
scripts for atomic increment/decrement operations. Adds functional
options (WithRedisPassword, WithRedisDB, WithRedisPrefix), config
wiring via "redis" store_backend, and comprehensive tests covering
all 10 interface methods, concurrency, persistence, and error paths.
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>