Skip to content

config(firestore-reads): guard flag-off finjob_candidate_queries 5->0 (WQ32) - #24207

Merged
Git-on-my-level merged 1 commit into
mainfrom
lane/firestore-reads-wq32-finjob-off
Nov 1, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
lane/firestore-reads-wq32-finjob-off

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

Firestore read lever config — guard flag-off: finjob_candidate_queries 5 -> 0. Complete 20-key literal, delta vs main only in that one key. This completes the WQ31 discrimination cohort: every guard-flagged lever is now fully off.

Reason: the hourly tick at 2026-11-01T02:00:36Z raised flag_off: finjob_candidate_queries (verify verdict UNSAFE at 5%: backend-sync 5xx rate 0.0035, 1423 err/h excl 4 audio-merge, vs ref 0.0014 — same flat band as the 17Z-21Z ticks that triggered #24194's 7-lever flag-off). finjob was deliberately left at 5 in #24194 to ride its own WQ13 ramp; with the tick now grading it UNSAFE on the same service-scope why, the runbook pending-action rule applies (flag off on breach; ambiguous evidence flags off anyway, re-enable at 5% if the rate persists at levers 0 — that exonerates the cohort). Reads impact ~0 (lever was at 5%); the change is diagnostic + guard-contract compliance.

Product invariants affected

  • INV-FSR-LEVERS — replace-mode literal rule respected; all 20 keys present; absent keys remain off by default; KNOWN_LEVERS unchanged.
  • INV-MEM-4 — required by the backend/deploy/runtime_env.yaml generated-manifest lock; the change is the rendered FIRESTORE_READ_LEVERS literal only.
  • INV-DATA-1 — lever-off restores the legacy un-memoized candidate-query path (safe default, previously serving pre-ramp).

Failure-Class: none

Verification

  • set_levers.py REPLACE-mode with the complete 20-key finjob:0 literal; prod.overlay.yaml hand-patched at its 4 inline-literal CR-override sites (set_levers does not match that form — same hand-patch config(firestore-reads): guard flag-off 7 levers 100->0 (backend-sync 5xx re-escalation, WQ31) #24194 needed); compose_runtime_env.py + render_feature_flag_registry.py re-run; rendered audit: zero hosts with finjob != 0.
  • Contract-pinned expected dict in test_render_backend_runtime_env.py updated finjob 5 -> 0 (the pin set_levers does not reach).
  • Diff audit: 44 changed-literal sites (36 via set_levers + 4 overlay + rendered twins), every + side equals the new 20-key literal exactly; every other lever key byte-identical.
  • Contract tests: 119 passed (test_render_backend_runtime_env.py + test_verify_pusher_config_references.py, lane venv).
  • Full CI: on this head.

Lead-owned ship plan

URGENT: deploy needed listen -> pusher -> Cloud Run (FIRESTORE_READ_LEVERS train order). Bus handoff posted to the lead; completes the levers-0 5xx discrimination watch started with #24194.

View guided diff Turn on auto-fix

Hourly tick 2026-11-01T02:00:36Z raised flag_off: finjob UNSAFE at 5%
(backend-sync 5xx 0.0035 vs ref 0.0014, same flat band as the WQ30/WQ31
re-escalation ticks). Completes the levers-0 discrimination cohort from
#24194. Complete 20-key literal; overlay CR-override sites hand-patched;
contract expected dict updated; 119 contract tests pass.
@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T02:48:14.833324Z bee1188 PR opened
ℹ️ 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.

@cubic-dev-ai cubic-dev-ai 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.

2 issues found across 11 files

Confidence score: 4/5

  • backend/deploy/runtime_env/README.md says the people dedupe guard is off, but still directs a 5% rollout followed by expansion to 100%. Clarify whether the ramp is suspended and align the rollout guidance.
  • backend/deploy/runtime_env/prod.overlay.yaml still labels the value (finjob=5) even though finjob_candidate_queries is 0. Update the annotation to match the value and include WQ32 alongside WQ31.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="backend/deploy/runtime_env/README.md">

<violation number="1" location="backend/deploy/runtime_env/README.md:74">
P2: This section now documents `people_scan_dedupe:0` as a guard flag-off, but the rollout paragraph below still directs a people 5% start and an expansion to 100 by 2026-10-28. Either the people ramp is suspended and the paragraph needs to say so, or the `people_scan_dedupe:0` line is wrong. Reconcile the two so the README gives one instruction for this lever.</violation>
</file>

<file name="backend/deploy/runtime_env/prod.overlay.yaml">

<violation number="1" location="backend/deploy/runtime_env/prod.overlay.yaml:506">
P3: The comment block above this literal still says `(finjob=5)`, but `finjob_candidate_queries` is now 0 in this literal. Update the annotation, and mention WQ32 as well as WQ31, so the comment matches the value in all four blocks.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

`people_scan_dedupe:100`; `finjob_candidate_queries` stays at 5.
surfaces explicitly declare all 20 current keys. The guard flag-offs leave
`memory_list_index_window:0`, `batch_privacy_memoize:0`,
`people_scan_dedupe:0`, and `finjob_candidate_queries:0`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: This section now documents people_scan_dedupe:0 as a guard flag-off, but the rollout paragraph below still directs a people 5% start and an expansion to 100 by 2026-10-28. Either the people ramp is suspended and the paragraph needs to say so, or the people_scan_dedupe:0 line is wrong. Reconcile the two so the README gives one instruction for this lever.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/deploy/runtime_env/README.md, line 74:

<comment>This section now documents `people_scan_dedupe:0` as a guard flag-off, but the rollout paragraph below still directs a people 5% start and an expansion to 100 by 2026-10-28. Either the people ramp is suspended and the paragraph needs to say so, or the `people_scan_dedupe:0` line is wrong. Reconcile the two so the README gives one instruction for this lever.</comment>

<file context>
@@ -69,9 +69,9 @@ mixed identity cannot be established. No actual resource is configured here.
-`people_scan_dedupe:100`; `finjob_candidate_queries` stays at 5.
+surfaces explicitly declare all 20 current keys. The guard flag-offs leave
+`memory_list_index_window:0`, `batch_privacy_memoize:0`,
+`people_scan_dedupe:0`, and `finjob_candidate_queries:0`.
 
 Monthly-total enablement and epoch deliberately remain split:
</file context>

# carries people=5, memory=0, privacy=0 (finjob=5).
# Lead train: listen -> pusher -> Cloud Run; do not enable additional monthly readers here.
FIRESTORE_READ_LEVERS: {value: '{"action_items_page":100,"backfill_task_reads":0,"batch_privacy_memoize":0,"candidates_page":100,"canonical_statuses_dedupe":100,"conversation_list_cursor":100,"deletion_marker_cache":100,"finjob_candidate_queries":5,"historical_scan_memo":0,"ledger_purge_coalesce":0,"mcp_conversation_cards_cache":100,"memory_list_index_window":0,"people_scan_dedupe":0,"queue_age_sample_budget":0,"request_read_dedupe":100,"serving_config_cache":100,"singleton_loops":0,"subscription_cache":100,"usage_month_cache":0,"usage_month_total":0}', category: rollout}
FIRESTORE_READ_LEVERS: {value: '{"action_items_page":100,"backfill_task_reads":0,"batch_privacy_memoize":0,"candidates_page":100,"canonical_statuses_dedupe":100,"conversation_list_cursor":100,"deletion_marker_cache":100,"finjob_candidate_queries":0,"historical_scan_memo":0,"ledger_purge_coalesce":0,"mcp_conversation_cards_cache":100,"memory_list_index_window":0,"people_scan_dedupe":0,"queue_age_sample_budget":0,"request_read_dedupe":100,"serving_config_cache":100,"singleton_loops":0,"subscription_cache":100,"usage_month_cache":0,"usage_month_total":0}', category: rollout}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The comment block above this literal still says (finjob=5), but finjob_candidate_queries is now 0 in this literal. Update the annotation, and mention WQ32 as well as WQ31, so the comment matches the value in all four blocks.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/deploy/runtime_env/prod.overlay.yaml, line 506:

<comment>The comment block above this literal still says `(finjob=5)`, but `finjob_candidate_queries` is now 0 in this literal. Update the annotation, and mention WQ32 as well as WQ31, so the comment matches the value in all four blocks.</comment>

<file context>
@@ -503,7 +503,7 @@ overlay:
           # carries people=5, memory=0, privacy=0 (finjob=5).
           # Lead train: listen -> pusher -> Cloud Run; do not enable additional monthly readers here.
-          FIRESTORE_READ_LEVERS: {value: '{"action_items_page":100,"backfill_task_reads":0,"batch_privacy_memoize":0,"candidates_page":100,"canonical_statuses_dedupe":100,"conversation_list_cursor":100,"deletion_marker_cache":100,"finjob_candidate_queries":5,"historical_scan_memo":0,"ledger_purge_coalesce":0,"mcp_conversation_cards_cache":100,"memory_list_index_window":0,"people_scan_dedupe":0,"queue_age_sample_budget":0,"request_read_dedupe":100,"serving_config_cache":100,"singleton_loops":0,"subscription_cache":100,"usage_month_cache":0,"usage_month_total":0}', category: rollout}
+          FIRESTORE_READ_LEVERS: {value: '{"action_items_page":100,"backfill_task_reads":0,"batch_privacy_memoize":0,"candidates_page":100,"canonical_statuses_dedupe":100,"conversation_list_cursor":100,"deletion_marker_cache":100,"finjob_candidate_queries":0,"historical_scan_memo":0,"ledger_purge_coalesce":0,"mcp_conversation_cards_cache":100,"memory_list_index_window":0,"people_scan_dedupe":0,"queue_age_sample_budget":0,"request_read_dedupe":100,"serving_config_cache":100,"singleton_loops":0,"subscription_cache":100,"usage_month_cache":0,"usage_month_total":0}', category: rollout}
           FSR_USAGE_MONTH_TOTAL_EPOCH: {value: c2fs_20261026_r1, category: rollout}
           # Batch ladder 2026-10-29 (lead ruling 12:15Z): pin shadow 25 so a Cloud Run deploy
</file context>

@Git-on-my-level
Git-on-my-level merged commit 53bbdbd into main Nov 1, 2026
65 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/firestore-reads-wq32-finjob-off branch November 1, 2026 03:15
Git-on-my-level added a commit that referenced this pull request Nov 1, 2026
…eep #24210 backend-sync usage_month exception) (#24238)

## Summary

Firestore reads loop **restoration config** (guard cohort re-enable):
five `FIRESTORE_READ_LEVERS` values 0 → **100**, everything else
byte-identical to main. This is the exoneration follow-up to #24194
(guard flag-off, WQ31/WQ32).

- Discriminating experiment result (levers at 0 since #24207/#24210
served ~04:44Z 2026-11-01): backend-sync 5xx stayed **flat-to-higher**
at 0.0041–0.0044 (1522–1639 err/h, ticks 05Z/06Z/07Z) vs 0.0035–0.0036
at levers 100 and ref 0.0014 — per the loop's own rule, the flagged
cohort is **EXONERATED** (exogenous). The lead's independent RCAs agree
(`admitscope-2026-11-01.md` §5 "After the flag-off, 5xx rose, so per the
runbook's own discriminating rule the flagged cohort is exonerated";
`syncwall-2026-11-01.md` attributes the 5xx mass to deliberate
nonterminal_ack + legacy file retries).
- Restored to 100: `singleton_loops`, `backfill_task_reads`,
`historical_scan_memo`, `ledger_purge_coalesce`,
`queue_age_sample_budget`. Measured give-back at 0 (cohort-union of
needle callers, snapshot 2026-11-01T05Z/07Z vs pre-flag-off
10-31T19Z/21Z): ~29–44M reads/day ≈ **$14–21/day**; at 0 the flag-off
also re-added the batch-admission latency class documented in
admitscope.
- **Kept at #24210 scope on purpose (lead instruction
6be508/5bd7df/c38004):** `usage_month_cache` / `usage_month_total` stay
0 everywhere except the `cloud_run/backend-sync` exception (100/100,
`FSR_USAGE_MONTH_TOTAL_EPOCH` unchanged). The GKE charts keep the Cloud
Run-only `usage_month_total` split (GKE = 0). `finjob_candidate_queries`
stays 0 (its own 02Z UNSAFE gate; callers ~0). `batch_privacy_memoize`,
`memory_list_index_window`, `people_scan_dedupe` stay 0 (graded
WEAK/FALSIFIED).

Config only, generated with `avo/firestore-reads/set_levers.py` + the
prod.overlay inline sites (5 keys only); audited at 19 literal sites:
the 5 restored keys = 100 everywhere,
`usage_month_cache`/`usage_month_total` = 0 everywhere except the
backend-sync Cloud Run site. Regenerated `runtime_env.yaml` + flag
registry; the two pinned contract tests updated (119/119 pass on the
lane venv). Per the lead: **this PR is NOT to be merged by the loop** —
it is staged for the single off-peak lead train before 13:00Z.

## Product invariants affected

- INV-MEM-4 — config-only lever rollout; no data-path, promotion or
authority change; every restored lever reverts to flag-off behavior at
0.
- INV-DATA-1 — no routing or ownership change; value-only edit of the
existing `FIRESTORE_READ_LEVERS` key.

## Test plan

- `backend/tests/unit/test_render_backend_runtime_env.py` +
`backend/tests/unit/test_verify_pusher_config_references.py`: 119/119
pass on the lane venv.
- Literal audit: 19 sites JSON-parsed; 5 restored keys = 100 at every
site; umc/umt = 0 everywhere except `prod.overlay` backend-sync
(100/100, #24210 exception preserved); finjob/bpm/mliw/people = 0 at
every site.

## Rollout

1. Lead-owned single off-peak train before 13:00Z, order **listen →
pusher → cloud-run** (FIRESTORE_READ_LEVERS order). The loop does not
merge, dispatch, or approve anything here.
2. Post-train: tick verify continues; ramp-clock/grade bookkeeping per
runbook; re-baseline after serve.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/24238?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/24238?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F24238&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. -->
kriegcloud pushed a commit to kriegcloud/omi that referenced this pull request Nov 1, 2026
…eep BasedHardware#24210 backend-sync usage_month exception)

Discrimination verdict at full cohort-off (BasedHardware#24207+BasedHardware#24210 served ~04:44Z):
backend-sync 5xx flat-to-higher 0.0041-0.0044 (1522-1639/h, 05Z-07Z ticks)
vs 0.0035-0.0036 at 100 and ref 0.0014 -> cohort EXONERATED per runbook
rule; agrees with lead RCA admitscope-2026-11-01 s5 + syncwall-2026-11-01.

Restored to 100: singleton_loops, backfill_task_reads, historical_scan_memo,
ledger_purge_coalesce, queue_age_sample_budget. Give-back at 0 measured
~29-44M reads/day (~$14-21/day, snapshot union 11-01T05/07Z vs 10-31T19/21Z).

Kept: usage_month_cache/usage_month_total at BasedHardware#24210 scope (backend-sync CR
site 100/100 only; GKE umt stays 0 per CR-only split) per lead instruction;
finjob_candidate_queries 0 (own 02Z gate); bpm/mliw/people 0 (graded).

Config-only via set_levers.py + prod.overlay inline sites; 19 literal sites
audited; contract tests updated; 119/119 pass (lane venv). NOT merged by the
loop: staged for the lead's single off-peak train before 13:00Z.
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