Skip to content

SCA-2918: count an unbound holdout resolver as a fallback; document capped /live - #26552

Merged
Git-on-my-level merged 3 commits into
mainfrom
lane/v3-holdout-f6f7
Nov 28, 2026
Merged

Git-on-my-level merged 3 commits into
mainfrom
lane/v3-holdout-f6f7

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

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() returned False for conversations-v3-holdout when the membership resolver was unbound. A writer that skipped configure_rollout_runtime() would therefore admit held-out owners with no fallback telemetry.

  • It now raises RolloutCohortUnavailable, as dream-agent and go-finalization already do in the same branch.
  • v3_intake_held_out() already catches that exception, admits, and records omi_fallback_total{component="feature_flags",from_mode="v3_holdout",reason="unavailable"}.
  • Admission is unchanged (unknown still admits); the case is now counted.
  • Every current writer entrypoint binds the runtime, so this was latent only.

F7: runbook. The holdout /live bullet now says that a window lookup capped at its read limit keeps v3:true and counts a lookup_cap fallback, matching routers/conversations.py.

Kill switch: CONVERSATIONS_V3_HOLDOUT=off skips the holdout read entirely. There is no new flag.

Tests:

  • The new unit tests check that the unbound resolver raises for the holdout cohort only (every other non-raising cohort stays a plain miss), and that v3_intake_held_out admits with exactly one unavailable fallback (the full recorded fallback is asserted).
  • Local run, omi-heavy on m1:
    • bash test.sh (changed-file selection): 86 passed.
    • These files, each run on its own, all pass (471 tests):
      • 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-46c8 returned SHIP. F1 and F2 (tighter tests) are fixed in 7924db60. F3 (unbound holdout membership listing) is declined: nothing reads holdout membership through rollout_cohort_members.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

…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]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T00:02:31.951035Z 7924db6 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Git-on-my-level and others added 2 commits November 27, 2026 18:55
…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]>
@Git-on-my-level
Git-on-my-level merged commit 8657986 into main Nov 28, 2026
69 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/v3-holdout-f6f7 branch November 28, 2026 00:25
Git-on-my-level added a commit that referenced this pull request Nov 28, 2026
…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. -->
MichaelC001 pushed a commit to MichaelC001/omi that referenced this pull request Nov 28, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant