Repository navigation
SCA-2918: count an unbound holdout resolver as a fallback; document capped /live - #26552
Conversation
…apped /live An unbound membership resolver made in_rollout_cohort() return False for conversations-v3-holdout, so a writer that skipped configure_rollout_runtime() would admit held-out owners with no fallback telemetry. Raise RolloutCohortUnavailable instead, as dream-agent and go-finalization already do; v3_intake_held_out() catches it, admits, and counts feature_flags/v3_holdout reason=unavailable. Every current writer entrypoint binds the runtime, so this is latent only (review F6 on #26440). The runbook now says a capped /live window lookup keeps v3:true and counts a lookup_cap fallback (review F7 on #26440). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis 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: d9a594c9eb
ℹ️ 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".
|
|
||
|
|
||
| def test_unbound_resolver_reports_unknown_holdout_membership(monkeypatch): | ||
| from config import rollout_cohorts as policy |
There was a problem hiding this comment.
Move the new policy imports to module scope
Both new tests import rollout_cohorts inside their function bodies, contrary to the explicit rule in backend/AGENTS.md that all imports belong at module scope. Move the shared from config import rollout_cohorts as policy import alongside the existing module-level config import; neither test requires delaying this import to install mocks.
AGENTS.md reference: backend/AGENTS.md:L168-L168
Useful? React with 👍 / 👎.
…ests Review F1/F2 on #26552: assert each non-raising cohort stays a plain miss while unbound, and assert the whole recorded fallback for the unbound holdout. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Connector finding on #26552: the two new tests imported config.rollout_cohorts inside the function; import it once at module scope. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…bership; docs (#26561) Follow-up to #26552. It fixes the three accepted findings from panel `review-20261128t000508-c5df` (SCA-2918). - **F2: an invalid rollout environment now counts as unknown holdout membership.** - With the resolver bound but an invalid `OMI_ENV_STAGE`, `utils.rollout_cohorts._in_rollout_cohort` took the plain-miss branch. A held-out owner was then admitted with no `v3_holdout` fallback counted. - It now raises `RolloutCohortUnavailable` for `conversations-v3-holdout` only, which `v3_intake_held_out` admits and counts. Other cohorts keep the plain miss. - This only happens on a misconfigured deploy, never in normal serving. - **F1 (runbook, `rollout-cohorts.md`):** read errors deny membership only for ordinary cohorts. `dream-agent`, `go-finalization` and the holdout raise, and each caller decides; the holdout admits and counts a fallback. - **F3 (change note `2026-11-26-v3-holdout.md`):** adds the capped `/live` lookup rule. A capped lookup keeps `v3:true` and counts `reason=lookup_cap`. **Kill switch:** `CONVERSATIONS_V3_HOLDOUT=off`. There is no new flag and no change to admission in normal serving. **Tests:** - `test_runtime_resolver_reports_unknown_holdout_membership` now asserts that an invalid environment raises for the holdout and stays a plain miss for `conversations-v3`. - Local run, `omi-heavy` on m1, all passing: - `test_conversations_v3_contract.py` (121) - `test_rollout_cohorts.py` (29) - `test_rollout_cohort_membership_parity.py` (12) - Before the rebase: `test_go_finalization_admission.py` (34) and `test_dream_eligibility_outage.py` (7) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/26561?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <a href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/26561?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26561&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
…bership; docs Review F1-F3 on BasedHardware#26552 (panel review-20261128t000508-c5df): - F2: a bound resolver with an invalid OMI_ENV_STAGE took the plain-miss branch, so a held-out owner was admitted without the v3_holdout fallback. Raise RolloutCohortUnavailable for the holdout there too; other cohorts keep the plain miss. - F1: rollout-cohorts runbook: read errors deny membership only for ordinary cohorts; dream-agent, go-finalization and the holdout raise. - F3: the 2026-11-26 holdout change note gains the capped /live lookup rule. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Follow-up to #26440. It addresses two accepted review findings, F6 and F7 from panel
review-20261126t220122-493d, routed to SCA-2918 through SCA-5244/SCA-5245.F6: the unbound resolver counts as a fallback.
in_rollout_cohort()returnedFalseforconversations-v3-holdoutwhen the membership resolver was unbound. A writer that skippedconfigure_rollout_runtime()would therefore admit held-out owners with no fallback telemetry.RolloutCohortUnavailable, asdream-agentandgo-finalizationalready do in the same branch.v3_intake_held_out()already catches that exception, admits, and recordsomi_fallback_total{component="feature_flags",from_mode="v3_holdout",reason="unavailable"}.F7: runbook. The holdout
/livebullet now says that a window lookup capped at its read limit keepsv3:trueand counts alookup_capfallback, matchingrouters/conversations.py.Kill switch:
CONVERSATIONS_V3_HOLDOUT=offskips the holdout read entirely. There is no new flag.Tests:
v3_intake_held_outadmits with exactly oneunavailablefallback (the full recorded fallback is asserted).omi-heavyon m1:bash test.sh(changed-file selection): 86 passed.test_conversations_v3_contract.py(121)test_rollout_cohorts.py(29)test_rollout_cohort_membership_parity.py(12)test_rollout_cohort_migration.py(71)test_rollout_cohort_deploy.py(10)test_go_finalization_admission.py(34)test_dream_eligibility_outage.py(7)test_episodes_finalize_paths.py(180)test_listen_v3_rotation_continuation.py(7)Review: panel
review-20261127t235004-46c8returned SHIP. F1 and F2 (tighter tests) are fixed in7924db60. F3 (unbound holdout membership listing) is declined: nothing reads holdout membership throughrollout_cohort_members.🤖 Generated with Claude Code