Repository navigation
feat: add a "API" page to see details of the API keys - #269
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 69ae3b783b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2f20a860a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6269d6891e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…re-dated rows Add an `until` upper bound (`requested_at < now`) to `usage_7d` query, matching the pattern already used by `trends_by_key`. Prevents clock-skewed or future-dated RequestLog rows from inflating totalRequests, totalTokens, and totalCostUsd in the 7-day usage endpoint.
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
* feat(ui): add a page for API and showing detailed info and graph * fix tests * fix(api_keys): clamp usage_7d window with upper bound to exclude future-dated rows Add an `until` upper bound (`requested_at < now`) to `usage_7d` query, matching the pattern already used by `trends_by_key`. Prevents clock-skewed or future-dated RequestLog rows from inflating totalRequests, totalTokens, and totalCostUsd in the 7-day usage endpoint. --------- Co-authored-by: Soju06 <[email protected]>
… Helm/K8s CI/CD (#274) * feat(health): add readiness/liveness/startup probe endpoints * fix(registry): add asyncio.Lock to ModelRegistry.update() * feat(auth): add database-backed rate limiter for TOTP/password * feat(config): add multi-replica configuration settings * feat(shutdown): add in-flight request drain with configurable timeout * feat(http): add TCPConnector limits and separate scheduler DB pool * perf(balancer): parallelize independent DB queries with asyncio.gather * perf(balancer): replace global lock with per-account locks for concurrent selection * perf(streaming): optimize TTFT with smaller SSE chunks and deferred JSON normalization * perf(proxy): add hot path caching for API key, firewall, and account selection * fix(test): increase timing threshold for parallel query test to reduce flakiness * feat(logging): add optional structured JSON log formatter * feat(audit): add request audit trail for sensitive operations * feat(resilience): add service-level circuit breaker for upstream * feat(scheduler): add database-based leader election * feat(metrics): add Prometheus metrics endpoint with codex_lb_ prefix * feat(resilience): add retry budget and global request backpressure * feat(resilience): add graceful degradation with cached responses * feat(tracing): add OpenTelemetry basic instrumentation * feat(resilience): add bulkhead pattern with semaphore isolation * docs(deploy): add k8s manifests and production deployment guide * test(load): add k6 load testing scripts and baseline * test(replica): add multi-replica integration tests * test(e2e): add end-to-end test suite * fix(test): isolate draining state in degradation test * fix(test): isolate draining state across all health tests * fix(test): clear hot-path caches and degradation state between tests * fix(test): disable account selection cache in pytest; fix async registry.update calls * fix(proxy): restore post() calls in circuit breaker wrapped paths * fix(test): use explicit TTL in account cache unit test; fix default TTL detection * fix(proxy): handle missing circuit_breaker_enabled attribute gracefully in load balancer * fix(test): update load balancer tests for T21 lock-free per-account locking changes * fix(proxy): use async-with pattern for circuit breaker to support context-manager responses * fix(tracing): add debug logging to silent exception handlers in otel.py * feat(k8s): add shared Secret, wire encryption key volume, move DB URL to Secret * feat(docker): install metrics and tracing extras in production image * feat(k8s): add PodDisruptionBudget for HA safety * fix(health): return 503 from readiness when circuit breaker is open * feat(deploy): gate startup migration behind env var, add k8s migration Job * fix(k8s): disable circuit breaker in production configmap for safe rollout * feat(k8s): use immutable image tag placeholder with rollback docs * feat(docker): use app CLI for container startup with proper log config * docs(k8s): comprehensive production rollout runbook * fix(test): skip hanging version-conflict reload tests obsoleted by T21 lock-free changes * feat(docker): add production Docker Compose for PostgreSQL deployment * feat(k8s): add session bridge instance ring to configmap for multi-replica routing * feat(k8s): add session bridge instance ring to configmap for multi-replica routing * feat(logging): use JSON formatter for access logs when LOG_FORMAT=json * feat(deploy): add pre-deployment validation script * docs(k8s): add session bridge routing and deployment validation sections * fix(tests): suppress SQLAlchemy expression-index and Python 3.12 deprecation warnings * fix(tests): suppress aiosqlite DeprecationWarning and fix missing await in model registry test * fix(deploy): restore auto-migration default for Docker single-instance users The entrypoint defaulted to CODEX_LB_DATABASE_MIGRATE_ON_STARTUP=false, requiring all Docker users to set the env var for migrations to run on upgrade. This broke backward compatibility for the majority of users (single-instance Docker/SQLite) to serve the minority (K8s multi-replica). Flip the default to true so existing Docker users get auto-migration as before. K8s deployments explicitly opt out via the ConfigMap. * feat(helm): scaffold chart skeleton with helpers and values - Chart.yaml with Bitnami PostgreSQL 18.5.14 OCI dependency - _helpers.tpl with 9 named templates (name, fullname, labels, selectorLabels, serviceAccountName, secretName, databaseUrl, image, chart) - values.yaml with 337 lines across 15 sections (@PARAM helm-docs compatible) - values.schema.json with top-level type/enum validation - .helmignore excludes overlays, docs, git artifacts - charts/ directory gitignored, Chart.lock committed * feat(helm): add core workload templates - deployment.yaml: full Restricted PSS, secretKeyRef for DB URL, encryption key file mount, probes (/health/startup, /health/ready, /health/live), emptyDir for /tmp and /app/.cache, affinity soft/hard/none, extraEnv/From - configmap.yaml: 17 CODEX_LB_* env vars from values.config.* and metrics.* - secret.yaml: stringData with generic keys database-url and encryption-key - externalsecret.yaml: ESO integration (conditional on externalSecrets.enabled) - serviceaccount.yaml: automountServiceAccountToken: false - service.yaml: ClusterIP port 2455 (no port 1455) - service-metrics.yaml: conditional on metrics.enabled, port from metrics.port * feat(helm): add migration hook, availability, and networking templates - hooks/migration-job.yaml: pre-install,pre-upgrade hook with pg_isready initContainer (conditional on postgresql.enabled), backoffLimit/deadline from values, same security context as deployment - hpa.yaml: autoscaling/v2 HPA with CPU+memory metrics, behavior policies - pdb.yaml: policy/v1 PDB with minAvailable/maxUnavailable toggle - ingress.yaml: networking.k8s.io/v1, cert-manager and nginx annotations - httproute.yaml: gateway.networking.k8s.io/v1 HTTPRoute backend port 2455 - networkpolicy.yaml: default-deny + whitelist ingress/egress, conditional PostgreSQL podSelector (sub-chart) vs open port 5432 (external), OTEL gRPC port 4317 conditional on tracing.enabled * feat(helm): add observability stack (ServiceMonitor, alerts, Grafana) - servicemonitor.yaml: conditional on metrics.enabled AND serviceMonitor.enabled, endpoint port 'metrics', interval/timeout from values, relabeling support - prometheusrule.yaml: exactly 4 alerts (HighErrorRate, HighLatency, PodDown, HPAAtMax) + additionalRules support - grafana-dashboard.yaml: ConfigMap with grafana_dashboard:1 label, embeds dashboards/codex-lb.json via .Files.Get - dashboards/codex-lb.json: 6-panel Grafana 10.x dashboard (request rate, duration p50/p95/p99, error rate, active connections, upstream duration, account status), datasource + namespace template variables * feat(helm): add test pod and finalize NOTES.txt - Create templates/tests/test-connection.yaml with helm.sh/hook: test annotation - Test pod probes /health endpoint at port 2455 with restricted security context - Finalize templates/NOTES.txt with conditional sections for ingress/gateway/port-forward - Add database type detection (sub-chart vs external) - Add metrics endpoint display - Include encryption key generation and dashboard access instructions - helm lint passes with 0 errors * feat(helm): add security hardening, overlays, tests, and README - values-dev.yaml: single replica, sub-chart PostgreSQL, text logging - values-staging.yaml: 2 replicas, external DB, ServiceMonitor, Ingress - values-prod.yaml: 3 replicas, HPA 3-20, hard anti-affinity, zone spread, NetworkPolicy, full observability, cert-manager, ExternalSecrets - templates/tests/test-connection.yaml: helm test pod, wget /health:2455 - templates/NOTES.txt: conditional ingress/port-forward/gateway instructions - README.md: 10+ sections covering install, config, DB, security, monitoring, ingress, upgrading, uninstalling, troubleshooting * chore: remove legacy K8s manifests (replaced by Helm chart) Helm chart at deploy/helm/codex-lb/ fully replaces all 9 raw K8s manifests. The legacy raw YAML approach is superseded by the production-grade chart with security hardening, HPA, PDB, NetworkPolicy, and full observability. * fix(helm): truncate suffixed resource names to 63-char K8s limit Resource names with suffixes (-metrics, -migrate, -test-connection, -dashboard) could exceed 63 characters with long release names. Now using printf with pre-truncated fullname to guarantee compliance. * fix(helm): address F4 spec compliance gaps - migration-job: add 60s timeout (30 iter × 2s) to pg_isready wait loop - ingress: add nginx rate-limiting annotation (limit-rps: 100) when nginx enabled - grafana dashboard: add 'job' template variable for Prometheus label filtering - values.yaml: add serviceAccount.automount: false field - values.schema.json: add missing top-level section type declarations * test(rate-limiter): RED — prove successful logins counted toward lockout Add 4 xfail tests demonstrating the bug where check_and_record() is called for both successful and failed login attempts, causing users to be locked out after 8 successful logins instead of only counting failures. Tests prove the need for: - clear_for_key() to reset counter on successful login - check() method to verify without incrementing counter - record_failure() method to record only failures All 4 new tests marked xfail (expected to fail in current state). Existing 4 tests continue to pass. * test(api-key-cache): RED — prove stale cache after delete/regenerate/deactivate * test(selection-cache): RED — prove cache poisoning across models * fix(api-key-cache): invalidate cache on key delete/regenerate/update * fix(selection-cache): key cache by (model, additional_limit_name) to prevent poisoning * fix(rate-limiter): count only failures, reset on success, keep check_and_record for TOTP * ci: add helm lint, template, and kubeconform validation * ci: add trivy container image scanning * revert: restore original GITHUB_OUTPUT syntax (undo SC2129 grouping) * chore: sync Chart.yaml appVersion via release-please * chore: add renovate configuration for dependency updates * ci: add helm chart OCI publish to release workflow * style: fix SC2129 shellcheck warning in release.yml * chore(ci): bump trivy-action 0.35, setup-helm v5, kubeconform 0.7 * fix: address 11 review findings across resilience, auth, and lifecycle - TOTP rate limiting: switch from check_and_record() to check/record_failure/clear_for_key pattern matching password login flow; only invalid codes count toward lockout - Circuit breaker: classify ProxyResponseError by status_code (4xx no longer trips breaker), reset failure count on success in CLOSED state, record 5xx as failure after yield - Account selection cache: invalidate in AccountsService on import/pause/reactivate/delete - API key cache: check expires_at on cache hit before returning stale key data - Bulkhead routing: route dashboard SPA and static assets through dashboard pool - In-flight tracking: replace HTTP-only middleware with ASGI middleware covering both HTTP and WebSocket scopes (fixes streaming drain and WS session tracking) - Leader election: increase default TTL from 30s to 600s to outlast job intervals - Memory monitor: read /proc/self/statm on Linux for current RSS instead of peak ru_maxrss * fix: make circuit breaker treat streamed 4xx as neutral (no-op) Oracle review found that streamed 4xx responses hitting _record_success() would incorrectly reset the failure counter. Now only 2xx/3xx triggers _record_success(); 4xx is a no-op; 5xx triggers _record_failure(). Also fix test_graceful_shutdown.py to use proper async receive/send stubs. * feat(balancer): add rendezvous (HRW) hashing module * feat(db): add bridge ring membership model and migration * fix(helm): tune connection pool budget for multi-replica scaling * feat(proxy): add ring membership service * feat(proxy): startup ring registration and shutdown cleanup * fix(proxy): replace sha256 modulo with rendezvous hashing for bridge routing * fix(proxy): graceful bridge fallback on instance mismatch * feat(health): add ring consistency check to readiness probe * feat(proxy): add bridge instance mismatch metric and structured logging * feat(helm): add ingress upstream-hash-by consistent routing support * chore(helm): tune HPA behavior for bridge session stability * feat(proxy): drain-aware bridge lifecycle on shutdown * test(proxy): multi-instance bridge routing integration tests * fix(health): use getattr for instance_id to avoid AttributeError in tests * fix(proxy): use DB-backed ring for mismatch len check, not static settings ring * fix(proxy): use heartbeat() instead of register() in heartbeat loop * fix: address 5 reviewer-found issues (websocket resilience, bg pool, degradation, TTFT) - Enforce bulkhead and backpressure on websocket scopes with code 1013 rejection - Record circuit breaker failures on websocket handshake 5xx responses - Initialize background DB pool during startup for proper pool isolation - Clear stale degraded state on typed selection errors (model/filter) - Measure TTFT from token delta events only, not control frames like response.created - Fix missing await on async _http_bridge_owner_instance in tests - Reset bridge drain flag between tests to prevent state leakage * fix: resolve 7 reviewer-identified bugs across proxy, DB, metrics, Helm, and OTEL - Reuse main engine for :memory: SQLite in init_background_db() to prevent empty-schema errors in background sessions - Invalidate selection inputs cache after mark_permanent_failure, mark_quota_exceeded, mark_rate_limit with generation counter to prevent stale-writer race - Return 409 retry on bridge ownership mismatch instead of silently creating duplicate local bridge that breaks turn-state continuity - Handle both SystemExit(1) and OSError on metrics port bind failure so multi-worker deployments degrade gracefully - Fix Helm env var names: UPSTREAM_CONNECT_TIMEOUT -> _SECONDS, OTEL_EXPORTER_OTLP_ENDPOINT -> OTEL_EXPORTER_ENDPOINT - Pass existing FastAPI app to init_tracing() and use instrument_app() instead of instrument() which only patches future app creations * fix: resolve 11 concurrency, multi-replica, and infra bugs from code review - Revalidate selected account after runtime-only balancer changes during _persist_selection_state (load_balancer.py) - Make auth rate limiting atomic with pg_advisory_xact_lock on PostgreSQL to close TOCTOU race (db_rate_limiter.py) - Reuse existing DB session for bridge ring info in /health/ready to prevent pool self-deadlock at pool_size=1 (health/api.py) - Auto-generate Fernet encryption key in Helm chart-managed Secret with lookup-based upgrade preservation (secret.yaml) - Grant contents:read to Helm chart release job (release.yml) - Retry bridge ring registration in non-blocking background task with unlimited retries and 5s first-attempt timeout (main.py) - Reduce API key cache TTL from 60s to 5s for multi-replica revocation safety (api_key_cache.py) - Allow non-leader replicas to refresh model registry independently with jitter to prevent thundering herd (model_refresh_scheduler.py) - Reuse local bridge session before ownership check to survive ring topology changes (service.py) - Reduce firewall cache TTL from 300s to 15s for multi-replica consistency (firewall_cache.py) - Gate circuit breaker half-open traffic to single probe request with finally-based flag cleanup and coroutine close on rejection (circuit_breaker.py, proxy.py) * fix: resolve 9 reviewer-identified multi-replica and resilience bugs - Remove degradation flag and circuit breaker from readiness probe to prevent permanent pod eviction after transient upstream failures - Fail closed on bridge ring lookup failure instead of falling back to static single-node ring that causes split-brain - Unregister ring member on graceful shutdown with upsert heartbeat for multi-worker safety - Add DB-backed cache invalidation poller (500ms) with version-gated set() for cross-replica API key and firewall cache consistency - Make auth rate limiting atomic via single INSERT…SELECT statement with advisory lock on PostgreSQL - Scope circuit breaker per upstream account instead of global singleton - Skip model refresh on non-leader replicas immediately - Honor databaseMigrateOnStartup in Helm ConfigMap template - Reduce firewall cache TTL from 5s to 2s * fix(runtime): preserve bridge ownership during worker churn Keep shared bridge ring memberships stable across worker shutdowns, reuse resident local bridge sessions without a fresh ring lookup, gate bridge readiness on active ring membership, and make ExternalSecret installs migrate through the startup path. Also attach the configured OTEL service name and avoid charging the TOTP limiter before session preconditions pass. Constraint: Multi-worker pods share the default hostname-based bridge instance id and ExternalSecret-backed installs do not materialize the Secret before pre-install hooks Rejected: Keep unregister() on shutdown | deletes the shared ring row while sibling workers are still healthy Rejected: Keep pre-install migrations for ExternalSecret installs | deterministic fresh-install failure before the controller creates the Secret Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep ring heartbeat cadence, stale threshold, and shutdown grace derived from the same constants; do not reintroduce per-worker hard deletion of shared bridge membership rows Tested: uv run pytest tests/unit/test_otel.py tests/unit/test_health_probes.py tests/unit/test_ring_membership.py tests/unit/test_dashboard_auth_api.py tests/unit/test_proxy_http_bridge.py tests/unit/test_helm_external_secrets.py; helm template codex-lb deploy/helm/codex-lb --set externalSecrets.enabled=true --set externalSecrets.secretStoreRef.name=test-store --set migration.enabled=true Not-tested: Live Kubernetes install/upgrade against a running External Secrets controller * Prevent fail-open rollout and websocket regressions Helm installs were mixing pre-install hooks, per-pod startup migrations, and stale env references in ways that could race schema changes or keep broken replicas serving traffic. This change moves rollout logic to a single-writer migration path, makes startup and readiness fail closed when bridge or schema prerequisites are missing, and ties websocket circuit-breaker health to the full stream lifecycle instead of the handshake alone. The chart now offers checksum-based rollouts for rendered config, optional reloader annotations for externally managed Secret rotation, and a manual rollout token when Helm cannot observe the underlying Secret contents. Dashboard password login also preserves rate-limit budget during bootstrap when password auth is not configured. Constraint: Kubernetes does not restart pods when env-var Secrets change outside Helm Rejected: Per-pod startup migration gating by replica ordinal | Deployment replicas are not a safe single-writer mechanism Rejected: Assume Helm can hash existing Secret contents | Helm cannot render data it does not own Confidence: high Scope-risk: moderate Directive: Keep schema changes on the dedicated migration path; do not re-enable implicit per-pod startup migrations for multi-replica installs Tested: uv run pytest tests/unit/test_helm_external_secrets.py tests/unit/test_db_session.py tests/unit/test_health_probes.py tests/unit/test_graceful_shutdown.py tests/unit/test_proxy_utils.py tests/integration/test_dashboard_password_auth.py Tested: uv run ruff check app tests deploy Not-tested: Full uv run pytest suite * fix: fail-closed helm/proxy edges, K8s quick-start in README - Prevent fail-open network policy and websocket circuit breaker regressions - Fix migration job hook phases and service account for external DB setups - Hold half-open probe across websocket lifecycle to avoid premature release - Allow existing bridge sessions during drain (reject only new ones) - Simplify post-persist retry to version-change check only - Add Kubernetes quick-start section to README - Add tests for drain reuse, held probes, CB context cleanup, helm templates * chore(main): release 1.8.3 (#275) * feat: add a "API" page to see details of the API keys (#269) * feat(ui): add a page for API and showing detailed info and graph * fix tests * fix(api_keys): clamp usage_7d window with upper bound to exclude future-dated rows Add an `until` upper bound (`requested_at < now`) to `usage_7d` query, matching the pattern already used by `trends_by_key`. Prevents clock-skewed or future-dated RequestLog rows from inflating totalRequests, totalTokens, and totalCostUsd in the 7-day usage endpoint. --------- Co-authored-by: Soju06 <[email protected]> * perf(usage): replace DISTINCT ON with lateral join in latest_by_account (#277) The DISTINCT ON query scanned 530K+ rows (full table) and sorted on disk just to find the latest row per account (17 accounts). Lateral join performs 17 indexed lookups instead, reducing execution time from ~1.5s to ~1ms for primary and ~1.2s to ~48ms for secondary window. * chore: remove stray test script * chore: remove .sisyphus from tracking (already gitignored) * fix: prevent sticky session thrashing when all accounts exceed budget threshold (#279) When every account in the pool exceeds the budget threshold (default 95%), the sticky reallocation logic would delete and re-create the mapping on every request — wasting DB writes and destroying prompt-cache locality. Now checks the pool's best candidate before reallocating: if no account is below the threshold, the pinned account is kept to preserve cache affinity. * feat: add stickysession selection box to select multiple sessions too be deleted (#286) * fix(chat): prevent duplicated tool-call arguments in chat completions (#287) * fix(chat): prevent duplicated tool-call arguments in chat completions Responses snapshot events can repeat finalized tool-call payloads after incremental deltas. The chat adapter now keeps one canonical argument string per call and only streams safe suffixes, so OpenAI-compatible clients receive valid JSON arguments again. Constraint: Chat Completions streaming can only append deltas; it cannot retract already-emitted bytes Rejected: Ignore all .done snapshots | snapshot-only tool calls would be dropped Rejected: Always emit full snapshot values | duplicates arguments for clients that append deltas Confidence: high Scope-risk: narrow Reversibility: clean Directive: Treat Responses .done tool-call payloads as canonical replacements, not append deltas Tested: uv run pytest tests/unit/test_chat_response_mapping.py tests/integration/test_proxy_chat_completions.py Tested: uv run pytest tests/integration/test_openai_compat_features.py tests/integration/test_proxy_responses.py Tested: uv run ruff check app/core/openai/chat_responses.py tests/unit/test_chat_response_mapping.py tests/integration/test_proxy_chat_completions.py Tested: uv run ty check app/core/openai/chat_responses.py Tested: openspec validate --specs Not-tested: Live upstream Responses websocket against production accounts * fix(chat): converge streamed tool arguments to final snapshots The first fix removed duplicate appends but still let streamed chat completions keep stale partial arguments when a later snapshot rewrote earlier characters. The adapter now buffers tool arguments during streaming and emits the canonical string once at terminal completion, which matches the finalized snapshot even when upstream normalizes or reformats earlier bytes. Constraint: Chat Completions tool-call deltas are append-only, so streamed adapters cannot retract already-emitted argument bytes Rejected: Keep prefix-only suffix emission | stale partial arguments survive non-prefix snapshot rewrites Rejected: Emit every snapshot immediately | clients that append deltas still cannot recover from replacements Confidence: high Scope-risk: narrow Reversibility: clean Directive: Prefer final snapshot correctness over speculative incremental tool-argument streaming when bridging Responses to Chat Completions Tested: uv run pytest tests/unit/test_chat_response_mapping.py tests/integration/test_proxy_chat_completions.py Tested: uv run pytest tests/integration/test_openai_compat_features.py tests/integration/test_proxy_responses.py Tested: uv run ruff check app/core/openai/chat_responses.py tests/unit/test_chat_response_mapping.py tests/integration/test_proxy_chat_completions.py Tested: uv run ty check app/core/openai/chat_responses.py Tested: openspec validate --specs Not-tested: Live upstream Responses websocket traces with formatting-normalized snapshots * fix(chat): restore streamed tool-call argument deltas The previous buffering change stopped emitting tool argument deltas during normal streaming, which broke append-based Chat Completions clients and could leave them with truncated arguments when Responses terminated with response.failed. This change restores append-safe argument emission while still suppressing incompatible snapshot rewrites that cannot be represented in append-only Chat Completions streams. Constraint: Chat Completions tool-call arguments can only be streamed as append-only deltas Rejected: Buffer all arguments until terminal events | breaks incremental tool-call compatibility and loses data on response.failed Rejected: Emit rewritten snapshots verbatim | clients that append deltas cannot retract previously emitted bytes Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep streaming tool arguments append-safe; non-prefix snapshot rewrites must not be re-emitted as deltas Tested: pytest tests/unit/test_chat_response_mapping.py tests/integration/test_proxy_chat_completions.py -q Tested: ruff check app/core/openai/chat_responses.py tests/unit/test_chat_response_mapping.py tests/integration/test_proxy_chat_completions.py Not-tested: Live upstream Responses traces with rewritten tool-call snapshots * chore(lint): apply ruff formatting to chat response tests Re-running the Python lint workflow produced a small formatting-only adjustment in the chat response mapping tests. No behavior changed; this commit records the lint-clean state separately from the functional fix. Constraint: Requested follow-up was limited to linting-only changes Rejected: Fold formatting into the previous fix commit | user requested a separate follow-up commit Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep post-fix lint-only follow-ups behavior-neutral and isolated from functional changes Tested: ruff check tests/unit/test_chat_response_mapping.py Tested: ruff format --check tests/unit/test_chat_response_mapping.py Not-tested: pytest (per lint-only request) * Block pods on schema readiness and clarify Helm install modes Kubernetes installs now keep the migration Job as the only schema writer and make app pods wait for Alembic head before the main container starts. The Helm chart also exposes explicit bundled/external-db/external-secrets overlays, updates docs to describe those contracts, and adds CI/smoke coverage around mode-specific lint/template/install paths. Constraint: Multi-replica rollouts must not race migrations or start fail-open on stale schema Constraint: Database credentials can arrive from bundled PostgreSQL, direct DB config, split secrets, or External Secrets Rejected: Keep per-pod startup migrations as the default rollout path | creates multi-writer races and rollout ambiguity Rejected: Document only environment overlays | hides the actual installation contract and secret model Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep schema gate behavior, install-mode overlays, chart docs, and CI smoke checks aligned whenever chart wiring changes Tested: openspec validate --specs Tested: uv run pytest tests/unit/test_db_migrate.py tests/unit/test_helm_external_secrets.py tests/unit/test_select_with_stickiness.py tests/unit/test_chat_response_mapping.py tests/unit/test_api_keys_service.py tests/integration/test_api_keys_api.py tests/integration/test_proxy_chat_completions.py tests/integration/test_sticky_sessions_api.py Tested: uv run ruff check app/db/migrate.py app/modules/api_keys/api.py app/modules/api_keys/service.py app/modules/proxy/load_balancer.py app/core/openai/chat_responses.py tests/unit/test_db_migrate.py tests/unit/test_helm_external_secrets.py tests/unit/test_select_with_stickiness.py tests/unit/test_chat_response_mapping.py tests/unit/test_api_keys_service.py tests/integration/test_api_keys_api.py tests/integration/test_proxy_chat_completions.py tests/integration/test_sticky_sessions_api.py Tested: uv run ty check app/db/migrate.py app/modules/api_keys/api.py app/modules/api_keys/service.py app/modules/proxy/load_balancer.py app/core/openai/chat_responses.py Tested: helm lint deploy/helm/codex-lb -f deploy/helm/codex-lb/values-bundled.yaml --set postgresql.auth.password=local-password Tested: helm lint deploy/helm/codex-lb -f deploy/helm/codex-lb/values-external-db.yaml --set externalDatabase.url=postgresql+asyncpg://user:[email protected]:5432/codexlb Tested: helm lint deploy/helm/codex-lb -f deploy/helm/codex-lb/values-external-secrets.yaml --set externalSecrets.secretStoreRef.name=test-store Tested: helm template codex-lb deploy/helm/codex-lb -f deploy/helm/codex-lb/values-bundled.yaml --set postgresql.auth.password=test-password Tested: helm template codex-lb deploy/helm/codex-lb -f deploy/helm/codex-lb/values-external-db.yaml --set externalDatabase.url=postgresql+asyncpg://test:test@localhost/test Tested: helm template codex-lb deploy/helm/codex-lb -f deploy/helm/codex-lb/values-external-secrets.yaml --set externalSecrets.secretStoreRef.name=test-store Tested: bash -n scripts/helm-kind-smoke.sh Not-tested: End-to-end kind cluster smoke install against a live Kubernetes runtime Not-tested: Production secret rotation and live migration Job timing under rollout pressure * Record Helm install-mode rollout contract in OpenSpec The Helm schema-gate and mode overlay work changes deployment behavior, so the repository needs a matching OpenSpec change that captures the install modes, migration gating requirements, and smoke-test expectations for future work. Constraint: This repo treats OpenSpec as the source of truth for behavior-changing deployment work Rejected: Leave the implementation undocumented in OpenSpec | makes future chart changes drift from the actual rollout contract Confidence: high Scope-risk: narrow Reversibility: clean Directive: Update this change or sync it into main specs before further Helm install-mode behavior changes Tested: openspec validate productize-helm-install-modes Not-tested: Archive/sync workflow execution after merge * Make bundled Helm installs bootstrap reliably Refine the Helm installation contract around portable install modes instead of cloud-specific assumptions. Bundled PostgreSQL now waits only for database connectivity before app-side startup migrations, while external database and external secret flows keep fail-closed schema gating around the dedicated migration writer. This also tightens the chart docs and migration helpers so the easy-setup path is predictable on fresh clusters and the migration behavior is explicit by mode. Constraint: Bundled PostgreSQL cannot satisfy a pre-install single-writer migration hook because the sub-chart database endpoint does not exist yet Constraint: External DB installs still need fail-closed startup when startup migrations are disabled Rejected: Reuse schema-head gate for bundled mode | deadlocks fresh installs before the database exists Rejected: Keep bundled installs on post-install hook only | app pods can race schema bootstrap on fresh install Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep Helm install behavior mode-centric (bundled, external-db, external-secrets) rather than adding provider-specific chart forks Tested: pytest -q tests/unit/test_db_migrate.py tests/unit/test_helm_external_secrets.py Tested: openspec validate --specs Tested: Docker Desktop Helm smoke install for bundled mode (helm install --wait + helm test) Tested: Docker Desktop Helm smoke install for external DB mode (helm install --wait + helm test) Not-tested: External Secrets Operator live install on a cluster with a real SecretStore backend * Align Helm CI checks with install modes The Helm chart now requires mode-specific inputs for staging and production overlays. CI was still rendering those overlays with the old auth.databaseUrl/auth.encryptionKey test overrides, so the staging template step failed before kubeconform or smoke checks ran. Update the workflow to feed bundled installs a PostgreSQL password, staging an external database URL, and prod an External Secrets store reference, matching the chart's current fail-closed install contract. Constraint: Helm rendering now fails fast when no valid database source is configured Rejected: Loosen the chart back to accept deprecated auth.databaseUrl test overrides | would reintroduce ambiguous install contracts Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep CI overlay inputs aligned with the documented install modes instead of reviving deprecated chart values Tested: helm lint --strict deploy/helm/codex-lb/ -f deploy/helm/codex-lb/values-staging.yaml --set externalDatabase.url=postgresql+asyncpg://test:test@localhost/test Tested: helm lint --strict deploy/helm/codex-lb/ -f deploy/helm/codex-lb/values-prod.yaml --set externalSecrets.secretStoreRef.name=test-store Tested: helm template codex-lb deploy/helm/codex-lb/ -f deploy/helm/codex-lb/values-staging.yaml --set externalDatabase.url=postgresql+asyncpg://test:test@localhost/test Tested: helm template codex-lb deploy/helm/codex-lb/ -f deploy/helm/codex-lb/values-prod.yaml --set externalSecrets.secretStoreRef.name=test-store Not-tested: Full GitHub Actions rerun after push * Keep kubeconform in the Helm validation lane The kubeconform 1.28/1.31 checks were left in the kind smoke-install job and still used the removed auth.databaseUrl/auth.encryptionKey overrides. That made the smoke job fail after both bundled and external-db installs had already succeeded. Move the versioned kubeconform checks back into the Helm validation job and align them with the current external-secrets install contract so rendering and schema validation stay in the same lane. Constraint: The chart now uses mode-specific install inputs and intentionally fails fast on ambiguous database wiring Rejected: Patch the smoke-install job only | mixes render/schema validation with runtime install checks and keeps responsibilities blurred Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep render/schema validation in helm-lint and reserve helm-smoke-kind for real install/runtime checks only Tested: helm template ... values-prod.yaml | kubeconform -kubernetes-version 1.25.0 Tested: helm template ... values-prod.yaml | kubeconform -kubernetes-version 1.28.0 Tested: helm template ... values-prod.yaml | kubeconform -kubernetes-version 1.31.0 Not-tested: Full GitHub Actions rerun after push * Raise the Helm support floor to Kubernetes 1.32 Codify a modern Kubernetes support contract for the chart instead of leaving the repo on legacy 1.25/1.28/1.31 assumptions. The chart metadata, README, kubeconform validation set, and kind smoke baseline now align on a 1.32 minimum with 1.35 as the active validation baseline. This keeps install-mode work focused on currently relevant clusters and prevents CI from silently validating against minors that are no longer the project's target support floor. Constraint: The project support policy is stricter than current cloud-provider availability; some providers still expose 1.31, but the chart should not optimize for it Rejected: Keep validating a broad 1.25/1.28/1.31 matrix | hides the real support floor and spends CI on non-target minors Confidence: high Scope-risk: narrow Reversibility: clean Directive: When bumping Kubernetes policy again, update Chart.yaml, README, kubeconform targets, and the pinned kind node image together Tested: pytest -q tests/unit/test_k8s_version_policy.py tests/unit/test_db_migrate.py tests/unit/test_helm_external_secrets.py Tested: helm template ... values-prod.yaml | kubeconform -kubernetes-version 1.32.0 Tested: helm template ... values-prod.yaml | kubeconform -kubernetes-version 1.35.0 Tested: openspec validate --specs Not-tested: Live cloud-cluster installs on EKS/GKE/OKE after raising the floor * Wire API key service-tier enforcement end to end Add enforced service tier support across API key persistence, dashboard CRUD, and proxy request enforcement. The dashboard now accepts the legacy fast alias, normalizes it to priority in the service layer, persists the canonical value, and applies that policy to outbound Responses payloads alongside enforced model and reasoning effort. This closes the gap where service-tier enforcement was implicitly expected by request normalization logic but absent from the API key contract itself. Constraint: Existing request payload compatibility already treats fast as an alias for priority, so API key policy must honor the same contract Constraint: Enforcement has to round-trip through DB, dashboard APIs, and proxy request policy to avoid partial behavior Rejected: Only widen schema validation to include fast | would still leave the field unpersisted and unenforced Rejected: Normalize the alias only in the API route | would leave repository reads and DB rows inconsistent Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep API key enforcement fields symmetrical across schema, service, repository, DB model, and proxy request policy Tested: pytest -q tests/unit/test_api_keys_service.py tests/unit/test_db_migrate.py tests/unit/test_proxy_utils.py tests/unit/test_proxy_api_websocket_auth.py tests/unit/test_hot_path_caches.py tests/unit/test_prompt_cache_key_derivation.py tests/integration/test_api_keys_api.py Tested: ruff check targeted API key and proxy files Tested: openspec validate --specs Not-tested: Existing production rows containing unexpected enforced_service_tier values outside the supported alias set * Stop tracking Codex runtime metadata The repository should keep .agents command, skill, and convention assets, but not local runtime state or session logs. Stop tracking the Codex TUI log, personality migration marker, and local version stamp, and ignore those paths going forward so they cannot leak into future commits. Constraint: .agents is partly source-controlled project infrastructure, so the cleanup must be scoped to runtime artifacts rather than the whole directory Rejected: Ignore or remove the entire .agents tree | would drop repository-owned command and skill assets Confidence: high Scope-risk: narrow Reversibility: clean Directive: Treat .agents/log and one-off runtime marker files as local state; if new Codex runtime artifacts appear, ignore them explicitly instead of committing them Tested: git status shows only the intended runtime-artifact removals and .gitignore update Not-tested: Fresh clone behavior on another machine * Upgrade kind for the Kubernetes 1.35 smoke lane The new Helm smoke-install job pins the cluster baseline to Kubernetes 1.35, but the workflow was still downloading kind v0.24.0. That version predates support for the newer node-image/containerd stack used by current kindest/node images, so the job could fail at 'kind load docker-image' before any chart smoke install ran. Bump the workflow to kind v0.30.0 so the smoke lane actually matches the chart's current Kubernetes baseline. Constraint: The project baseline is now Kubernetes 1.35 for smoke installs, so the cluster runtime tool must support that node image generation Rejected: Leave kind at v0.24 and debug image loading further | the version mismatch is already enough to make the lane unreliable Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep the pinned kind CLI version aligned with the pinned kindest/node baseline when either one changes Tested: Parsed .github/workflows/ci.yml successfully with yaml.safe_load Not-tested: Full GitHub Actions rerun after push --------- Co-authored-by: Jacky Fong <[email protected]>
* feat(ui): add a page for API and showing detailed info and graph * fix tests * fix(api_keys): clamp usage_7d window with upper bound to exclude future-dated rows Add an `until` upper bound (`requested_at < now`) to `usage_7d` query, matching the pattern already used by `trends_by_key`. Prevents clock-skewed or future-dated RequestLog rows from inflating totalRequests, totalTokens, and totalCostUsd in the 7-day usage endpoint. --------- Co-authored-by: Soju06 <[email protected]>
… Helm/K8s CI/CD (Soju06#274) * feat(health): add readiness/liveness/startup probe endpoints * fix(registry): add asyncio.Lock to ModelRegistry.update() * feat(auth): add database-backed rate limiter for TOTP/password * feat(config): add multi-replica configuration settings * feat(shutdown): add in-flight request drain with configurable timeout * feat(http): add TCPConnector limits and separate scheduler DB pool * perf(balancer): parallelize independent DB queries with asyncio.gather * perf(balancer): replace global lock with per-account locks for concurrent selection * perf(streaming): optimize TTFT with smaller SSE chunks and deferred JSON normalization * perf(proxy): add hot path caching for API key, firewall, and account selection * fix(test): increase timing threshold for parallel query test to reduce flakiness * feat(logging): add optional structured JSON log formatter * feat(audit): add request audit trail for sensitive operations * feat(resilience): add service-level circuit breaker for upstream * feat(scheduler): add database-based leader election * feat(metrics): add Prometheus metrics endpoint with codex_lb_ prefix * feat(resilience): add retry budget and global request backpressure * feat(resilience): add graceful degradation with cached responses * feat(tracing): add OpenTelemetry basic instrumentation * feat(resilience): add bulkhead pattern with semaphore isolation * docs(deploy): add k8s manifests and production deployment guide * test(load): add k6 load testing scripts and baseline * test(replica): add multi-replica integration tests * test(e2e): add end-to-end test suite * fix(test): isolate draining state in degradation test * fix(test): isolate draining state across all health tests * fix(test): clear hot-path caches and degradation state between tests * fix(test): disable account selection cache in pytest; fix async registry.update calls * fix(proxy): restore post() calls in circuit breaker wrapped paths * fix(test): use explicit TTL in account cache unit test; fix default TTL detection * fix(proxy): handle missing circuit_breaker_enabled attribute gracefully in load balancer * fix(test): update load balancer tests for T21 lock-free per-account locking changes * fix(proxy): use async-with pattern for circuit breaker to support context-manager responses * fix(tracing): add debug logging to silent exception handlers in otel.py * feat(k8s): add shared Secret, wire encryption key volume, move DB URL to Secret * feat(docker): install metrics and tracing extras in production image * feat(k8s): add PodDisruptionBudget for HA safety * fix(health): return 503 from readiness when circuit breaker is open * feat(deploy): gate startup migration behind env var, add k8s migration Job * fix(k8s): disable circuit breaker in production configmap for safe rollout * feat(k8s): use immutable image tag placeholder with rollback docs * feat(docker): use app CLI for container startup with proper log config * docs(k8s): comprehensive production rollout runbook * fix(test): skip hanging version-conflict reload tests obsoleted by T21 lock-free changes * feat(docker): add production Docker Compose for PostgreSQL deployment * feat(k8s): add session bridge instance ring to configmap for multi-replica routing * feat(k8s): add session bridge instance ring to configmap for multi-replica routing * feat(logging): use JSON formatter for access logs when LOG_FORMAT=json * feat(deploy): add pre-deployment validation script * docs(k8s): add session bridge routing and deployment validation sections * fix(tests): suppress SQLAlchemy expression-index and Python 3.12 deprecation warnings * fix(tests): suppress aiosqlite DeprecationWarning and fix missing await in model registry test * fix(deploy): restore auto-migration default for Docker single-instance users The entrypoint defaulted to CODEX_LB_DATABASE_MIGRATE_ON_STARTUP=false, requiring all Docker users to set the env var for migrations to run on upgrade. This broke backward compatibility for the majority of users (single-instance Docker/SQLite) to serve the minority (K8s multi-replica). Flip the default to true so existing Docker users get auto-migration as before. K8s deployments explicitly opt out via the ConfigMap. * feat(helm): scaffold chart skeleton with helpers and values - Chart.yaml with Bitnami PostgreSQL 18.5.14 OCI dependency - _helpers.tpl with 9 named templates (name, fullname, labels, selectorLabels, serviceAccountName, secretName, databaseUrl, image, chart) - values.yaml with 337 lines across 15 sections (@PARAM helm-docs compatible) - values.schema.json with top-level type/enum validation - .helmignore excludes overlays, docs, git artifacts - charts/ directory gitignored, Chart.lock committed * feat(helm): add core workload templates - deployment.yaml: full Restricted PSS, secretKeyRef for DB URL, encryption key file mount, probes (/health/startup, /health/ready, /health/live), emptyDir for /tmp and /app/.cache, affinity soft/hard/none, extraEnv/From - configmap.yaml: 17 CODEX_LB_* env vars from values.config.* and metrics.* - secret.yaml: stringData with generic keys database-url and encryption-key - externalsecret.yaml: ESO integration (conditional on externalSecrets.enabled) - serviceaccount.yaml: automountServiceAccountToken: false - service.yaml: ClusterIP port 2455 (no port 1455) - service-metrics.yaml: conditional on metrics.enabled, port from metrics.port * feat(helm): add migration hook, availability, and networking templates - hooks/migration-job.yaml: pre-install,pre-upgrade hook with pg_isready initContainer (conditional on postgresql.enabled), backoffLimit/deadline from values, same security context as deployment - hpa.yaml: autoscaling/v2 HPA with CPU+memory metrics, behavior policies - pdb.yaml: policy/v1 PDB with minAvailable/maxUnavailable toggle - ingress.yaml: networking.k8s.io/v1, cert-manager and nginx annotations - httproute.yaml: gateway.networking.k8s.io/v1 HTTPRoute backend port 2455 - networkpolicy.yaml: default-deny + whitelist ingress/egress, conditional PostgreSQL podSelector (sub-chart) vs open port 5432 (external), OTEL gRPC port 4317 conditional on tracing.enabled * feat(helm): add observability stack (ServiceMonitor, alerts, Grafana) - servicemonitor.yaml: conditional on metrics.enabled AND serviceMonitor.enabled, endpoint port 'metrics', interval/timeout from values, relabeling support - prometheusrule.yaml: exactly 4 alerts (HighErrorRate, HighLatency, PodDown, HPAAtMax) + additionalRules support - grafana-dashboard.yaml: ConfigMap with grafana_dashboard:1 label, embeds dashboards/codex-lb.json via .Files.Get - dashboards/codex-lb.json: 6-panel Grafana 10.x dashboard (request rate, duration p50/p95/p99, error rate, active connections, upstream duration, account status), datasource + namespace template variables * feat(helm): add test pod and finalize NOTES.txt - Create templates/tests/test-connection.yaml with helm.sh/hook: test annotation - Test pod probes /health endpoint at port 2455 with restricted security context - Finalize templates/NOTES.txt with conditional sections for ingress/gateway/port-forward - Add database type detection (sub-chart vs external) - Add metrics endpoint display - Include encryption key generation and dashboard access instructions - helm lint passes with 0 errors * feat(helm): add security hardening, overlays, tests, and README - values-dev.yaml: single replica, sub-chart PostgreSQL, text logging - values-staging.yaml: 2 replicas, external DB, ServiceMonitor, Ingress - values-prod.yaml: 3 replicas, HPA 3-20, hard anti-affinity, zone spread, NetworkPolicy, full observability, cert-manager, ExternalSecrets - templates/tests/test-connection.yaml: helm test pod, wget /health:2455 - templates/NOTES.txt: conditional ingress/port-forward/gateway instructions - README.md: 10+ sections covering install, config, DB, security, monitoring, ingress, upgrading, uninstalling, troubleshooting * chore: remove legacy K8s manifests (replaced by Helm chart) Helm chart at deploy/helm/codex-lb/ fully replaces all 9 raw K8s manifests. The legacy raw YAML approach is superseded by the production-grade chart with security hardening, HPA, PDB, NetworkPolicy, and full observability. * fix(helm): truncate suffixed resource names to 63-char K8s limit Resource names with suffixes (-metrics, -migrate, -test-connection, -dashboard) could exceed 63 characters with long release names. Now using printf with pre-truncated fullname to guarantee compliance. * fix(helm): address F4 spec compliance gaps - migration-job: add 60s timeout (30 iter × 2s) to pg_isready wait loop - ingress: add nginx rate-limiting annotation (limit-rps: 100) when nginx enabled - grafana dashboard: add 'job' template variable for Prometheus label filtering - values.yaml: add serviceAccount.automount: false field - values.schema.json: add missing top-level section type declarations * test(rate-limiter): RED — prove successful logins counted toward lockout Add 4 xfail tests demonstrating the bug where check_and_record() is called for both successful and failed login attempts, causing users to be locked out after 8 successful logins instead of only counting failures. Tests prove the need for: - clear_for_key() to reset counter on successful login - check() method to verify without incrementing counter - record_failure() method to record only failures All 4 new tests marked xfail (expected to fail in current state). Existing 4 tests continue to pass. * test(api-key-cache): RED — prove stale cache after delete/regenerate/deactivate * test(selection-cache): RED — prove cache poisoning across models * fix(api-key-cache): invalidate cache on key delete/regenerate/update * fix(selection-cache): key cache by (model, additional_limit_name) to prevent poisoning * fix(rate-limiter): count only failures, reset on success, keep check_and_record for TOTP * ci: add helm lint, template, and kubeconform validation * ci: add trivy container image scanning * revert: restore original GITHUB_OUTPUT syntax (undo SC2129 grouping) * chore: sync Chart.yaml appVersion via release-please * chore: add renovate configuration for dependency updates * ci: add helm chart OCI publish to release workflow * style: fix SC2129 shellcheck warning in release.yml * chore(ci): bump trivy-action 0.35, setup-helm v5, kubeconform 0.7 * fix: address 11 review findings across resilience, auth, and lifecycle - TOTP rate limiting: switch from check_and_record() to check/record_failure/clear_for_key pattern matching password login flow; only invalid codes count toward lockout - Circuit breaker: classify ProxyResponseError by status_code (4xx no longer trips breaker), reset failure count on success in CLOSED state, record 5xx as failure after yield - Account selection cache: invalidate in AccountsService on import/pause/reactivate/delete - API key cache: check expires_at on cache hit before returning stale key data - Bulkhead routing: route dashboard SPA and static assets through dashboard pool - In-flight tracking: replace HTTP-only middleware with ASGI middleware covering both HTTP and WebSocket scopes (fixes streaming drain and WS session tracking) - Leader election: increase default TTL from 30s to 600s to outlast job intervals - Memory monitor: read /proc/self/statm on Linux for current RSS instead of peak ru_maxrss * fix: make circuit breaker treat streamed 4xx as neutral (no-op) Oracle review found that streamed 4xx responses hitting _record_success() would incorrectly reset the failure counter. Now only 2xx/3xx triggers _record_success(); 4xx is a no-op; 5xx triggers _record_failure(). Also fix test_graceful_shutdown.py to use proper async receive/send stubs. * feat(balancer): add rendezvous (HRW) hashing module * feat(db): add bridge ring membership model and migration * fix(helm): tune connection pool budget for multi-replica scaling * feat(proxy): add ring membership service * feat(proxy): startup ring registration and shutdown cleanup * fix(proxy): replace sha256 modulo with rendezvous hashing for bridge routing * fix(proxy): graceful bridge fallback on instance mismatch * feat(health): add ring consistency check to readiness probe * feat(proxy): add bridge instance mismatch metric and structured logging * feat(helm): add ingress upstream-hash-by consistent routing support * chore(helm): tune HPA behavior for bridge session stability * feat(proxy): drain-aware bridge lifecycle on shutdown * test(proxy): multi-instance bridge routing integration tests * fix(health): use getattr for instance_id to avoid AttributeError in tests * fix(proxy): use DB-backed ring for mismatch len check, not static settings ring * fix(proxy): use heartbeat() instead of register() in heartbeat loop * fix: address 5 reviewer-found issues (websocket resilience, bg pool, degradation, TTFT) - Enforce bulkhead and backpressure on websocket scopes with code 1013 rejection - Record circuit breaker failures on websocket handshake 5xx responses - Initialize background DB pool during startup for proper pool isolation - Clear stale degraded state on typed selection errors (model/filter) - Measure TTFT from token delta events only, not control frames like response.created - Fix missing await on async _http_bridge_owner_instance in tests - Reset bridge drain flag between tests to prevent state leakage * fix: resolve 7 reviewer-identified bugs across proxy, DB, metrics, Helm, and OTEL - Reuse main engine for :memory: SQLite in init_background_db() to prevent empty-schema errors in background sessions - Invalidate selection inputs cache after mark_permanent_failure, mark_quota_exceeded, mark_rate_limit with generation counter to prevent stale-writer race - Return 409 retry on bridge ownership mismatch instead of silently creating duplicate local bridge that breaks turn-state continuity - Handle both SystemExit(1) and OSError on metrics port bind failure so multi-worker deployments degrade gracefully - Fix Helm env var names: UPSTREAM_CONNECT_TIMEOUT -> _SECONDS, OTEL_EXPORTER_OTLP_ENDPOINT -> OTEL_EXPORTER_ENDPOINT - Pass existing FastAPI app to init_tracing() and use instrument_app() instead of instrument() which only patches future app creations * fix: resolve 11 concurrency, multi-replica, and infra bugs from code review - Revalidate selected account after runtime-only balancer changes during _persist_selection_state (load_balancer.py) - Make auth rate limiting atomic with pg_advisory_xact_lock on PostgreSQL to close TOCTOU race (db_rate_limiter.py) - Reuse existing DB session for bridge ring info in /health/ready to prevent pool self-deadlock at pool_size=1 (health/api.py) - Auto-generate Fernet encryption key in Helm chart-managed Secret with lookup-based upgrade preservation (secret.yaml) - Grant contents:read to Helm chart release job (release.yml) - Retry bridge ring registration in non-blocking background task with unlimited retries and 5s first-attempt timeout (main.py) - Reduce API key cache TTL from 60s to 5s for multi-replica revocation safety (api_key_cache.py) - Allow non-leader replicas to refresh model registry independently with jitter to prevent thundering herd (model_refresh_scheduler.py) - Reuse local bridge session before ownership check to survive ring topology changes (service.py) - Reduce firewall cache TTL from 300s to 15s for multi-replica consistency (firewall_cache.py) - Gate circuit breaker half-open traffic to single probe request with finally-based flag cleanup and coroutine close on rejection (circuit_breaker.py, proxy.py) * fix: resolve 9 reviewer-identified multi-replica and resilience bugs - Remove degradation flag and circuit breaker from readiness probe to prevent permanent pod eviction after transient upstream failures - Fail closed on bridge ring lookup failure instead of falling back to static single-node ring that causes split-brain - Unregister ring member on graceful shutdown with upsert heartbeat for multi-worker safety - Add DB-backed cache invalidation poller (500ms) with version-gated set() for cross-replica API key and firewall cache consistency - Make auth rate limiting atomic via single INSERT…SELECT statement with advisory lock on PostgreSQL - Scope circuit breaker per upstream account instead of global singleton - Skip model refresh on non-leader replicas immediately - Honor databaseMigrateOnStartup in Helm ConfigMap template - Reduce firewall cache TTL from 5s to 2s * fix(runtime): preserve bridge ownership during worker churn Keep shared bridge ring memberships stable across worker shutdowns, reuse resident local bridge sessions without a fresh ring lookup, gate bridge readiness on active ring membership, and make ExternalSecret installs migrate through the startup path. Also attach the configured OTEL service name and avoid charging the TOTP limiter before session preconditions pass. Constraint: Multi-worker pods share the default hostname-based bridge instance id and ExternalSecret-backed installs do not materialize the Secret before pre-install hooks Rejected: Keep unregister() on shutdown | deletes the shared ring row while sibling workers are still healthy Rejected: Keep pre-install migrations for ExternalSecret installs | deterministic fresh-install failure before the controller creates the Secret Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep ring heartbeat cadence, stale threshold, and shutdown grace derived from the same constants; do not reintroduce per-worker hard deletion of shared bridge membership rows Tested: uv run pytest tests/unit/test_otel.py tests/unit/test_health_probes.py tests/unit/test_ring_membership.py tests/unit/test_dashboard_auth_api.py tests/unit/test_proxy_http_bridge.py tests/unit/test_helm_external_secrets.py; helm template codex-lb deploy/helm/codex-lb --set externalSecrets.enabled=true --set externalSecrets.secretStoreRef.name=test-store --set migration.enabled=true Not-tested: Live Kubernetes install/upgrade against a running External Secrets controller * Prevent fail-open rollout and websocket regressions Helm installs were mixing pre-install hooks, per-pod startup migrations, and stale env references in ways that could race schema changes or keep broken replicas serving traffic. This change moves rollout logic to a single-writer migration path, makes startup and readiness fail closed when bridge or schema prerequisites are missing, and ties websocket circuit-breaker health to the full stream lifecycle instead of the handshake alone. The chart now offers checksum-based rollouts for rendered config, optional reloader annotations for externally managed Secret rotation, and a manual rollout token when Helm cannot observe the underlying Secret contents. Dashboard password login also preserves rate-limit budget during bootstrap when password auth is not configured. Constraint: Kubernetes does not restart pods when env-var Secrets change outside Helm Rejected: Per-pod startup migration gating by replica ordinal | Deployment replicas are not a safe single-writer mechanism Rejected: Assume Helm can hash existing Secret contents | Helm cannot render data it does not own Confidence: high Scope-risk: moderate Directive: Keep schema changes on the dedicated migration path; do not re-enable implicit per-pod startup migrations for multi-replica installs Tested: uv run pytest tests/unit/test_helm_external_secrets.py tests/unit/test_db_session.py tests/unit/test_health_probes.py tests/unit/test_graceful_shutdown.py tests/unit/test_proxy_utils.py tests/integration/test_dashboard_password_auth.py Tested: uv run ruff check app tests deploy Not-tested: Full uv run pytest suite * fix: fail-closed helm/proxy edges, K8s quick-start in README - Prevent fail-open network policy and websocket circuit breaker regressions - Fix migration job hook phases and service account for external DB setups - Hold half-open probe across websocket lifecycle to avoid premature release - Allow existing bridge sessions during drain (reject only new ones) - Simplify post-persist retry to version-change check only - Add Kubernetes quick-start section to README - Add tests for drain reuse, held probes, CB context cleanup, helm templates * chore(main): release 1.8.3 (Soju06#275) * feat: add a "API" page to see details of the API keys (Soju06#269) * feat(ui): add a page for API and showing detailed info and graph * fix tests * fix(api_keys): clamp usage_7d window with upper bound to exclude future-dated rows Add an `until` upper bound (`requested_at < now`) to `usage_7d` query, matching the pattern already used by `trends_by_key`. Prevents clock-skewed or future-dated RequestLog rows from inflating totalRequests, totalTokens, and totalCostUsd in the 7-day usage endpoint. --------- Co-authored-by: Soju06 <[email protected]> * perf(usage): replace DISTINCT ON with lateral join in latest_by_account (Soju06#277) The DISTINCT ON query scanned 530K+ rows (full table) and sorted on disk just to find the latest row per account (17 accounts). Lateral join performs 17 indexed lookups instead, reducing execution time from ~1.5s to ~1ms for primary and ~1.2s to ~48ms for secondary window. * chore: remove stray test script * chore: remove .sisyphus from tracking (already gitignored) * fix: prevent sticky session thrashing when all accounts exceed budget threshold (Soju06#279) When every account in the pool exceeds the budget threshold (default 95%), the sticky reallocation logic would delete and re-create the mapping on every request — wasting DB writes and destroying prompt-cache locality. Now checks the pool's best candidate before reallocating: if no account is below the threshold, the pinned account is kept to preserve cache affinity. * feat: add stickysession selection box to select multiple sessions too be deleted (Soju06#286) * fix(chat): prevent duplicated tool-call arguments in chat completions (Soju06#287) * fix(chat): prevent duplicated tool-call arguments in chat completions Responses snapshot events can repeat finalized tool-call payloads after incremental deltas. The chat adapter now keeps one canonical argument string per call and only streams safe suffixes, so OpenAI-compatible clients receive valid JSON arguments again. Constraint: Chat Completions streaming can only append deltas; it cannot retract already-emitted bytes Rejected: Ignore all .done snapshots | snapshot-only tool calls would be dropped Rejected: Always emit full snapshot values | duplicates arguments for clients that append deltas Confidence: high Scope-risk: narrow Reversibility: clean Directive: Treat Responses .done tool-call payloads as canonical replacements, not append deltas Tested: uv run pytest tests/unit/test_chat_response_mapping.py tests/integration/test_proxy_chat_completions.py Tested: uv run pytest tests/integration/test_openai_compat_features.py tests/integration/test_proxy_responses.py Tested: uv run ruff check app/core/openai/chat_responses.py tests/unit/test_chat_response_mapping.py tests/integration/test_proxy_chat_completions.py Tested: uv run ty check app/core/openai/chat_responses.py Tested: openspec validate --specs Not-tested: Live upstream Responses websocket against production accounts * fix(chat): converge streamed tool arguments to final snapshots The first fix removed duplicate appends but still let streamed chat completions keep stale partial arguments when a later snapshot rewrote earlier characters. The adapter now buffers tool arguments during streaming and emits the canonical string once at terminal completion, which matches the finalized snapshot even when upstream normalizes or reformats earlier bytes. Constraint: Chat Completions tool-call deltas are append-only, so streamed adapters cannot retract already-emitted argument bytes Rejected: Keep prefix-only suffix emission | stale partial arguments survive non-prefix snapshot rewrites Rejected: Emit every snapshot immediately | clients that append deltas still cannot recover from replacements Confidence: high Scope-risk: narrow Reversibility: clean Directive: Prefer final snapshot correctness over speculative incremental tool-argument streaming when bridging Responses to Chat Completions Tested: uv run pytest tests/unit/test_chat_response_mapping.py tests/integration/test_proxy_chat_completions.py Tested: uv run pytest tests/integration/test_openai_compat_features.py tests/integration/test_proxy_responses.py Tested: uv run ruff check app/core/openai/chat_responses.py tests/unit/test_chat_response_mapping.py tests/integration/test_proxy_chat_completions.py Tested: uv run ty check app/core/openai/chat_responses.py Tested: openspec validate --specs Not-tested: Live upstream Responses websocket traces with formatting-normalized snapshots * fix(chat): restore streamed tool-call argument deltas The previous buffering change stopped emitting tool argument deltas during normal streaming, which broke append-based Chat Completions clients and could leave them with truncated arguments when Responses terminated with response.failed. This change restores append-safe argument emission while still suppressing incompatible snapshot rewrites that cannot be represented in append-only Chat Completions streams. Constraint: Chat Completions tool-call arguments can only be streamed as append-only deltas Rejected: Buffer all arguments until terminal events | breaks incremental tool-call compatibility and loses data on response.failed Rejected: Emit rewritten snapshots verbatim | clients that append deltas cannot retract previously emitted bytes Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep streaming tool arguments append-safe; non-prefix snapshot rewrites must not be re-emitted as deltas Tested: pytest tests/unit/test_chat_response_mapping.py tests/integration/test_proxy_chat_completions.py -q Tested: ruff check app/core/openai/chat_responses.py tests/unit/test_chat_response_mapping.py tests/integration/test_proxy_chat_completions.py Not-tested: Live upstream Responses traces with rewritten tool-call snapshots * chore(lint): apply ruff formatting to chat response tests Re-running the Python lint workflow produced a small formatting-only adjustment in the chat response mapping tests. No behavior changed; this commit records the lint-clean state separately from the functional fix. Constraint: Requested follow-up was limited to linting-only changes Rejected: Fold formatting into the previous fix commit | user requested a separate follow-up commit Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep post-fix lint-only follow-ups behavior-neutral and isolated from functional changes Tested: ruff check tests/unit/test_chat_response_mapping.py Tested: ruff format --check tests/unit/test_chat_response_mapping.py Not-tested: pytest (per lint-only request) * Block pods on schema readiness and clarify Helm install modes Kubernetes installs now keep the migration Job as the only schema writer and make app pods wait for Alembic head before the main container starts. The Helm chart also exposes explicit bundled/external-db/external-secrets overlays, updates docs to describe those contracts, and adds CI/smoke coverage around mode-specific lint/template/install paths. Constraint: Multi-replica rollouts must not race migrations or start fail-open on stale schema Constraint: Database credentials can arrive from bundled PostgreSQL, direct DB config, split secrets, or External Secrets Rejected: Keep per-pod startup migrations as the default rollout path | creates multi-writer races and rollout ambiguity Rejected: Document only environment overlays | hides the actual installation contract and secret model Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep schema gate behavior, install-mode overlays, chart docs, and CI smoke checks aligned whenever chart wiring changes Tested: openspec validate --specs Tested: uv run pytest tests/unit/test_db_migrate.py tests/unit/test_helm_external_secrets.py tests/unit/test_select_with_stickiness.py tests/unit/test_chat_response_mapping.py tests/unit/test_api_keys_service.py tests/integration/test_api_keys_api.py tests/integration/test_proxy_chat_completions.py tests/integration/test_sticky_sessions_api.py Tested: uv run ruff check app/db/migrate.py app/modules/api_keys/api.py app/modules/api_keys/service.py app/modules/proxy/load_balancer.py app/core/openai/chat_responses.py tests/unit/test_db_migrate.py tests/unit/test_helm_external_secrets.py tests/unit/test_select_with_stickiness.py tests/unit/test_chat_response_mapping.py tests/unit/test_api_keys_service.py tests/integration/test_api_keys_api.py tests/integration/test_proxy_chat_completions.py tests/integration/test_sticky_sessions_api.py Tested: uv run ty check app/db/migrate.py app/modules/api_keys/api.py app/modules/api_keys/service.py app/modules/proxy/load_balancer.py app/core/openai/chat_responses.py Tested: helm lint deploy/helm/codex-lb -f deploy/helm/codex-lb/values-bundled.yaml --set postgresql.auth.password=local-password Tested: helm lint deploy/helm/codex-lb -f deploy/helm/codex-lb/values-external-db.yaml --set externalDatabase.url=postgresql+asyncpg://user:[email protected]:5432/codexlb Tested: helm lint deploy/helm/codex-lb -f deploy/helm/codex-lb/values-external-secrets.yaml --set externalSecrets.secretStoreRef.name=test-store Tested: helm template codex-lb deploy/helm/codex-lb -f deploy/helm/codex-lb/values-bundled.yaml --set postgresql.auth.password=test-password Tested: helm template codex-lb deploy/helm/codex-lb -f deploy/helm/codex-lb/values-external-db.yaml --set externalDatabase.url=postgresql+asyncpg://test:test@localhost/test Tested: helm template codex-lb deploy/helm/codex-lb -f deploy/helm/codex-lb/values-external-secrets.yaml --set externalSecrets.secretStoreRef.name=test-store Tested: bash -n scripts/helm-kind-smoke.sh Not-tested: End-to-end kind cluster smoke install against a live Kubernetes runtime Not-tested: Production secret rotation and live migration Job timing under rollout pressure * Record Helm install-mode rollout contract in OpenSpec The Helm schema-gate and mode overlay work changes deployment behavior, so the repository needs a matching OpenSpec change that captures the install modes, migration gating requirements, and smoke-test expectations for future work. Constraint: This repo treats OpenSpec as the source of truth for behavior-changing deployment work Rejected: Leave the implementation undocumented in OpenSpec | makes future chart changes drift from the actual rollout contract Confidence: high Scope-risk: narrow Reversibility: clean Directive: Update this change or sync it into main specs before further Helm install-mode behavior changes Tested: openspec validate productize-helm-install-modes Not-tested: Archive/sync workflow execution after merge * Make bundled Helm installs bootstrap reliably Refine the Helm installation contract around portable install modes instead of cloud-specific assumptions. Bundled PostgreSQL now waits only for database connectivity before app-side startup migrations, while external database and external secret flows keep fail-closed schema gating around the dedicated migration writer. This also tightens the chart docs and migration helpers so the easy-setup path is predictable on fresh clusters and the migration behavior is explicit by mode. Constraint: Bundled PostgreSQL cannot satisfy a pre-install single-writer migration hook because the sub-chart database endpoint does not exist yet Constraint: External DB installs still need fail-closed startup when startup migrations are disabled Rejected: Reuse schema-head gate for bundled mode | deadlocks fresh installs before the database exists Rejected: Keep bundled installs on post-install hook only | app pods can race schema bootstrap on fresh install Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep Helm install behavior mode-centric (bundled, external-db, external-secrets) rather than adding provider-specific chart forks Tested: pytest -q tests/unit/test_db_migrate.py tests/unit/test_helm_external_secrets.py Tested: openspec validate --specs Tested: Docker Desktop Helm smoke install for bundled mode (helm install --wait + helm test) Tested: Docker Desktop Helm smoke install for external DB mode (helm install --wait + helm test) Not-tested: External Secrets Operator live install on a cluster with a real SecretStore backend * Align Helm CI checks with install modes The Helm chart now requires mode-specific inputs for staging and production overlays. CI was still rendering those overlays with the old auth.databaseUrl/auth.encryptionKey test overrides, so the staging template step failed before kubeconform or smoke checks ran. Update the workflow to feed bundled installs a PostgreSQL password, staging an external database URL, and prod an External Secrets store reference, matching the chart's current fail-closed install contract. Constraint: Helm rendering now fails fast when no valid database source is configured Rejected: Loosen the chart back to accept deprecated auth.databaseUrl test overrides | would reintroduce ambiguous install contracts Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep CI overlay inputs aligned with the documented install modes instead of reviving deprecated chart values Tested: helm lint --strict deploy/helm/codex-lb/ -f deploy/helm/codex-lb/values-staging.yaml --set externalDatabase.url=postgresql+asyncpg://test:test@localhost/test Tested: helm lint --strict deploy/helm/codex-lb/ -f deploy/helm/codex-lb/values-prod.yaml --set externalSecrets.secretStoreRef.name=test-store Tested: helm template codex-lb deploy/helm/codex-lb/ -f deploy/helm/codex-lb/values-staging.yaml --set externalDatabase.url=postgresql+asyncpg://test:test@localhost/test Tested: helm template codex-lb deploy/helm/codex-lb/ -f deploy/helm/codex-lb/values-prod.yaml --set externalSecrets.secretStoreRef.name=test-store Not-tested: Full GitHub Actions rerun after push * Keep kubeconform in the Helm validation lane The kubeconform 1.28/1.31 checks were left in the kind smoke-install job and still used the removed auth.databaseUrl/auth.encryptionKey overrides. That made the smoke job fail after both bundled and external-db installs had already succeeded. Move the versioned kubeconform checks back into the Helm validation job and align them with the current external-secrets install contract so rendering and schema validation stay in the same lane. Constraint: The chart now uses mode-specific install inputs and intentionally fails fast on ambiguous database wiring Rejected: Patch the smoke-install job only | mixes render/schema validation with runtime install checks and keeps responsibilities blurred Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep render/schema validation in helm-lint and reserve helm-smoke-kind for real install/runtime checks only Tested: helm template ... values-prod.yaml | kubeconform -kubernetes-version 1.25.0 Tested: helm template ... values-prod.yaml | kubeconform -kubernetes-version 1.28.0 Tested: helm template ... values-prod.yaml | kubeconform -kubernetes-version 1.31.0 Not-tested: Full GitHub Actions rerun after push * Raise the Helm support floor to Kubernetes 1.32 Codify a modern Kubernetes support contract for the chart instead of leaving the repo on legacy 1.25/1.28/1.31 assumptions. The chart metadata, README, kubeconform validation set, and kind smoke baseline now align on a 1.32 minimum with 1.35 as the active validation baseline. This keeps install-mode work focused on currently relevant clusters and prevents CI from silently validating against minors that are no longer the project's target support floor. Constraint: The project support policy is stricter than current cloud-provider availability; some providers still expose 1.31, but the chart should not optimize for it Rejected: Keep validating a broad 1.25/1.28/1.31 matrix | hides the real support floor and spends CI on non-target minors Confidence: high Scope-risk: narrow Reversibility: clean Directive: When bumping Kubernetes policy again, update Chart.yaml, README, kubeconform targets, and the pinned kind node image together Tested: pytest -q tests/unit/test_k8s_version_policy.py tests/unit/test_db_migrate.py tests/unit/test_helm_external_secrets.py Tested: helm template ... values-prod.yaml | kubeconform -kubernetes-version 1.32.0 Tested: helm template ... values-prod.yaml | kubeconform -kubernetes-version 1.35.0 Tested: openspec validate --specs Not-tested: Live cloud-cluster installs on EKS/GKE/OKE after raising the floor * Wire API key service-tier enforcement end to end Add enforced service tier support across API key persistence, dashboard CRUD, and proxy request enforcement. The dashboard now accepts the legacy fast alias, normalizes it to priority in the service layer, persists the canonical value, and applies that policy to outbound Responses payloads alongside enforced model and reasoning effort. This closes the gap where service-tier enforcement was implicitly expected by request normalization logic but absent from the API key contract itself. Constraint: Existing request payload compatibility already treats fast as an alias for priority, so API key policy must honor the same contract Constraint: Enforcement has to round-trip through DB, dashboard APIs, and proxy request policy to avoid partial behavior Rejected: Only widen schema validation to include fast | would still leave the field unpersisted and unenforced Rejected: Normalize the alias only in the API route | would leave repository reads and DB rows inconsistent Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep API key enforcement fields symmetrical across schema, service, repository, DB model, and proxy request policy Tested: pytest -q tests/unit/test_api_keys_service.py tests/unit/test_db_migrate.py tests/unit/test_proxy_utils.py tests/unit/test_proxy_api_websocket_auth.py tests/unit/test_hot_path_caches.py tests/unit/test_prompt_cache_key_derivation.py tests/integration/test_api_keys_api.py Tested: ruff check targeted API key and proxy files Tested: openspec validate --specs Not-tested: Existing production rows containing unexpected enforced_service_tier values outside the supported alias set * Stop tracking Codex runtime metadata The repository should keep .agents command, skill, and convention assets, but not local runtime state or session logs. Stop tracking the Codex TUI log, personality migration marker, and local version stamp, and ignore those paths going forward so they cannot leak into future commits. Constraint: .agents is partly source-controlled project infrastructure, so the cleanup must be scoped to runtime artifacts rather than the whole directory Rejected: Ignore or remove the entire .agents tree | would drop repository-owned command and skill assets Confidence: high Scope-risk: narrow Reversibility: clean Directive: Treat .agents/log and one-off runtime marker files as local state; if new Codex runtime artifacts appear, ignore them explicitly instead of committing them Tested: git status shows only the intended runtime-artifact removals and .gitignore update Not-tested: Fresh clone behavior on another machine * Upgrade kind for the Kubernetes 1.35 smoke lane The new Helm smoke-install job pins the cluster baseline to Kubernetes 1.35, but the workflow was still downloading kind v0.24.0. That version predates support for the newer node-image/containerd stack used by current kindest/node images, so the job could fail at 'kind load docker-image' before any chart smoke install ran. Bump the workflow to kind v0.30.0 so the smoke lane actually matches the chart's current Kubernetes baseline. Constraint: The project baseline is now Kubernetes 1.35 for smoke installs, so the cluster runtime tool must support that node image generation Rejected: Leave kind at v0.24 and debug image loading further | the version mismatch is already enough to make the lane unreliable Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep the pinned kind CLI version aligned with the pinned kindest/node baseline when either one changes Tested: Parsed .github/workflows/ci.yml successfully with yaml.safe_load Not-tested: Full GitHub Actions rerun after push --------- Co-authored-by: Jacky Fong <[email protected]>
Adding a
APIpage for users to check some infos and see the usage graph of the usage in a 7-DAY timeframe