Skip to content

monitoring(SCA-2116): retire the five paused page-alarm holds with owned dispositions - #25284

Open
Git-on-my-level wants to merge 12 commits into
mainfrom
agent/omi-control-opencode-deepseek/080955598b86
Open

Git-on-my-level wants to merge 12 commits into
mainfrom
agent/omi-control-opencode-deepseek/080955598b86

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Failure-Class: none

The five backlog page alarms have been paused since the 2026-11-08 import. This change activates them in source, records an owner, written disposition and 2026-11-21 review date, and caps repeats at 24h. Thresholds, pending windows, datasources, freshness gates, tier/audience labels, receivers and mute windows retain their existing values.

The affected UIDs are omi-batch-unit-unpublished-2h, omi-record-pending-dwell, omi-enrichment-fresh-dwell, omi-pipeline-projection-drain-stall and omi-pipeline-held-row-age. Split definitions match the combined export. Responder annotations reference page_review_by; the two drain rules' required legacy review_by dates agree with it.

Existing monitoring, lifecycle and route contracts now expect those five source rules to be active. The no-paused-page assertion covers these five UIDs, per the SCA-2116 source-only integration ruling. The unrelated paused omi-app-review-config-sweep-silent rule retains main's definition byte for byte and remains its owner's separate disposition.

Refreshed against main 953f27b0432edf1a0a8b9da5c35d400342578cab with a merge commit. The five target rules are identical to the previous PR head dd1421b5c7cb43b438370f6e4cabaeb8eef3229b; all 269 non-target rules match main. Main already has the account-deletion test fix from #25473 and its failure-class definition. The remaining PR diff is scoped to the five alarm dispositions and their contracts.

Historical validation on b6c24802964f5c8b80ce0f509a90a7030c750628: offline provisioner lint passes for 269 combined/split definitions. Normal bounded pre-push through M1's omi-heavy passes 39 preflight checks, backend typecheck (zero errors), pinned formatting and 33 selected backend files (2,898 passed, 75 expected failures, 4 skipped). Exact-head CI and the independent review of record remain release prerequisites. Unit tests and source lint establish source behavior only.

Release remains held under SCA-2116; SCA-2209 is cancelled and folded into it. Merge and production apply must be one release-owner sequence after exact-head SHIP, green CI and authorization for a reviewed scoped operator path. Preserve a live backup first, change only the five UIDs, and post the required READBACK with zero non-target changes. No full-export apply is authorized. Scoped rollback restores only those five targets from that live backup through the same approved path.

This PR does not wire the Bark phone path or establish delivery. Phone delivery/drill and a fresh authenticated live Grafana baseline remain separate acceptance gates. Historical aggregate readings from 2026-11-14 informed the daily repeat cap; they are not current live evidence. No production changes are made by this source integration.

The account-deletion CPU-guard repair carries the existing #25473 correction onto this older source branch in dd1421b5c7cb43b438370f6e4cabaeb8eef3229b. A module fixture loads the real Stripe implementation during setup; every cancellation parameter and assertion is retained, with no production or guard change. On M1, the original resource_missing case spent 0.691589s CPU on the cold real import and 0.001886s on the remaining cancellation case. After correction the import took 0.402314s in setup and that call took 0.002074s. Both instrumented files passed 103 tests with the normal 1.00s guard; a separate uninstrumented corrected run passed 103 tests in 1.42s, exit 0. All runs used bin/omi-heavy, timeout 600, BACKEND_UNIT_TEST_FILE_LIST selecting only the account-deletion file, and backend/test.sh. These local receipts do not establish exact-head green CI or qualify any downstream release.

The recorded 2026-11-21 review date has passed. The fresh live baseline is still outstanding.

…ned dispositions

The 2026-11-08 import ruling paused five page-tier backlog alarms and left
unpause to a drain owner with no owner or deadline recorded. The blind-spot
audit named that as the hole that hid the Japanese provider-STT failure.

Live reads of the production signals at 2026-11-14T10:30Z (GMP, ro-prod,
counts and metadata only) show all five red at week scale: new-cohort
unpublished 10.9-12.2 d, all-epoch compute proxy 25.5 d, record_pending 24 h
(cohort cap) against 2 h, fresh enrichment 24 h against 1 h, projection debt
27 d and held legs 15.7-27.1 d. At the former 4 h repeat the critical rules
would page about six times a day, so each is unpaused with its repeat capped
at 24 h (at most one page a day) and its threshold unchanged. Each carries a
written page_disposition naming the owner, the live reading and a
2026-11-21 review date.

Adds the S5.2 contract: no page-tier rule may land paused, in either the
split sources or the combined export. The two remaining paused rules are
agent tier (2026-10-13 admission holds) and are unaffected.

Tests and runbooks follow the new disposition. The page path itself (a Grafana
contact point that reaches Bark) is not in this change; it needs the pager
credential and is requested from the release owner separately.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 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-15T02:48:20.674219Z 7aa4e5e 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.

Git-on-my-level added a commit that referenced this pull request Nov 15, 2026
…nd a tunable notes hold (#25304)

# Capture lifecycle spine: ledger writers for every summary outcome, and
a tunable notes hold

Supersedes #25125 and #25129 (both folded in by merge, history kept).
Tracking: SCA-1760, SCA-1762,
SCA-1766. Design note: the `DESIGN:` comment on SCA-1760.

The in-flight ledger (`users/{uid}/pipeline_ledger/{capture_id}`) had
two production writers on `main`
(`capturing`, `transcribed`), so no capture ever reached a terminal and
the end-to-Home gate had nothing to
read. This gives every normal outcome a writer, and makes the 600 s
notes hold tunable without a release.

Line-Count-Exception: backend/database/conversations.py | 4971 -> 5020 |
thread the ledger's summary-outcome hook through the two existing
lifecycle writers and delete the sibling ledger row with its
conversation; splitting this oversized file is separate debt

Failure-Class: FC-dashboard-reads-key-no-writer-maintains

Why this class: the census reads a collection no writer maintained past
`transcribed`, and returned a
well-formed empty aggregate instead of an error. The defect is the
missing writers.

## What changed

From #25125, unchanged in behaviour:

- **Seal** (`database/record_audio.py`): `capturing -> sealed` on the
seal that closes the recording;
  admission counted once per capture.
- **`failed:upload_failed` terminal**, with `end_type=unknown` and
`end_at` the observed failure time.
- **Deletion fence** in `pipeline_ledger.advance()`: the ledger
transaction reads the source conversation
and the account-deletion marker (`account_deletions/{uid}`) and writes
nothing for a deleted source or an
account being wiped. The marker, not the user document, is the
authority: the user document outlives its
subcollections during a wipe (review finding 1). Every writer here
passes both references, the operator
  closes included (finding 2).
- **Conversation deletion removes the sibling ledger row and fails if
that delete fails** (finding 3); the
  delete is idempotent, so the caller's retry completes it.
- **Retention, deletion and erasure inventory** for the now-live
collection. The ledger is not added to the
portability export (removed under the goal owner's ruling of 23:37Z: the
only approved readers are the
  census routes).

New in this PR:

- **`noted` and `done` in one ledger transaction**
(`pipeline_ledger.advance(..., then=(DONE,))`). #25125
used two transactions at every summary commit; this is one read set and
one write.
- **`noise` terminal for a receipted relevance discard.** Before, a
discarded capture sat at `transcribed`
until its 30-minute deadline and counted as stuck. A later real summary
re-opens it with a higher revision.
- **`no_speech` and `noise` terminals on the two operator closes**
(`utils/conversations/lifecycle.py`),
written after the real close commits. A restore needs no ledger undo:
the restored capture's next real
  transition re-opens the row.
- **`SYNC_PROCESSING_QUIET_SECONDS`** (`utils/sync/processing_hold.py`):
the arrival-quiet window before
full notes processing is read per call. Default 600, clamped to
120..600, malformed keeps the default. The
outbox due time and the budget-denial reschedule follow the same value.
**No behaviour change at the
  default.**

- **`omi_sync_content_arrival_gap_seconds`** histogram: seconds between
content arrivals on one held
conversation. The share above a candidate quiet window is the late
re-run rate that window would buy.
- **Ledger metrics kept in the sync scrape**
(`deploy/cloud_run_gmp_sync.yaml`): the keep rule dropped every
`omi_pipeline_ledger_*` family on the services where seal and summary
ledger writes run.

Not carried over from #25125: its downgrade of the ledger stuck alert.
That rule set is owned by #25284 and
the downgrade no longer met the alert tier contract on `main`.

## Reads and writes

Each fenced ledger write is one transaction: three document reads
(account-deletion marker, source, ledger
row) and at most one write. A normal capture costs about 12 reads and 4
writes across its life (seal, summary, and the two
existing writers), against 15 reads and 5 writes if #25125 had merged as
it was. No query, scan, per-frame or per-request
read. Rows carry an expiry time; the TTL policy that acts on it is not
enabled by this PR.

## What this does not do yet, and how to read it

- Every terminal row still has `end_type=unknown` and no `end_at`: the
end writers are the next PR, stacked on
this one. Until that serves,
`omi_pipeline_ledger_unknown_end_type_total` is not a health signal.
- Done check, after serving: of captures **admitted after the serving
timestamp**, the share reaching `done`,
with `noise`, `no_speech` and `failed:*` reported beside it, and no row
past its stage deadline. "Any
terminal" is not the pass. Rows already at `transcribed` before serving
get no writer, expire on the 7-day
  nonterminal lifetime, and are excluded and named as excluded.
- The hold's 120 s floor is a safety bound (the recorded-time gap at
which a conversation splits), not a
proposed value. The first candidate value is 300, chosen from the
arrival-gap histogram.

## Kill switches and rollback

- `PIPELINE_LEDGER=off` (existing, default on) stops every ledger write.
Nothing reads the ledger on a
  serving path, so a revert restores today's behaviour exactly.
- `SYNC_PROCESSING_QUIET_SECONDS` unset or `600` is today's behaviour.

## Needs the owner's eye

- **Not in this PR:** enabling the Firestore TTL policy on the
`pipeline_ledger` collection group. #25125 did
it by editing `.github/actions/sync-backfill-lifecycle/action.yml`; that
edit is removed here and waits for
the owner's explicit yes as its own change. Until then ledger rows carry
`expires_at` but nothing deletes
them on a timer; conversation deletion and account erasure still remove
them.
- The hold value itself is not changed here. Lowering it is a separate
config decision.

## Tests

- `tests/unit/test_pipeline_ledger.py`: one-write chain keeps both
transitions; a duplicate first stage still
lands the follow stage; a follow stage never re-opens a terminal;
receipt-to-stage mapping; noise terminal
  and re-open by a later summary; deleted source writes nothing.
- `tests/unit/test_lifecycle_ledger_terminals.py` (new): both operator
closes write their terminal; a refused
  close writes none.
- `tests/unit/test_sync_processing_hold.py`: per-call read, clamp,
malformed values, outbox due time.
- `tests/unit/test_summary_persistence.py`,
`test_conversation_persistence_transaction_expiry.py`: one ledger
  transaction per summary commit.
- `tests/unit/test_lifecycle_metrics_are_scraped.py` (new): ledger and
hold families survive the sync keep
rule; arrival-gap observation is covered in
`test_sync_processing_hold.py`.
- Inherited from #25125: `test_record_audio_seal.py`,
`test_record_token_lease.py`, erasure tests,
and the emulator proof
`tests/integration/test_pipeline_ledger_firestore.py`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
MichaelC001 pushed a commit to MichaelC001/omi that referenced this pull request Nov 15, 2026
…rape; leave the ledger alert unchanged

- omi_sync_content_arrival_gap_seconds: seconds between content arrivals on one
  held conversation. The share above a candidate quiet window is the late re-run
  rate that window would buy, so the hold value is chosen from a distribution.
- The sync services' GMP keep rule dropped every omi_pipeline_ledger_* family,
  though seal and summary ledger writes run there. Keep them, with a test that
  derives the names from the producers.
- Drop the inherited downgrade of the ledger stuck alert: it no longer meets the
  alert tier contract on main and BasedHardware#25284 owns those rules.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

This branch has not been deployed

No deployments
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