You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs(provisioner): retire stale "-1 = unlimited (team/growth)" comment examples
Bug-hunt iter4 P4-1. The strict-80 margin redesign (merged to common+api
master 2026-06-05) made every tier's postgres_connections and redis_memory_mb
finite (team=100 conns/1536 MB, growth=20 conns/1024 MB, pro=20 conns/512 MB).
No tier passes the -1 "no limit" wire sentinel anymore. The comments still gave
the misleading example "-1 = unlimited (team/growth)" / "team: unlimited (-1)".
Comments-only for production code: the -1/<=0 sentinel branches stay (still the
wire contract; the pool prewarm path still passes -1 deliberately), and the two
dedicated-pod sizing literals (redis k8s maxmemoryMB, postgres k8s connLimit)
are byte-identical — only their surrounding comments are corrected to note the
runtime cap is reconciled to the finite registry value via Regrade.
Also fixes one pre-existing FAILING test left behind by the strict-80 common
bump: TestRegradeResource_Redis_ProTier_AppliesCap/team asserted maxmemory=0
(old team=-1) while the registry now returns 1536. Reworked to derive expected
values from the live plans registry (rule 18) so a future registry change can
never silently drift it again. No production behavior change — the server
already applied the registry value; only the test expectation was stale.
Coverage:
Symptom: comment example "-1 = unlimited (team/growth)" + test want 0
Enumeration: rg -n 'unlimited|connLimit.*-1|-1.*unlimited' internal/
Sites found: stale tier-attributed examples across 6 source files + 2 tests
Sites touched: all stale tier attributions corrected; pure-sentinel mech docs
kept (accurate) with a post-strict-80 note on entry-point docs
Coverage test: TestRegradeResource_Redis_ProTier_AppliesCap now registry-driven
Live verified: doc-only/test-only — make gate green (build+vet+test ./...)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* test(server): cover regradeRedis "no cap" sentinel branch (close 100%-patch gate)
The comment-only edit in this PR re-touched the diff hunk around regradeRedis's
`if memLimitMB < 0 { targetMaxmemoryMB = 0 }` block, pulling that executable
branch into the diff. diff-cover's 100%-patch gate (coverage.yml "Patch coverage
gate") correctly flagged it uncovered — no production tier resolves a negative
redis_memory_mb post the strict-80 margin redesign, so the branch had no test.
Add a registry-seam test (SwapRegradeConnLimits + a fixture plans.yaml with
redis_memory_mb: -1) that drives the sentinel and asserts maxmemory=0 is targeted
(rule 18: registry-derived, not a hand-faked constant). The seam lives in a new
export_test.go so the external server_test package can swap the unexported
package-level registry.
diff-cover now reports internal/server/server.go (100%), Missing: 0 lines.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Manas Srivastava <[email protected]>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments