Commit graph

2 commits

Author SHA1 Message Date
Snider
6970da5c49 refactor: apply go fix modernizers for Go 1.26
Automated fixes: interface{} → any, range-over-int, t.Context(),
wg.Go(), strings.SplitSeq, strings.Builder, slices.Contains,
maps helpers, min/max builtins.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-22 21:00:17 +00:00
Snider
ce502c0f16 feat(registry): Phase 5 — persistent agent registry (SQLite + Redis + config factory)
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>
2026-02-20 11:40:46 +00:00