Repository navigation
feat(backend): self-heal for capture wedges and processing jams — sweeper, telemetry, Core dashboard spec - #18855
Merged
Git-on-my-level merged 8 commits intoSep 25, 2026
Conversation
Failure-Class: none Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Failure-Class: none Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Failure-Class: none Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Failure-Class: none Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Failure-Class: none Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- test_conversation_relevance: SERVER_RECOVERY joins the KEEP set; the repair trigger must never let relevance discard the recovered copy, so the user-action-only invariant gains one documented server path. - test_sync_silent_failure: stub database.sync_dead_letters in the hermetic process_segment harness; sync_jobs now imports it at module scope and the real module needs get_firestore_client.
Git-on-my-level
force-pushed
the
sca-556-selfheal
branch
from
September 25, 2026 09:40
b7b7ad8 to
0812b03
Compare
Member
Author
|
Monitor run — CI repair + rebase onto current main (head
Backend unit shards 1/4, 3/4 and the suite are green on the new head; no other failures. |
Git-on-my-level
added a commit
that referenced
this pull request
Sep 25, 2026
## Summary - Restore the release-eligibility `feature-flag-registry` gate: [main push run](https://github.com/BasedHardware/omi/actions/runs/36130925731) reports `backend/services/conversation_selfheal.py:75: unregistered feature flag: SELFHEAL_MODE`. - Root cause: merged #18855 introduced a `SELFHEAL_MODE` read after the registry gate was tightened on 2026-09-24, without registering the flag. - Register it as a backend environment-owned, fail-closed rollout (`off|detect|nudge|heal`; default `off`) and regenerate the registry. The Cloud Run Job is operator-provisioned, not part of `runtime_env`; no deployment manifest, overlay, behavior, or flag value changes. The job remains dormant pending a separate operator decision. ## Verification - `python3 scripts/check_feature_flag_registry.py` — passed. - `python3 scripts/test_check_feature_flag_registry.py` — 13 tests passed. - `python3 scripts/test_posthog_flag_sync.py` — 11 tests passed. - `make preflight` — 17 manifest checks passed. - No backend behavior changed; no live job was run. Failure-Class: none Generated with [Devin](https://devin.ai) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/18900?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="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
Git-on-my-level
added a commit
that referenced
this pull request
Sep 25, 2026
…obs (#18954) Backfill jobs that reached failed/partial_failure before the dead-letter ledger shipped (#18855) have no sync_dead_letters doc and no publisher left to write one, so GET /v2/sync-local-files/<job_id> returned 503 forever. Record the missing doc as pending on read (no confirmed-cohort event, no replay consumer), then release the backfill slot and serve the terminal status. 503 remains only for a failed ledger read/write or an identity mismatch. Failure-Class: FC-schema-adopted-only-at-resource-creation Co-authored-by: Claude Opus 5.5 <[email protected]>
Git-on-my-level
added a commit
that referenced
this pull request
Nov 9, 2026
…bt, ops_kill defaults on (#24954) <!-- claude-projects-attribution: {"github_login":"Git-on-my-level"} --> _Requested by **David**_ David approved 2026-11-08 17:09Z: enforce review_by and done_by in CI, sweep the registry metadata, and make ops_kill mean default on. This applies those rules and the lead's subsequent sweep rulings. The pre-sweep registry had 82 rollout/experiment rows whose review dates would fail the old seven-day-grace checker on 2026-11-12, turning every PR red without a sweep (measured against the saved pre-sweep registry on 2026-11-08 19:24Z). - Use UTC for the default check date so UTC+7 pre-push hooks agree with CI. - Enforce review dates and pending rollout ramp completion dates with the same seven-day grace. A row's single extension affects both deadlines. Decided flags still read by code must retire their code paths. - Validate a single self-service extension of at most 14 days, with a meaningful reason, lane, and grant date that has already occurred. Compare against the merge-base to refuse second extensions and later original deadlines, for pending and already-decided rows. Existing ramp plans cannot lose their deadline while ramp enforcement still applies. Missing merge-base data explicitly warns and skips diff rules. - Count only pending rollout debt without a live dated ramp toward the owner cap of five, including all new debt added in the same PR. Reject any account token on new rows (existing rows are grandfathered), split shared owners on /, comma, &, +, | and whitespace-delimited "and", and count each debt row once per distinct normalized lane token. Remove the dazheng backlog exception. - Reject default-off ops_kill rows except the 18 remaining migration exceptions, which expire 2026-11-29. Retain stale-entry and expiry enforcement. Warn about rollout rows decided keep/with_legacy. - Emit FLAG_DUE_SOON, FLAG_OVERDUE_COUNT, FLAG_DARK_OVER_14D and the revised FLAG_OWNER_BACKLOG counts; regenerate the registry documentation with its existing 2026-11-05 header. The CSV contains 307 rows: 304 active rows were applied; SYNC_BACKFILL_INFLIGHT_LIMIT was already retired in #19352, and two DREAM_NO_PROGRESS_STOP_MODE rows retired in #24955 were preserved when merging current main. None was recreated. All other 286 rows still owned by dazheng were reassigned. Owner assignments to omi-pipeline now require an existing origin/main assignment or PROJECTION_DRAIN_LIVE_TARGET_BACKOFF. Assignments to backlog-refactor require an existing origin/main assignment or the accepted BATCH_/SYNC_ scope; other previously inferred assignments go to auditfix pending retirement or an explicit owner claim. No account owner token remains in flags, ignored entries, or retired entries (verified with the same tokenizer used by the checker). The ignored entries localEmbeddingsEnabled and meeting_note_screenshots_enabled also move from dazheng to auditfix; active flag owner counts below are unchanged. All 97 exceptions introduced by #24950 are now extended rows, permanent lifecycles, or retired upstream; REVIEW_OVERDUE and _AD1268_SWEEP are removed. | CSV action | Rows | Applied treatment | | --- | ---: | --- | | A | 15 | Extension through Nov22; two subsequently retired in #24955 | | B | 65 | Extension through Nov22, preserving client-surface reason | | C | 12 | Extension through Nov22 | | D | 88 | Extension through Nov22 | | E | 15 | Extension through Nov22 | | E-MISMATCH | 40 | Extension through Nov22 | | F → config_switch | 32 | Relabel permanent opt-in controls | | F → rollout | 17 | Relabel and add missing review_by Nov22 only | | G → config_switch | 15 | Relabel 14 active rows; one already retired | | G → ops_kill | 8 | Per lead ruling, use config_switch because all eight default off | There are 234 bounded extensions, all granted Nov8 by auditfix and ending Nov22. One additional extension covers AUDIO_ARCHIVE_STOP_PCM_PERCENT, outside the CSV, whose unchanged Nov14 ramp deadline would otherwise fail Nov23. Permanent G relabels drop inapplicable review/ramp metadata and preserve the old review date in notes. No decision, terminal, parser fail/default, runtime value, or production value changed. Existing dates were not postponed: the only original review/ramp metadata changes are the explicitly approved G removals; 17 missing F review dates were added. The checker change also aligns the policy validation script (`backend/config/policy/guard.py`): default-on live controls must remain ops_kill; opt-in live controls may be config_switch or rollout. Hermetic fixtures cover both accepted and rejected lifecycles. The backend flag-budget fixture also follows the approved rollout labels and lane ownership, rather than freezing the former account owner. No workflow or runtime application code changed. No production access was used. CSV proposed-owner counts (unowned mapped to auditfix): omi-pipeline 122; auditfix 82; backlog-refactor 78; uicleanup 19; firestore-lead 2; cl2-coordkit 2; pgfoundation 1; cl2-deploy 1. The already-retired limit row is included in the backlog-refactor source count; the two subsequently retired Dream rows are included in the auditfix source count. Registry-wide owner counts after reassignment (712 rows). The ownership correction moves 179 rows from omi-pipeline and 62 from backlog-refactor to auditfix. The ownership correction changes no decision, deadline, lifecycle, extension, fail/default, or runtime value. Shared-owner validation now refuses account tokens on added rows and applies the cap separately to each named lane, with duplicate lane tokens counted once; existing rows remain exempt from the new-row account rule. Regression fixtures cover every separator, lane-only acceptance, legacy rows, shared existing debt and batched additions. | Owner | Before correction | After correction | | --- | ---: | ---: | | auditfix | 190 | 431 | | backlog-refactor | 181 | 119 | | unowned | 40 | 40 | | two-lane lead | 27 | 27 | | uicleanup | 23 | 23 | | backend | 14 | 14 | | planscost | 8 | 8 | | merge-desk | 6 | 6 | | omi-pipeline | 184 | 5 | | firestore-lead | 4 | 4 | | home-overlap | 4 | 4 | | review-desk | 4 | 4 | | lead2 | 3 | 3 | | two-lane rollout lead | 3 | 3 | | cl2-coordkit | 2 | 2 | | cl2-deploy | 2 | 2 | | pgfoundation | 2 | 2 | | speaker rollout lead | 2 | 2 | | vroute-c / batch rollout lead | 2 | 2 | | backend listen | 1 | 1 | | backend runtime_env (PR #18855) | 1 | 1 | | cl2-cost / lead2 | 1 | 1 | | flightcut / batch rollout lead | 1 | 1 | | fswrites | 1 | 1 | | nik | 1 | 1 | | omi-lifecycle | 1 | 1 | | rollout-meetings | 1 | 1 | | speakerrename | 1 | 1 | | uicleanup (omi-lifecycle) | 1 | 1 | | uicleanup / omi-lifecycle | 1 | 1 | Validation (measured locally; CI is separate). The owner correction reruns the fixtures, six as-of CLI checks, and unchanged normal push hooks; historical broader audit results below are identified by scope. No owner backlog exception has been added. - `nice -n 15 timeout 1500 backend/.venv/bin/python -m unittest discover -s scripts -p 'test_*flag*.py'`: **102 passed**, 146.373 seconds (91 checker fixtures and 11 PostHog fixtures). The focused owner subset passed **14 tests**, including all requested spellings and shared-lane cap cases. - `nice -n 15 timeout 1500 backend/.venv/bin/python -m pytest -q backend/tests/unit/test_flag_budget.py`: **24 passed** in the normal push hook. - Earlier registry-coupled backend audit using canonical `backend/test.sh`, an explicit nine-file list and two isolated workers: **430 tests passed across all 9 files** (includes the 24 budget tests above). Default/off runtime assertions remain intact. - Full local manifest preflight and supplied PR-body validation, through the unchanged normal pre-push hook (same manifest as `make preflight`): **40 checks passed**, 285 seconds. No skip flags. The remaining normal pre-push gates also passed, and the branch was pushed successfully. - Full checker CLI `scripts/check_feature_flag_registry.py --as-of DATE` on head `99c25a16e58695b1e49729ea88070cb882e32c12`: | As of | Errors | Result | | --- | ---: | --- | | 2026-11-08 | 0 | Pass | | 2026-11-12 | 0 | Pass | | 2026-11-16 | 0 | Pass | | 2026-11-19 | 0 | Pass | | 2026-11-23 | 28 | Only pre-existing duplicate-declaration exceptions expired Nov20 (workstream B) | | 2026-11-30 | 18 | Expected default-off ops_kill migration exceptions expired Nov29 | All twelve daily schema/deadline boundary checks for Nov8 through Nov19 also pass. Nov30 returns at schema validation on the 18 migration expiries, so that output does not enumerate the subsequent row-deadline failures. Raw outputs and UTC measurement receipts are saved in the owning run directory as `out-checker-asof-<date>.txt` and `checker-asof-receipt.json`. Product invariants affected: none (`scripts/pr-preflight --suggest`). Failure-Class: none This hardens repository registry governance; no existing semantic runtime failure class matches these validation bypasses. Reusable guards and regression fixtures live in `scripts/check_feature_flag_registry.py`, `scripts/feature_flag_registry.py` and `scripts/test_check_feature_flag_registry.py`. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/24954?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/24954?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F24954&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. --> 🤖 Generated with [Claude Code](https://claude.com/claude-code).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
backend/docs/omi-core-selfheal-dashboard.md. No production job, scheduler, alert, or log metric was provisioned.Design deviations and rationale
source=omirows with no existing title, overview, user title, or derived structured data; richer rows are not rewritten.SYNC_BACKFILL_ADMISSION_LIMITS=falseand the app's existingfailed/partial_failureretry semantics; a separate pending→dead_letter Firestore ledger holds diagnosis. Failed backfill tasks do not actively delete staged blobs, but existing storage lifecycle still expires them; the client WAL remains the retry source.Verification
backend/test.shselected changed backend tests: passed (10 changed test files).black --line-length 120 --skip-string-normalizationon touched Python: clean.make preflight: 35/35 checks passed.git diff --check: passed.Product invariants affected
Line-Count-Exception: backend/database/conversation_finalization_jobs.py | 2222 -> 2462 | The existing atomic outbox transaction must carry the recovery admission fence and the neighboring rotated cursor; moving the write would split lifecycle ownership.
Line-Count-Exception: backend/database/conversations.py | 3064 -> 3082 | The raw verification read belongs next to the decoded conversation reader so the persisted transcript fingerprint is compared without decoding.
Line-Count-Exception: backend/routers/sync.py | 2128 -> 2167 | Backfill pacing and terminal client-poll compatibility are checks at the existing v2 admission and worker response boundaries.
Line-Count-Exception: backend/utils/conversations/process_conversation.py | 3352 -> 3371 | The recovery-only empty-structure guard must run directly before completion persistence and derived fan-out.
Failure-Class: none
Generated with Devin