Repository navigation
feat(monitoring): alert on fresh lifecycle dwell before admission and enrichment - #24595
Conversation
…enrichment Add bounded recent-cohort lifecycle samples and imported age, stock and observer-health rules. Preserve legacy backlog as agent-tier stock and stamp new BYOK blocked entries atomically with their state. Failure-Class: none
…enrichment Add bounded recent-cohort lifecycle samples and imported age, stock and observer-health rules. Preserve legacy backlog as agent-tier stock and stamp new BYOK blocked entries atomically with their state. Failure-Class: none
…enrichment Add bounded recent-cohort lifecycle samples and imported age, stock and observer-health rules. Preserve legacy backlog as agent-tier stock and stamp new BYOK blocked entries atomically with their state. Failure-Class: none
…enrichment Add bounded recent-cohort lifecycle samples and imported age, stock and observer-health rules. Preserve legacy backlog as agent-tier stock and stamp new BYOK blocked entries atomically with their state. Failure-Class: none
…enrichment Add bounded recent-cohort lifecycle samples and imported age, stock and observer-health rules. Preserve legacy backlog as agent-tier stock and stamp new BYOK blocked entries atomically with their state. Failure-Class: none
…enrichment Add bounded recent-cohort lifecycle samples and imported age, stock and observer-health rules. Preserve legacy backlog as agent-tier stock and stamp new BYOK blocked entries atomically with their state. Failure-Class: none
…enrichment Add bounded recent-cohort lifecycle samples and imported age, stock and observer-health rules. Preserve legacy backlog as agent-tier stock and stamp new BYOK blocked entries atomically with their state. Failure-Class: none
…enrichment Add bounded recent-cohort lifecycle samples and imported age, stock and observer-health rules. Preserve legacy backlog as agent-tier stock and stamp new BYOK blocked entries atomically with their state. Failure-Class: none
There was a problem hiding this comment.
11 issues found across 26 files
Confidence score: 3/5
lifecycle_metrics_queries.pycan report first-summary debt when policy disables it, and can treat boolean or non-finite deadlines as valid admission evidence. Respect the policy and reject those values.- The pinned digests in
firestore_lifecycle_metrics_drivers.pyandfirestore_query_driver_registry.pyare stale, so the digest checks fail in CI. Update them to match the current function bodies. metrics.pyskips lifecycle metrics in shadow mode because the worker receives aDualStore, not aFirestoreStore. Refresh through the delegated Firestore store.test_lifecycle_alarm_metrics.pydoes not enforce the projection or bounded read parameters production relies on. Make the fixture preserve selected fields and assert the read kwargs.
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/database/lifecycle_metrics_queries.py">
<violation number="1" location="backend/database/lifecycle_metrics_queries.py:94">
P2: This check accepts boolean and non-finite deadline metadata as proof of a fresh-summary admission. Reject booleans and non-finite values, matching `config.summary_guarantee.preserves_admitted`, before classifying the row as `fresh`.</violation>
<violation number="2" location="backend/database/lifecycle_metrics_queries.py:94">
P1: `enrichment` treats any numeric `summary_deadline_at` as first-summary debt even when the durable `first_summary_policy` explicitly disables it. A legacy backfill row retaining that deadline is therefore reported on the fresh lane; honor the policy whenever it is present.</violation>
</file>
<file name="backend/charts/monitoring/alerts/resilience.json">
<violation number="1" location="backend/charts/monitoring/alerts/resilience.json:5357">
P2: This threshold annotation is not equivalent to the alert condition because `>` binds tighter than `or`; anyone pasting it into Prometheus gets an always-true fallback and cannot reproduce the rule. Parenthesize the full expression before applying `> 0` in every blind/no-job threshold annotation.</violation>
</file>
<file name="backend/tests/support/firestore_lifecycle_metrics_drivers.py">
<violation number="1" location="backend/tests/support/firestore_lifecycle_metrics_drivers.py:20">
P2: This `body_digest` does not match the current `_where` function body, so the digest-pinned Firestore query coverage test fails. Replace it with the digest generated from the current function (and keep the central registry literal synchronized).</violation>
</file>
<file name="backend/tests/unit/test_monitoring_telemetry_contract.py">
<violation number="1" location="backend/tests/unit/test_monitoring_telemetry_contract.py:84">
P2: This count-only assertion can pass after a required lifecycle alert is removed and replaced by an unrelated rule with the same evidence date. Assert the exact expected UID set so missing dwell, freshness, stock, or blind companion alerts fail the contract test.</violation>
</file>
<file name="backend/tests/unit/test_lifecycle_alarm_metrics.py">
<violation number="1" location="backend/tests/unit/test_lifecycle_alarm_metrics.py:35">
P2: This fixture does not exercise the no-identity projection it claims to cover: `select` is a no-op, so `to_dict()` exposes every stored field. Preserve the selected field set and return only those fields, then include an identity-bearing fixture field to prove it is excluded.</violation>
<violation number="2" location="backend/tests/unit/test_lifecycle_alarm_metrics.py:69">
P2: The count-read contract is untested because this lambda swallows its kwargs. Assert `{'timeout': 10, 'retry': None}` in a real `get` helper so a regression can’t remove the bounded retry settings silently.</violation>
<violation number="3" location="backend/tests/unit/test_lifecycle_alarm_metrics.py:82">
P2: Assert the `get_all` kwargs here; otherwise the test does not protect the no-job batch-read timeout, retry, or empty-field projection contract that production relies on.</violation>
</file>
<file name="backend/tests/support/firestore_query_driver_registry.py">
<violation number="1" location="backend/tests/support/firestore_query_driver_registry.py:146">
P2: This pinned digest does not match `_where`, so the digest guardrail fails immediately and the registry cannot pass CI. Replace it with the digest of the current function.</violation>
<violation number="2" location="backend/tests/support/firestore_query_driver_registry.py:186">
P2: This replacement digest is also stale, so the existing digest-pinned coverage check still fails for `_create_or_get_finalization_intent_txn`. Pin the digest of the current function instead.</violation>
</file>
<file name="backend/utils/batch_pipeline/metrics.py">
<violation number="1" location="backend/utils/batch_pipeline/metrics.py:259">
P2: These lifecycle metrics are never sampled by the batch worker when `BATCH_JOBSTORE_MODE=shadow` is enabled, because the runtime supplies a `DualStore` rather than a `FirestoreStore`. Refresh through the delegated Firestore primary (or add an explicit shadow-store metrics path) so the lifecycle alerts do not see missing observations in that deployment mode.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| not row.get('effects_only') | ||
| and not row.get('summary_seen') | ||
| and ( | ||
| policy.get('first_summary_enabled') is True or isinstance(row.get('summary_deadline_at'), (int, float)) |
There was a problem hiding this comment.
P1: enrichment treats any numeric summary_deadline_at as first-summary debt even when the durable first_summary_policy explicitly disables it. A legacy backfill row retaining that deadline is therefore reported on the fresh lane; honor the policy whenever it is present.
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/database/lifecycle_metrics_queries.py, line 94:
<comment>`enrichment` treats any numeric `summary_deadline_at` as first-summary debt even when the durable `first_summary_policy` explicitly disables it. A legacy backfill row retaining that deadline is therefore reported on the fresh lane; honor the policy whenever it is present.</comment>
<file context>
@@ -0,0 +1,131 @@
+ not row.get('effects_only')
+ and not row.get('summary_seen')
+ and (
+ policy.get('first_summary_enabled') is True or isinstance(row.get('summary_deadline_at'), (int, float))
+ )
+ )
</file context>
| not row.get('effects_only') | ||
| and not row.get('summary_seen') | ||
| and ( | ||
| policy.get('first_summary_enabled') is True or isinstance(row.get('summary_deadline_at'), (int, float)) |
There was a problem hiding this comment.
P2: This check accepts boolean and non-finite deadline metadata as proof of a fresh-summary admission. Reject booleans and non-finite values, matching config.summary_guarantee.preserves_admitted, before classifying the row as fresh.
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/database/lifecycle_metrics_queries.py, line 94:
<comment>This check accepts boolean and non-finite deadline metadata as proof of a fresh-summary admission. Reject booleans and non-finite values, matching `config.summary_guarantee.preserves_admitted`, before classifying the row as `fresh`.</comment>
<file context>
@@ -0,0 +1,131 @@
+ not row.get('effects_only')
+ and not row.get('summary_seen')
+ and (
+ policy.get('first_summary_enabled') is True or isinstance(row.get('summary_deadline_at'), (int, float))
+ )
+ )
</file context>
| "verification": "Check the source observation timestamp and scan-truncated metric first. Bounded stock counts are lower bounds at their cap; compare consecutive samples.", | ||
| "safe_next_action": "Assign the affected lifecycle source to its owner. Restore the observer if stale or blind; use the approved bounded repair runbook after confirming the cohort. Do not replay historical stock automatically.", | ||
| "runbook": "backend/charts/monitoring/lifecycle-alarms.md", | ||
| "threshold": "max(omi_batch_record_pending_scan_truncated and ignoring(state, lane) (time() - omi_batch_record_pending_observed_at_seconds < 900)) or vector(1) > 0 for 30m", |
There was a problem hiding this comment.
P2: This threshold annotation is not equivalent to the alert condition because > binds tighter than or; anyone pasting it into Prometheus gets an always-true fallback and cannot reproduce the rule. Parenthesize the full expression before applying > 0 in every blind/no-job threshold annotation.
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/charts/monitoring/alerts/resilience.json, line 5357:
<comment>This threshold annotation is not equivalent to the alert condition because `>` binds tighter than `or`; anyone pasting it into Prometheus gets an always-true fallback and cannot reproduce the rule. Parenthesize the full expression before applying `> 0` in every blind/no-job threshold annotation.</comment>
<file context>
@@ -4904,5 +4909,1909 @@
+ "verification": "Check the source observation timestamp and scan-truncated metric first. Bounded stock counts are lower bounds at their cap; compare consecutive samples.",
+ "safe_next_action": "Assign the affected lifecycle source to its owner. Restore the observer if stale or blind; use the approved bounded repair runbook after confirming the cohort. Do not replay historical stock automatically.",
+ "runbook": "backend/charts/monitoring/lifecycle-alarms.md",
+ "threshold": "max(omi_batch_record_pending_scan_truncated and ignoring(state, lane) (time() - omi_batch_record_pending_observed_at_seconds < 900)) or vector(1) > 0 for 30m",
+ "evidence_date": "2026-11-04",
+ "intended_final_threshold": ">0 for 30m; review after the freshtitles backlog drain. Age thresholds remain the lifecycle budget.",
</file context>
| covered_by=tuple(prefix + name for name in ('record_pending', 'nojob', 'enrichment', 'blocked_byok')), | ||
| reason='pure filter builder; terminal observations execute inside the named sampler drivers', | ||
| expect_observed=False, | ||
| body_digest='51d3e38b20df6800101fbf671471d2538c487d9c702698c6a9ad221c43f89a79', |
There was a problem hiding this comment.
P2: This body_digest does not match the current _where function body, so the digest-pinned Firestore query coverage test fails. Replace it with the digest generated from the current function (and keep the central registry literal synchronized).
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/tests/support/firestore_lifecycle_metrics_drivers.py, line 20:
<comment>This `body_digest` does not match the current `_where` function body, so the digest-pinned Firestore query coverage test fails. Replace it with the digest generated from the current function (and keep the central registry literal synchronized).</comment>
<file context>
@@ -0,0 +1,22 @@
+ covered_by=tuple(prefix + name for name in ('record_pending', 'nojob', 'enrichment', 'blocked_byok')),
+ reason='pure filter builder; terminal observations execute inside the named sampler drivers',
+ expect_observed=False,
+ body_digest='51d3e38b20df6800101fbf671471d2538c487d9c702698c6a9ad221c43f89a79',
+ ),
+ )
</file context>
| assert "'backend/charts/monitoring/live-alert-gate.json'" in workflow | ||
| rules = json.loads((MONITORING / 'alerts/resilience.json').read_text()) | ||
| lifecycle = {rule['uid']: rule for rule in rules if rule['annotations'].get('evidence_date') == '2026-11-04'} | ||
| assert len(lifecycle) == 13 |
There was a problem hiding this comment.
P2: This count-only assertion can pass after a required lifecycle alert is removed and replaced by an unrelated rule with the same evidence date. Assert the exact expected UID set so missing dwell, freshness, stock, or blind companion alerts fail the contract test.
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/tests/unit/test_monitoring_telemetry_contract.py, line 84:
<comment>This count-only assertion can pass after a required lifecycle alert is removed and replaced by an unrelated rule with the same evidence date. Assert the exact expected UID set so missing dwell, freshness, stock, or blind companion alerts fail the contract test.</comment>
<file context>
@@ -75,6 +75,22 @@ def _alert_rules() -> list[dict[str, Any]]:
+ assert "'backend/charts/monitoring/live-alert-gate.json'" in workflow
+ rules = json.loads((MONITORING / 'alerts/resilience.json').read_text())
+ lifecycle = {rule['uid']: rule for rule in rules if rule['annotations'].get('evidence_date') == '2026-11-04'}
+ assert len(lifecycle) == 13
+ gate = set(json.loads((MONITORING / 'live-alert-gate.json').read_text())['uids'])
+ assert set(lifecycle) <= gate
</file context>
| assert len(lifecycle) == 13 | |
| assert set(lifecycle) == { | |
| 'omi-finalization-byok-dwell-page', | |
| 'omi-record-pending-dwell', | |
| 'omi-record-pending-dwell-stale', | |
| 'omi-record-pending-dwell-blind', | |
| 'omi-record-pending-stock', | |
| 'omi-record-nojob-stock', | |
| 'omi-record-nojob-blind', | |
| 'omi-enrichment-fresh-dwell', | |
| 'omi-enrichment-fresh-dwell-stale', | |
| 'omi-enrichment-fresh-dwell-blind', | |
| 'omi-enrichment-backlog-depth', | |
| 'omi-finalization-byok-dwell-page-stale', | |
| 'omi-finalization-byok-dwell-page-blind', | |
| } |
| for path, row in self.rows() | ||
| ] | ||
|
|
||
| def count(self): |
There was a problem hiding this comment.
P2: The count-read contract is untested because this lambda swallows its kwargs. Assert {'timeout': 10, 'retry': None} in a real get helper so a regression can’t remove the bounded retry settings silently.
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/tests/unit/test_lifecycle_alarm_metrics.py, line 69:
<comment>The count-read contract is untested because this lambda swallows its kwargs. Assert `{'timeout': 10, 'retry': None}` in a real `get` helper so a regression can’t remove the bounded retry settings silently.</comment>
<file context>
@@ -0,0 +1,226 @@
+ for path, row in self.rows()
+ ]
+
+ def count(self):
+ return SimpleNamespace(get=lambda **kwargs: [[SimpleNamespace(value=len(self.rows()))]])
+
</file context>
| def count(self): | |
| def count(self): | |
| def get(**kwargs): | |
| assert kwargs == {'timeout': 10, 'retry': None} | |
| return [[SimpleNamespace(value=len(self.rows()))]] | |
| return SimpleNamespace(get=get) |
| def order_by(self, field): | ||
| return replace(self, order=field) | ||
|
|
||
| def select(self, fields): |
There was a problem hiding this comment.
P2: This fixture does not exercise the no-identity projection it claims to cover: select is a no-op, so to_dict() exposes every stored field. Preserve the selected field set and return only those fields, then include an identity-bearing fixture field to prove it is excluded.
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/tests/unit/test_lifecycle_alarm_metrics.py, line 35:
<comment>This fixture does not exercise the no-identity projection it claims to cover: `select` is a no-op, so `to_dict()` exposes every stored field. Preserve the selected field set and return only those fields, then include an identity-bearing fixture field to prove it is excluded.</comment>
<file context>
@@ -0,0 +1,226 @@
+ def order_by(self, field):
+ return replace(self, order=field)
+
+ def select(self, fields):
+ return self
+
</file context>
| # Re-reviewed: quiet admission uses the shared speech clock; query/read shapes are unchanged. | ||
| 'database.conversation_finalization_jobs._create_or_get_finalization_intent_txn': 'a6c91232a5a2cff334260675817331cb46b5b670cad91acd6bdd9c46ed58ee67', | ||
| # Re-reviewed 2026-11-04: atomic blocked_byok_at metadata only; query ownership is unchanged. | ||
| 'database.conversation_finalization_jobs._create_or_get_finalization_intent_txn': '9ead08b44085a755f8f1669059d955658b0cc6cf3c2172a12737a056bf562bef', |
There was a problem hiding this comment.
P2: This replacement digest is also stale, so the existing digest-pinned coverage check still fails for _create_or_get_finalization_intent_txn. Pin the digest of the current function instead.
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/tests/support/firestore_query_driver_registry.py, line 186:
<comment>This replacement digest is also stale, so the existing digest-pinned coverage check still fails for `_create_or_get_finalization_intent_txn`. Pin the digest of the current function instead.</comment>
<file context>
@@ -180,7 +182,8 @@ def patcher(client):
# Re-reviewed: quiet admission uses the shared speech clock; query/read shapes are unchanged.
- 'database.conversation_finalization_jobs._create_or_get_finalization_intent_txn': 'a6c91232a5a2cff334260675817331cb46b5b670cad91acd6bdd9c46ed58ee67',
+ # Re-reviewed 2026-11-04: atomic blocked_byok_at metadata only; query ownership is unchanged.
+ 'database.conversation_finalization_jobs._create_or_get_finalization_intent_txn': '9ead08b44085a755f8f1669059d955658b0cc6cf3c2172a12737a056bf562bef',
'database.durable_queue_age._publish_queue_ages': '58e66cfc32f39bdc2e9b1e6c805d18599c1ff14be8dbcff68eadc23506656d9b',
'database.firestore_query_types.FirestoreQuerySpec.build': '2c26a157a8e87be2bcfef668e3bd5cdc0a9c0d96e0b56bada98c30741c8be01a',
</file context>
| 'database.conversation_finalization_jobs._create_or_get_finalization_intent_txn': '9ead08b44085a755f8f1669059d955658b0cc6cf3c2172a12737a056bf562bef', | |
| 'database.conversation_finalization_jobs._create_or_get_finalization_intent_txn': '7cf9687d1ae370ede86099f5c703c45f04e9805eacbc2fdfc4b4b184c5a1bf98', |
| _MCP_KEY = 'omi_mcp_' + 'a' * 32 | ||
|
|
||
| BODY_DIGEST = { | ||
| 'database.lifecycle_metrics_queries._where': '51d3e38b20df6800101fbf671471d2538c487d9c702698c6a9ad221c43f89a79', |
There was a problem hiding this comment.
P2: This pinned digest does not match _where, so the digest guardrail fails immediately and the registry cannot pass CI. Replace it with the digest of the current function.
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/tests/support/firestore_query_driver_registry.py, line 146:
<comment>This pinned digest does not match `_where`, so the digest guardrail fails immediately and the registry cannot pass CI. Replace it with the digest of the current function.</comment>
<file context>
@@ -142,6 +143,7 @@ def patcher(client):
_MCP_KEY = 'omi_mcp_' + 'a' * 32
BODY_DIGEST = {
+ 'database.lifecycle_metrics_queries._where': '51d3e38b20df6800101fbf671471d2538c487d9c702698c6a9ad221c43f89a79',
'database.batch_pipeline_store.FirestoreStore.ready_for_capacity': '975eabd92f43ba5da3d847439f4d8e3592525ccd31c11dcac6463365535eac10',
'database.batch_pipeline_store.FirestoreStore.oldest_admissible_ready': '293687cc6708d7ab2f673cb2984e6bb8cbfe581fa526db8c1040fd011dc00107',
</file context>
| 'database.lifecycle_metrics_queries._where': '51d3e38b20df6800101fbf671471d2538c487d9c702698c6a9ad221c43f89a79', | |
| 'database.lifecycle_metrics_queries._where': '0d9e02e0256fca2a42cc5ea34e8ef05cf4aab3f2d25ea8f953575b6d851e5b33', |
| if isinstance(store, FirestoreStore): | ||
| from database.lifecycle_metrics_queries import record_pending, nojob | ||
|
|
||
| self.record_pending.refresh(now, lambda: record_pending(store.client, store.namespace, now)) |
There was a problem hiding this comment.
P2: These lifecycle metrics are never sampled by the batch worker when BATCH_JOBSTORE_MODE=shadow is enabled, because the runtime supplies a DualStore rather than a FirestoreStore. Refresh through the delegated Firestore primary (or add an explicit shadow-store metrics path) so the lifecycle alerts do not see missing observations in that deployment mode.
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/utils/batch_pipeline/metrics.py, line 259:
<comment>These lifecycle metrics are never sampled by the batch worker when `BATCH_JOBSTORE_MODE=shadow` is enabled, because the runtime supplies a `DualStore` rather than a `FirestoreStore`. Refresh through the delegated Firestore primary (or add an explicit shadow-store metrics path) so the lifecycle alerts do not see missing observations in that deployment mode.</comment>
<file context>
@@ -251,6 +254,10 @@ def _refresh(self, store: Store, now: float) -> None:
if isinstance(store, FirestoreStore):
+ from database.lifecycle_metrics_queries import record_pending, nojob
+
+ self.record_pending.refresh(now, lambda: record_pending(store.client, store.namespace, now))
+ self.nojob.refresh(now, lambda: nojob(store.client, store.namespace))
self.refresh_timeliness(store, now)
</file context>
Apply tier-appropriate notification timing, preserve split rule bytes in the combined export and refresh the offline GMP consumer inventory. Verify the entire selector-owned monitoring contract group rather than only changed test files.
Preserve the lifecycle emitter and export contracts while integrating the merged fresh-title recovery age gate before revalidation and guarded publication.
…ixture Keep the hermetic workflow control tree complete when the registry imports the new pure lifecycle index module. The production workflow stays unchanged.
Reject cleared or mutated alias deadline evidence and independently census persisted entries for every deadline-bearing machine. Check positional setdefault state values and literal aliases. Preserve the bounded span patch through a pinned returned-key proof with portable AST fingerprints. The 12 review reproductions and the extra source-alias case failed before the fixes. Valid stamped-entry, rebuilt-payload, null-debt exit and contract mutation controls prevent blanket rejection or unverified exemptions. Refresh the source snapshot at main 563e6c2. Remove two stale record_pending metric/page xfails supplied by #24595; #24587 admission leases still do not stamp an overall pending-dwell deadline. Local backend/test.sh: 926 passed, 68 strict xfails. Unmasked audit: exactly 68 AssertionErrors, no unexpected or CPU guard failures. Main integration is separate (bd6cdcb); compatibility commit372ccb1a61e0 is the inspected cherry-pick of peer6201ba0. Lead acceptance under0d2137 and exact-head green CI are required before merge. No third review.
The merged lifecycle table still binds the BYOK dwell page to the legacy all-age gauge. #24595 correctly changed that page to the recent-cohort gauge so importing it does not page on known backlog. Their combination leaves main's lifecycle invariant checks red. This test-only correction points the table at `omi_finalization_byok_new_oldest_age_seconds`. The AST inventory now derives gauge names from literal `PhaseMetrics` instances and the real factory's `Gauge` suffixes. A negative test rejects a prefix not instantiated as PhaseMetrics and a suffix absent from the factory. Every existing assertion and strict expected-failure declaration stays in place. Only two B1 test/support files change. No runtime code, alert threshold, workflow, production access or deployment changes. Coordinated with B1 owner lcinv for #24600. uicleanup requested this standalone priority fix in ruling4d1372 and explicitly waived Luna review for this test-only delta; lead2 owns merge on green. Validation: in a fresh worktree based on current main `563e6c240944`, canonical `backend/test.sh` with the explicit two-file list passed 429 tests with 79 inherited strict expected failures at head `eaa1316e1624`. The same patch also passed 430 tests in the PR2 tree (one additional source-inventory case there). Guarded push passed full preflight and its selected backend unit gate (143 passed,79 inherited strict expected failures). All local checks/push used `omi-heavy run -- nice -n 19` with the five GCP credential/project variables unset. Current-head CI is pending. No runtime validation is claimed. Initiative: capture/transcription/speakers Failure-Class: none <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/24605?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/24605?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F24605&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. -->
- lifecycle state table: the blocked_byok stock dwell alert is agent tier (omi-finalization-byok-dwell-info) since #24595 moved the page to fresh cohort dwell; re-point the inventory row and declare the folded writer moves (recover_deferred_processing_failure_txn and the dead-letter title helpers now live in conversation_terminal_title) - crash-window orphans: an absent transcript is not evidence the user said nothing, so the orphan terminal recovery paths stage the path's policy keep as a prior verdict; dead_letter and BYOK abandonment keep their calendar-protected rule assessment of content-free audio - run-emulator-proofs: drop the daily-sweep entry (main retired that proof) - strict firestore fixture: model the canonical apply control read's retry kwarg, and default its per-attempt timeout to the modeled 3s bound - folded tests: match the folded terminal receipt (replay exhaustion) and keep the size-rollover fixtures stamp-agnostic
## What changed and why Harden the lifecycle guards so an inventory refresh cannot hide a new unstamped entry or an unmodeled state. Clearing a job and rebuilding it from an alias now invalidates old deadline evidence; mutated aliases and opaque patches cannot restore it. A separate census compares persisted entries with the declarations for every deadline-bearing machine. Positional setdefault values and literal aliases enter the state-vocabulary check. Valid stamped rebuilds, declared entries and debt-clearing exits remain accepted. The existing span-only patch has a checked four-field return contract with portable AST fingerprints; source changes, overlapping keys and shadowed names fail the proof. This remains bounded source analysis, not whole-program execution or runtime liveness acceptance. Preserve the existing changed-file test coverage and select scheduler regressions. Recognize actual PhaseMetrics instances using Gauge suffixes declared by the real factory. Use the fresh-cohort BYOK gauge queried by its page. The source audit at main563e6c240944 also removes the two stale record_pending metric/page xfails supplied by #24595; #24587's admission lease still leaves an overall pending-dwell deadline gap. The table has 54 rows and 66 remaining clause-specific gaps, plus 2 pure synthetic ordering counterexamples (68 strict xfails). Expected failures allow AssertionError only. The report tracks each remaining dependency; simulator-backed transition/shadow/property rows remain B2 after merged WP-A and rollout-owner go. ## Product invariants affected none ## How it was verified From the product checkout, use the durable file list in the workspace evidence record: ```bash unset GOOGLE_APPLICATION_CREDENTIALS CLOUDSDK_CONFIG CLOUDSDK_CORE_PROJECT CLOUDSDK_AUTH_ACCESS_TOKEN_FILE GOOGLE_CLOUD_PROJECT export BACKEND_PYTEST_WORKERS=1 BACKEND_UNIT_TEST_FILE_LIST="$TASK_WORKSPACE_ROOT/data/run-2026-11-04-lifecycle-invariants/evidence/backend-unit-files.txt" "$TASK_WORKSPACE_ROOT/bin/omi-heavy" run -- nice -n 19 bash backend/test.sh ``` `TASK_WORKSPACE_ROOT` is the verified omi-workspace checkout. Dated evidence: `data/run-2026-11-04-lifecycle-invariants/README.md`. The six-file gate was rerun after integrating main through `c8304ee6e8cd`; its two new finalization writers and bounded queued entry are registered. A later main integration adds #24544's reviewed Home status projection to the inventory. Before that one-value snapshot refresh, the local writer suite reproduced exactly one failure for `home_read.py`; afterward the unchanged six-file gate passes again. With five cloud credential/project variables unset and one worker, backend/test.sh passed 926 tests with 68 strict xfails across the two lifecycle files and four existing selector/ratchet controls. The 23 targeted regression/control cases passed. The unmasked invariant run produced exactly 68 AssertionErrors and 201 passes; the exact case set matches 66 KNOWN_GAPS + 2 ordering cases, with no unexpected or CPU guard failures. Timing and slot limits were unchanged. Before the fixes, 12 review reproductions failed (3 setdefault cases, clear+alias, 8 deadline-bearing states). An additional mutated source-alias case also failed. Canonical patch-proof fingerprints match under Python 3.11.15 and 3.14.6. These are source/unit checks without network or GCP. Exact-head fullCI and rollout-owner acceptance are required before merge. ## Tests Payload writer/value/key/alias/duplicate inventory; state vocabulary; all-class entry census; deadline mutation lifetime; verified patch boundary; positive entry/rebuild/exit controls; selector coverage preservation; source-defined metrics; clause-specific strict xfails; pure synthetic ordering controls. ## UI evidence UI-Evidence: none -- test infrastructure only ## Failure class (fixes) Failure-Class: none ## New guards Lifecycle source changes cannot silently add the covered payload forms, persisted entries or literal state values without revisiting the declared contract. Source-derived metrics stay tied to their committed alert expressions. ## Tracking Owner: lcinv. ANX card:lcinv-lifecycle-invariants under capture/transcription. No product/.github/firmware/account-data changes and no deploy needed.
… the age-gate survivor branch (#24602) * fix(memory): retry transient store faults on canonical apply control read A transient Firestore fault on the apply-control read was converted straight into CanonicalApplyStateUnavailable (memory_system.py:64), failing the whole apply gate for one blip. _read_snapshot now gives store faults classified transient by transient_store_error the same three-attempt backoff budget as the MCP OAuth refresh rotation before failing closed; permanent faults and exhausted retries keep the existing fail-closed behavior. Failure-Class: none * fix(memory): bound each retry attempt and recheck the deletion fence; add emulator proof Review feedback on the canonical apply-control transient retry: - Each attempt now disables the SDK's own (default 300s deadline) retry and passes an explicit per-attempt timeout (CANONICAL_APPLY_READ_TIMEOUT_SECONDS, default 5s), mirroring the MCP OAuth refresh-rotation boundary that owns its three-attempt budget. An exhausted SDK Retry policy would raise RetryError, which the transient classifier does not treat as retryable, so the typed error must surface at this boundary directly. - The deletion fence is re-read before the first-write provisioning path: a wipe that completes while the retry loop waits can no longer re-enroll a wiped account as a fresh generation-1 control document. - New Firestore-emulator proof (canonical_apply_control_retry_emulator_test.py) wired into run-emulator-proofs.sh: fault injection at the client API layer proves transient recovery, exhausted fail-closed (3 bounded attempts), the deletion race, and that every retried read passes retry=None plus a bounded timeout. Hermetic fakes updated to accept the new get() kwargs. * fix(tests): shared Firestore fakes accept the retry/timeout read kwargs The apply-control boundary now passes retry=None and a bounded timeout on every document read; the shared canonical_memory_fakes._DocRef and the WS-B _Document fake rejected those kwargs, and the resulting TypeError was swallowed by the production except-Exception fail-closed path, failing 34 tests across five unit shards. Mirror the real SDK get() signature. * fix(tests): remaining per-file Firestore fakes accept retry/timeout read kwargs Same fix as the shared fakes for the two per-file fakes CI rounds reach: canonical_consolidation_apply._FakeDocumentRef and the ws_j_delete_privacy _DocRef. The apply-control read boundary passes retry=None plus a bounded timeout on every document read; rejecting those kwargs fails closed through the swallowed TypeError path. * fix(memory): recheck fence before existing-state return; bound fence reads; one budget per control read Review round 2 on the apply-control retry boundary: - The post-retry deletion-fence recheck now also guards the existing-state branch (it previously ran only on the first-write path), so a deletion that starts during transient backoff cannot admit work or touch the maintenance registry under a running/completed wipe. - The fence helper threads through optional retry/timeout read kwargs via an UNSET sentinel (other callers keep the SDK-default read), and the apply-control boundary passes its bounded per-attempt policy to every fence read, so the added safety check cannot pin a worker for the default 300 s. - The exists-branch validates the recovered snapshot directly instead of re-reading the control document with a second fresh three-attempt budget; the create-race path likewise reads once and validates from that snapshot. - Emulator proof: module-scope import per the backend import rule; fence stub accepts the new read kwargs. * fix(memory): give fence reads the same transient budget; module-scope test imports Review round 3: - With the SDK retry disabled for the bounded fence read, a single transient blip on account_deletions/{uid} would fail the whole apply gate — the very failure mode this PR fixes. Both fence reads now run through the same three-attempt transient budget as the control read (one shared helper). - Hoist the three retry tests' imports to module scope per the backend import rule. * fix(backend): fail keyword privacy cleanup open when Typesense is unconfigured delete_atom_keyword_doc returned False whenever the shared Typesense env was absent or empty (lazy client construction raises, the generic except swallows it), so _run_immediate_privacy_cleanup raised 'canonical keyword privacy cleanup unavailable' and every explicit memory delete failed closed on deployments that never write the keyword projection — the keyword recurrence of FC-privacy-delete-fails-on-unprovisioned-derived-store (#15097 classified the vector-store sibling but not this one). Classify the unconfigured state as the trivially-confirmed desired absence before any client I/O; a configured client that raises still fails closed, and empty uid/memory_id still returns False. Failure-Class: FC-privacy-delete-fails-on-unprovisioned-derived-store * fix(backend): scope keyword privacy fail-open to fully-unconfigured Typesense Review repair for #23063: delete_atom_keyword_doc confirmed absence whenever typesense_configured() was False, i.e. also when exactly one of TYPESENSE_HOST/TYPESENSE_API_KEY was bound. A partial binding does not prove the projection absent — backend-listen binds only TYPESENSE_HOST while backend-sync and memory-maintenance-job hold both against the same cluster — so a rollout losing one variable would acknowledge the privacy deletion with plaintext keyword documents still stored. Confirm absence only when neither binding is present (Cloud Run backend, desktop), let partial bindings fail closed through the client call, and instrument the fail-open with record_fallback(reason=unconfigured, outcome=recovered) per the fallback telemetry contract. * feat(memory): stale-planner archive restore operator tool (2026-10-22) Dry-run-first operator tool re-applying incident-archived memory_items as short_term-visible decisions through the canonical apply ledger (apply_long_term_patch_firestore) with the remediation=stale-planner-2026-10-22 audit marker, reversible via --revert. Per-user COLLECTION-scope scan with read budget, keyset cursor, legal-hold/deletion-gate/deleted-user exclusions, and payload-free count-only output. Registers the two memory_items query drivers and regenerates the composite-index manifest. Prod writes remain gated on the plan's explicit GO. Co-Authored-By: GLM-5.3 <[email protected]> * fix(conversations): require relevance decisions on terminal rows Close decision gaps in dead-letter, orphan, BYOK, imports, external text, sync promotion, merge rollback, and legacy restore paths. Preserve calendar, photo, wake-word, rule-keep, and tombstone protections; keep mandatory decisions through terminal size guards. Failure-Class: FC-contentless-recovery-surfaced-visible * refactor(conversations): extract terminal storage and relevance labels Keep the large conversation modules below their existing line budgets by moving snapshot status storage, deferred retry storage, pure terminal payload serialization, and bounded metric vocabulary to their owning modules. Migrate callers and behavioral/static coverage together. Failure-Class: FC-contentless-recovery-surfaced-visible * fix(conversations): stamp local fixture capture decisions Cover the direct batch fixture writer with an explicit fixture-seed policy and bounded telemetry vocabulary. Preserve the local/offline account fence and extract the payload builder to keep its owner below the existing line budget. Failure-Class: FC-contentless-recovery-surfaced-visible * fix(conversations): refresh terminal visibility after commit Invalidate people-stats and refresh search after terminal discards or document-ceiling failures commit. Isolate observer failures and publish no effects on aborted transactions. Document terminal relevance and size behavior in the lifecycle owner guide. Failure-Class: FC-contentless-recovery-surfaced-visible * fix(conversations): preserve positive evidence during terminal repair * fix(conversations): retain recovery provenance when repairing keeps * fix(conversations): preserve terminal verdicts and bound calendar probes * fix(conversations): satisfy type checker on terminal decision sites Narrow prior decision before subscripting, return str-keyed entries from the preserve path, and expose a public accessor for the post-write search index convergence instead of touching the private name. * test: allowlist structural first-test CPU in terminal-decision suites * test: allowlist the 70-minute narration fixture's first-test CPU * fix(conversations): compose terminal decisions with wave-2 lifecycle * style: pin the pinned formatter on test_recovery_rule_skip * test(sync): align frozen parity with mandatory intake decisions * fix(memory): invalidate projections on every committed retry * Reconcile fold interactions with current main contracts - finalization jobs: thread calendar_probe through the shared dead-letter helper - sync intake: stamp explicit keep provenance only on newly created rows; replays retain their assessed verdict and promotions keep clearing the receipt (main's replay/promotion contracts) - decision triggers: accept main's capture_group trigger - parity fixture: re-pin frozen sources to the merged live files with a documented expectation update - folded PR tests: point at the recovery module that now owns orphan completion, match current helper arities, RULES_VERSION, and the real-clock fence liveness window * Restore origin/main's enrichment recovery emulator script The refresh merge kept the survivor lineage's real-monotonic clock lines without the import time that went with them, so the proof died on NameError: time at line 111. The fold stack does not intentionally change this script; take origin/main's blob wholesale. No retry or lease behavior changes. * Fix CI-red fold interactions against current main contracts - lifecycle state table: the blocked_byok stock dwell alert is agent tier (omi-finalization-byok-dwell-info) since #24595 moved the page to fresh cohort dwell; re-point the inventory row and declare the folded writer moves (recover_deferred_processing_failure_txn and the dead-letter title helpers now live in conversation_terminal_title) - crash-window orphans: an absent transcript is not evidence the user said nothing, so the orphan terminal recovery paths stage the path's policy keep as a prior verdict; dead_letter and BYOK abandonment keep their calendar-protected rule assessment of content-free audio - run-emulator-proofs: drop the daily-sweep entry (main retired that proof) - strict firestore fixture: model the canonical apply control read's retry kwarg, and default its per-attempt timeout to the modeled 3s bound - folded tests: match the folded terminal receipt (replay exhaustion) and keep the size-rollover fixtures stamp-agnostic * Classify the crash-window keep flag in the firestore query driver * chore: retrigger PR workflows after a missed synchronize event * Match the folded dead-letter keep receipt in the exhausted-requeue test * Keep transcription-failed episode members in the home member projection The size-ceiling terminal's failed-status visibility exclusion is a conversation-list contract; the episode member surface renders a failed member with its 'Couldn't transcribe' wire status so the user keeps the bounded recovery exit. Exempt that surface from the exclusion instead of weakening the shared predicate. * Declare the diarization eval lifecycle writers in the site inventory #24583 landed utils/stt/diarization_eval.py with seven lifecycle write sites but no inventory entry; declare the reviewed sites so the writer guard matches the real payload writes. --------- Co-authored-by: David Zheng <[email protected]> Co-authored-by: GLM-5.3 <[email protected]>
#24609) WP-C alarms 3+4, following #24595 and built on the exact test-only correction in #24605. The finalization observer rotates through three indexed domains: active jobs, queued mirrors and processing conversations. Each domain retains its own last bounded page and observation clock. A full jobs page cannot starve the mirror domains, and another domain's zero cannot reset an ongoing mismatch. Page, stock and blind queries select the newest successful observer for each domain before aggregating values, so a later clear supersedes an older replica's bad snapshot even when leadership changes between services. Page only when a retained page has more than 25 recent-job mismatches for 30 minutes. The job creation timestamp must be within 24 hours and at or after 2026-11-04 09:27Z. Historical mismatch stock remains agent tier. A 35-minute freshness budget covers the nominal 15-minute rotation and the existing bridge delay. Stale checks the freshest observer of every domain; stale/blind companions and all new UIDs are in the existing import gate. Rules use the already-triggered resilience JSON; no workflow edit is needed. The second alarm reports agent-tier active summary_repair=true stock, using COUNT capped at 101 to prove stock above 100. It does not claim to measure retry attempts or cap hits: no numeric retry cap exists in the source. This is the approved substitute in ruling4256d5. Read budget and coverage: - One leader-leased private coordination record; at least 300 seconds between admitted passes, a 120-second owner lease and one transaction attempt. Recheck ownership before publishing the cursor or metrics. - At most 200 source documents, 200 distinct counterparts and two lease/cursor reads: 402 documents per admitted pass. Three bounded cursors rotate after every page, including full pages. - At most 288 admitted passes per day gives a ceiling of 115,776 document reads and 576 state writes, plus up to 288 denied lease reads per calling observer. These are bounds, not measured spend. - Only current users/{uid}/conversations/{cid} mirrors count. Exclude deleted, discarded, merged, deferred and superseded mirrors; skip nested archives while advancing their cursor. No identifiers enter logs or metric labels. - Counts describe a bounded page, not fleet totals. Full pages and unknown clocks mark incomplete coverage. Missing-job cases cannot prove fresh entry and stay stock-only. Settled terminal history and processing rows without job links are outside coverage; sparse drift across pages can stay below threshold. Missing clocks, sparse coverage and the actual retry-cap policy remain owner uicleanup under card:lcalarm-lifecycle-alarms, next 2026-11-04 18:00Z. The observer performs no repair, notification, deletion or admission/retry leak fix. No live.py or serving.py changes. Validation: canonical backend/test.sh with the explicit 32-file integration list passed 1,443 tests with 79 inherited strict expected failures and three existing monitoring skips at c65d7c1 (source-identical to first published head e34b389). That head's guarded push passed full preflight, 829 Firestore guards, type checking and 330 selected backend tests. Luna R1 then identified the stale-replica false page. The real Prometheus engine regression fails against those old expressions and passes after correction c3f972d, including a newer clear, continuing drift, independent legs, stale data and absent observers. The focused 23-file monitoring/semantic shard passes 579 tests with three existing skips. The optional engine test takes PROMTOOL_BIN and performs no download/network/server startup; CI explicitly skips that engine check if the binary is absent, while always-on contracts pin the reviewed query. Local correction validation and its guarded push provide the real engine proof. CI state remains authoritative in the PR checks; the final independent review is delta-only under the two-round limit. Every local check/push uses default omi-heavy run -- nice -n 19 and scrubs the five GCP credential/project variables. No GCP calls or live validation. Deploy needed: reconcile the added repair composite and conversation-group field index; backend/listen and sync emitter train including the revision-local GMP profile; then existing metrics-egress/Grafana import. Lead owns every merge and deployment. Current-head CI must supply stack proof under ruling39e8fe's local teardown limitation. Initiative: capture/transcription/speakers Failure-Class: none Line-Count-Exception: backend/database/firestore_index_registry.py | 2284 -> 2285 | Register the conversation group field index for the bounded pair census beside its existing owner.
What changes
WP-C PR 1 (alarms 1+2): add bounded recent-cohort dwell metrics for record_pending (24h cohort, 2h budget), enrichment fresh obligations (24h cohort, 1h budget), and blocked_byok (7d cohort, 3d budget). BYOK entries stamp blocked_byok_at on creation/reclaim. Historical stock stays agent tier. No-job discovery is an explicitly incomplete 128-row stock sample with an agent blind companion, per thread-owner ruling 135c64; it does not claim a seal dwell clock.
Record_pending/enrichment entries must also be at/after the fixed 2026-11-04T09:27Z brief cutoff. A rolling24h window alone would include tonight's known 8-24h backlog and page on import. All-age stock remains visible at agent tier.
All 13 new/replaced rules, their stale/blind companions, and the existing dead-letter stock rule use the gate-based import. They live in resilience.json, which is already in the egress workflow trigger list. The combined export mirrors them. The four metric families are retained by the sync GMP sidecar and both dev/prod bridge allowlists. No .github/ edits, no live.py or serving.py edits.
Bounds and rollout
Samples run at most every five minutes per observer, with ten-second RPC deadlines. Record_pending reads at most 1000 recent rows and uses a stock COUNT capped at 5001. Enrichment reads at most 1000 recent rows and a backfill COUNT capped at 20001. No-job reads at most 128 conversations plus 128 job existence results. BYOK reads at most 1000 new-state entries. Counts are lower bounds at caps; saturation and stale/absent observation have separate agent rules. Runtime rates depend on observer replicas; there is no unbounded client-side scan.
Cloud Run's existing bridge collects every 10m with a 1m offset. Enrichment/BYOK allow 20m sample freshness (5m producer cadence + bridge latency); direct batch keeps 15m. Threshold evidence and intended final thresholds are annotated 2026-11-04. Existing unstamped BYOK rows are excluded from the new page cohort, with no data backfill.
Deploy needed: reconcile the three new composites; backend/listen/sync emitter train carrying the serving QueueMetrics and sync revision-local GMP profile; then metrics-egress/Grafana import. This lane does not merge or deploy. Live alert delivery is unverified.
Validation
At head 937bccf, the guarded push passed full preflight, all 825 Firestore guard tests (including the digest sentinel), type checking and 276 selected backend tests. These are local source/index/type/unit checks.
The complete selector-owned monitoring group passed: 536 tests across 21 files, with three existing skips. Notification timing, byte-identical split/combined objects and the offline GMP inventory satisfy their contracts. All 94 workflow-contract tests passed with the new pure index module included in the hermetic control tree. The 118-test enrichment integration shard passed after merging main #24580. At 937bccf, all 70 CI checks are terminal with no failures or pending checks; the PR is CLEAN. Luna round one returned SHIP on e6e7237, and round two returned SHIP on 937bccf.
The current-head CI Listen Pusher Stack Gauntlet passed. Local stack verification was limited by lane-sandbox teardown EPERM; ruling 39e8fe assigns stack proof to CI. No live/GCP validation is claimed.
Initiative: capture/transcription/speakers
Failure-Class: none
Line-Count-Exception: backend/database/conversation_finalization_jobs.py | 3167 -> 3169 | Add lifecycle entry metadata and registered bounded observer indexes beside their existing owners.
Line-Count-Exception: backend/database/firestore_index_registry.py | 2282 -> 2284 | Add lifecycle entry metadata and registered bounded observer indexes beside their existing owners.