Repository navigation
Dream: probe reserved capacity through the LLM gateway; add kill switch - #23180
Conversation
Use the ownerless reserved Dream verifier route for 3.8 discovery so the probe uses the same Vertex identity and dedicated policy as real turns. Let the gateway publish strict completed PT evidence; never infer it from a gateway HTTP 200. Remove local and shared failed-probe vetoes while retaining fresh evidence, shared-store and slot requirements, utilization guards, and the 10-second capacity cooldown. Keep legacy 2.5 probing direct. Cover gateway recovery, denials, incomplete proof, and reserved-only routing. Co-Authored-By: Codex Sol <[email protected]>
…way probe Default on; 0/false/off/no makes no probe call, so admission relies on fresh evidence from real Dream turns. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f3d29b9e4
ℹ️ 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".
| elif outcome == 'inconclusive': | ||
| # Auth/transport failures are not saturation. Admission still requires | ||
| # fresh shared evidence, readable headroom and shared concurrency slots. | ||
| logger.info('dream_capacity_probe outcome=inconclusive model=%s', model) |
There was a problem hiding this comment.
Record the gateway-probe fail-open outcome
When the gateway returns a non-capacity error or the request raises, this inconclusive branch now permits admission to continue from previously fresh evidence, but it emits only an info log. That is a new fail-open path, so outages or authentication failures will be absent from the shared fallback telemetry used by operations; call record_fallback with bounded fields when this path is taken.
AGENTS.md reference: backend/AGENTS.md:L313-L314
Useful? React with 👍 / 👎.
| - {"key":"DREAM_AGENT_PAID_PERCENT","aliases":[],"kind":"env","lifecycle":"rollout","surfaces":["backend"],"summary":"Stable per-owner percent of paid owners eligible under ELIGIBILITY=paid; unset admits all paid owners, malformed admits none; listed owners always stay in","fail":"closed","owner":"dazheng","created":"2026-10-21","review_by":"2026-11-04","terminal":"off","decision":"kill","notes":"David 2026-10-21: Dream ramps to paid owners on the 3.8 reservation; reservation headroom is the global cap. Delete the knob once prod runs unset (100%). 2026-10-21 13:01Z: the first 5% sweep failed ~17 cohort passes in seconds (error_type=other, applied=0); rolled back to 0 pending diagnosis. Cause: Firestore Aborted contention on the turn ledger, admission and discovery transactions; fixed by bounded retries (#23051). Re-ramp at 5% with DREAM_AGENT_CONCURRENCY=8. 2026-10-22: 5% held clean after the in-pass 429 retry (#23085): 00:00Z sweep complete=6 failed=0, dedicated-only 3.8; step to 25% at concurrency 8.","ramp":{"cohorts":["listed owner + 5% of paid owners, 1 h hold","25%, 3 h hold","unset (all paid owners), 6 h soak"],"clean_metric":"<2 failed Dream passes/h, no new Dream ERROR signatures on backend-sync, no probe_failed storm, undo rate under 0.2, zero 3.8 on-demand Dream spend","expander":"dazheng (Dream lane, deploys via the rollout lead)","done_by":"2026-10-22"}} | ||
| - {"key":"DREAM_AGENT_UID_ALLOWLIST","aliases":[],"kind":"env","lifecycle":"config_switch","surfaces":["backend"],"summary":"Comma-separated owner uids admitted when eligibility is allowlist; empty admits nobody","fail":"closed","owner":"dazheng","created":"2026-10-15","terminal":"keep","decision":"keep"} | ||
| - {"key":"DREAM_ON_DEMAND_ENABLED","aliases":[],"kind":"env","lifecycle":"config_switch","surfaces":["backend"],"summary":"Gateway and backend gate for allowlisted Dream on-demand capacity; default false; prod backend false since the 3.8 reservation went live 2026-10-21","fail":"closed","owner":"dazheng","created":"2026-10-15","terminal":"keep","decision":"keep"} | ||
| - {"key":"DREAM_GATEWAY_PROBE_ENABLED","aliases":[],"kind":"env","lifecycle":"ops_kill","surfaces":["backend"],"summary":"Default-on 3.8 reservation probe through the LLM gateway's reserved Dream route; 0/false/off/no makes no probe call and admission relies on fresh evidence from real Dream turns","fail":"open","owner":"dazheng","created":"2026-10-22","terminal":"keep","decision":"keep"} |
There was a problem hiding this comment.
Wire the kill switch into deployed Dream hosts
A repo-wide search finds no DREAM_GATEWAY_PROBE_ENABLED declaration in backend/deploy/runtime_env, the backend-listen/pusher charts, or deployment workflows; the generated registry consequently shows dashes for every deployment column. Current Dream workloads therefore always use the default true, and operators cannot disable the probe through the repository-owned fleet configuration during an incident. Add a classified runtime-env/chart binding for every host that can run Dream.
AGENTS.md reference: backend/AGENTS.md:L133-L134
Useful? React with 👍 / 👎.
Summary
At 25% of paid owners on 2026-10-22, the 02:00Z Dream sweep logged
candidates=520 complete=2 failed=0 waiting=517, with 550probe_failedcapacity waits.Cause (Codex Sol, confirmed from read-only prod audit logs).
generateContentdirectly as backend-sync'sbackend-runtimeidentity. IAM denies that identityaiplatform.endpoints.predict, so the probe got a 403.prod-omi-llm-gatewayidentity.Fix.
omi:auto:dream-verifyroute: 16 tokens,dream_reserved_only, no user attribution. That is the same identity and dedicated policy as real turns.inconclusive, while 429 and capacity failure classes still mark saturation with the 10 s cooldown.DREAM_GATEWAY_PROBE_ENABLED, default on.0/false/off/nomakes no probe call, so admission relies only on fresh evidence from real Dream turns. It's registered asops_killinconfig/feature-flags.yaml.No IAM change is needed.
Review
GLM-5.3 (zcode) returned SHIP-WITH-NITS. It traced the probe end to end:
Findings and what happened to them:
OMI_LLM_GATEWAY_URLon backend-sync. Verified: prod backend-sync has it set to a non-loopback gateway address, which real Dream turns already use.reason=probe_failednow only covers store and slot errors, so dashboards keyed on it measure a narrower event.'no'value;Verification
backend/test.shon the probe, capacity, fail-open, retry and canary files gave 84 passed, including the 3 kill-switch cases.scripts/check_feature_flag_registry.py: OK.These are unit results only. Prod verification is that
probe_failedwaits disappear and the next sweeps show completions, with 3.8 still dedicated-only.Product invariants affected
none
Failure class
Failure-Class: none
🤖 Generated with Claude Code