Repository navigation
feat(redisstore): isolate bounded follow capacity and migrate to Go 1.27 - #1480
Conversation
Signed-off-by: Samuele Verzi <[email protected]>
Signed-off-by: Samuele Verzi <[email protected]>
Signed-off-by: Samuele Verzi <[email protected]>
Co-Authored-By: Codex <[email protected]> Signed-off-by: Samuele Verzi <[email protected]>
Signed-off-by: Samuele Verzi <[email protected]>
Signed-off-by: Samuele Verzi <[email protected]>
Expose Redis follow-capacity exhaustion across gRPC, SSE, and the TypeScript SDK, and resume reconnects from the attachment checkpoint. Co-Authored-By: Codex <[email protected]> Signed-off-by: Samuele Verzi <[email protected]>
Signed-off-by: Samuele Verzi <[email protected]>
Signed-off-by: Samuele Verzi <[email protected]>
…acity # Conflicts: # docs/acceptance/draft-aware-session-inventory.md
Signed-off-by: Samuele Verzi <[email protected]>
JAORMX
left a comment
There was a problem hiding this comment.
Thorough review complete against 209989a9 at head 23a84665.
I think the size is justified: this is one cohesive architectural contract carried through Redis client ownership, transport classification, SDK reconnect behavior, mecak8s/Helm configuration, module compatibility, and the owning documentation. Splitting it would create less-reviewable intermediate states where those layers disagree.
The implementation matches issue #876, the approved acceptance plan, and ADR 0330. I found no merge-blocking correctness, security, architectural, Kubernetes, dependency, or compatibility issues. Admission/close linearization, per-generation leases, follow-only force-close, watch_capacity handling, cursor-preserving SDK retries, sizing validation, API/changelog updates, and lifecycle inventory all look sound. Relevant CI is green.
Two worthwhile but non-blocking test improvements:
internal/adapter/redisstore/follow_capacity_test.go:185proves starvation freedom with already-separated injected clients, but does not directly exercise physical isolation through the productiondefaultStoreDependencies -> newPair -> buildClientPairpath and real bounded pools.internal/adapter/redisstore/follow_capacity_test.go:134performs its setupAppendEventbefore installing command spies, so the routing assertion coversSavebut not the append/write path explicitly named by AC1.3.
Neither gap indicates a production defect or warrants splitting/blocking this PR. Approved.
PANEL: ship_blockers=0 important=2 advisory=0 reviewer_failures=0
Summary
watch_capacitytransport contract, and documents operator sizing.redisconnv0.0.2.Development stage
and the in-PR plan declares
**Expected tasks:** 1, a non-placeholder**Combined rationale:**, and no runtime/public/operator/persistence/trust-boundaryinterface change (
None — rationale; workflow-only meta-changes may review processdocs/skills here)
Contract linkage
3ad4a689bb68db01a21c72995daef1854c295866Interface conformance
port.ErrEventFollowCapacityand stablewatch_capacity; gRPC reportsRESOURCE_EXHAUSTED, while an already-open HTTP watch emits its terminal SSE error frame.watch_capacityfrom their last processed cursor and unchanged filter. No-progress replay-to-live boundaries preserve bounded exponential backoff.--redis-follow-pool-sizeand--redis-max-followers; Helm addsredis.follow.poolSizeandredis.follow.maxFollowers. Both default to 32, with1 <= maxFollowers <= poolSizevalidated without clamping.go.workdeclares Go 1.27. The root graph consumes released ToolHive Core v0.0.46 andredisconnv0.0.2 without replacement.Issue relationship
Closes #876
Type of change
Test plan
Baseline checks
task lint)task test)go run ./cmd/mecademo)task docs)task site:build)task api:check)task api:update+engine/CHANGELOG.mdgo run github.com/stacklok/ac-trace/cmd/[email protected] --strict --plan redis-follow-capacity: 20 ACs, 0 failures)/panel-reviewAdditional checks:
task tidy, with no module-file drifttask sdk:linttask sdk:typechecktask sdk:test(43 files, 214 tests)task sdk:api:checkgo test -race ./internal/adapter/redisstore -run '^TestADR_0330_ForceCloseIsFollowOnly$' -count=20The repository-wide
task ac-trace-strictremains blocked by unrelated legacy plans usingproposed; the landed Redis plan passes its strict trace independently.Changes
watch_capacityclassification and cursor-safe reconnect with persistent-capacity backoffredisconnv0.0.2User-facing change
mecak8s operators can reserve and cap Redis follower capacity independently from durability traffic. Saturated watchers receive a typed resumable failure instead of waiting for a shared pool, and SDK attachments reconnect from their checkpoint under bounded backoff.
Special notes for reviewers
3ad4a689bb68db01a21c72995daef1854c295866.PANEL: ship_blockers=0 important=0 advisory=0 reviewer_failures=0