Skip to content

Measure batch packing and enforce Firestore cost controls - #25716

Merged
Git-on-my-level merged 12 commits into
mainfrom
lane/bos-batch-instrument
Nov 19, 2026
Merged

Git-on-my-level merged 12 commits into
mainfrom
lane/bos-batch-instrument

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

What changes

The batch owner-state lane gets one PR with separate implementation commits. The first adds a post-lease packing counterfactual for all nine G/S pairs, a validated capture-gap histogram, observed due depth and intake cohort labels through fenced completion. It supplies measurement for the packing decision in place of estimates based only on upload spacing. The second adds the GMP batch read-cost recording group and CI coverage for recurring Firestore and PostgreSQL selectors. The existing Firestore alerts keep their current definitions and thresholds.

The probe reads one metadata-only owner prefix with at most 17 rows, one outstanding read per process, no RPC retries, and a one-second deadline. No authority, scheduling or sweep decisions consume its results. The background-task ratchet records why process loss can drop only an optional sample. The shared identity helper has no runtime configuration imports, so the GPU worker does not become a reader of the upload-coalescing feature flag. The recorded cost ratio uses the existing fenced completion seconds across metric labels and marks low volume and missing telemetry explicitly. The selector guard runs the existing builders in the query inventory and requires actionable deadlines or owner-reviewed, bounded, expiring exceptions. A shared selector primitive would change the compatibility queries it is meant to audit. The check catches the state-only legacy projection discovery and provider sweep documented by the owner-state R1/R5 inventory. This follows the same replicated-read failure class as the coalescing scan containment in #25330.

Kill switches and mixed versions

BATCH_PIPELINE_PACKING_SAMPLE_RATE defaults to 0.001 and caps at 0.01. Set 0 across the intake and lease roles, including worker.packingSampleRate: '0' for Helm, to stop observation reads, intake stamps and cohort completion counters. Restore 0.001 to resume. The metrics scope records job:batch_packing_counterfactual separately. Release can withdraw the independent GMP GlobalRules resource. Reverting the cost commit withdraws the CI guard without requiring any persistent data migration.

Old images such as ef42ee8 ignore the optional job metadata and keep the existing worker payload and completion counter. New readers treat missing clocks and ambiguous Stripe paid-versus-trial evidence as unknown. Completion disposes of the stamp on its existing fenced write. Old workers may retain it until the ordinary job retention or erasure path. Samples describe the visible queue shortly after commit, with explicit capped and unavailable coverage.

Verification and expected cost

  • On the original head 6c06588ec5, the normal pre-push hook passed 54 repository preflight checks, full backend Pyright with zero errors, and all 40 selected backend unit test files.
  • The initial BACKEND_UNIT_TEST_FILE_LIST=<focused list> bash backend/test.sh run passed 715 checks across packing, scheduler, capture decode, intake, coalescing, chart, runtime env, flag budget, census, simulator and cost alerts. Final focused reruns passed 20 packing tests, six background-task checks and two lifecycle guard cases for the observation module. Later simulator reruns hit the local 300-second file wall. An earlier rerun printed all 12 simulator assertions as passing before that wall ended the process.
  • pytest -q backend/tests/unit/test_batch_census_registry.py backend/tests/unit/test_firestore_query_shapes.py -k 'selector or no_errors or zero_serving_debt' passed 571 focused checks.
  • backend/.venv/bin/python backend/tests/promql/firestore_cost_budget.py --promtool <pinned promtool 2.55.1> passed the existing thresholds and the new missing, low-volume, true-zero, raw counter reset and caller-group fixtures.
  • The loopback Firestore, PostgreSQL and simulator pull conformance plus upload coalescing emulator suites passed 109 tests. The separate legacy intake rollback fixture returns a fallback before admission on this head and on base 9c88e7f888b0.
  • backend/.venv/bin/python backend/scripts/cross_service_contract.py reported zero new and zero stale violations. The background-task ratchet passed all six tests.
  • Direct savings inferred from this PR are zero. The probe adds one bounded read per accepted sample. A PostgreSQL probe statement timeout closes its warm pooled connection. A later store call can incur the cost of opening and configuring a replacement. That cost is unmeasured. A serving readout must measure its actual billed overhead and whether compatible jobs can be combined. The recording group is a source artifact awaiting Release-owned install and GMP comparison.

Line-Count-Exception: backend/database/firestore_index_registry.py | 2399 -> 2402 | Keep the two metadata-only field exemptions in the existing index authority so high-volume telemetry adds no single-field indexes.

Product invariants affected

  • INV-MEM-4. Probe metadata and metrics add no path for user content disclosure or custody settlement.

Scope panel

scope-20261118t145605-e19d returned Luna and GLM Flash. DeepSeek ended without a terminal answer on that run. The retry scope-20261118t150457-45c4 returned DeepSeek and GLM Flash. The panel's scoping dossier returns prose without F identifiers, so omi-panel triage did not accept a numbered entry.

  • Accepted both reviewers' bounded, post-commit, fail-open read, source-only metrics, fixed labels, explicit missing or low telemetry, settled metric window, per-process coverage limits and expiring reviewed exceptions.
  • Accepted separate probe attribution and cost breakout. The probe is outside the cost total. The old alert query retains its exact caller regex.
  • Used the original coalescing compatibility key and intake clock evidence. Rejected inferring missing session or funding proof from WorkItem, guessing paid or trial on ambiguous legacy rows, and projecting full job documents through pending_page.
  • Used the existing intake and completion writes for the telemetry stamp and no worker wire changes. An in-transaction query would add contention. An in-memory handoff would lose attribution across service boundaries.
  • Used a GMP GlobalRules recording resource for the fleet-wide window. The in-cluster PrometheusRule would see only its local series. This source is outside the Grafana JSON consumer inventory and the alert provisioning path. Release qualification remains separate from local PromQL tests.
  • Exercised executable query builders and their existing registry. A cursor on one page cannot establish non-wrapping progress. The default-on guard uses reviewed exception metadata and exact builder digests.
  • Kept one PR per the lane assignment. Deferred the packing algorithm and all live, fleet-size and savings validation to the program owner.

Round 2 review panel

review-20261119t041052-488d returned FIX-FIRST on 6c06588ec5. Recorded F1=accept F2=accept F3=accept with omi-panel triage.

  • F1 accepted. Native read coverage now takes the fewest samples across every observed series of each type, then applies the 58-sample floor. A second QUERY series at 58 preserves coverage, and a second QUERY series at 57 suppresses the ratio.
  • F2 accepted. The cost section accounts for the warm connection lost on a PostgreSQL statement timeout.
  • F3 accepted. A missing or non-finite decoded duration yields unknown_duration. An invalid anchor contributes zero, and an invalid following row preserves the eligible prefix.

Round 2 verification

  • From backend/, .venv/bin/python -m pytest -q tests/unit/test_batch_packing_counterfactual.py tests/unit/test_monitoring_cloud_monitoring_promql_shape.py passed 29 tests.
  • backend/.venv/bin/python backend/tests/promql/firestore_cost_budget.py --promtool <pinned promtool 2.55.1> passed both new multi-series fixtures and the existing cost fixtures.
  • pytest -q tests/integration/test_partial_pull_conformance.py tests/integration/test_pull_batch_parity.py passed 66 simulator and Firestore-emulator cases. A local PostgreSQL 16.2 rerun with -k postgres passed the remaining 33 cases.

Round 3 merge verification

Merge b15cfb58a3b incorporates main at e3cfebcfb32. Upload intake now forwards main's allowance refusal and this PR's packing observations to the same admission transaction. Both the observation and admission use the timestamp taken after the allowance probe.

  • backend/test.sh passed 342 tests across intake, admission, allowance holds, staging, packing and future-capture parity.
  • The allowance-hold integration matrix passed 75 cases across the simulator, loopback Firestore and local PostgreSQL. Its 18 skips are fixture-specific.
  • The separate legacy Firestore rollback fixture test_accepted_upload_drains_after_rollback_with_encrypted_context_and_accounting returned None at the admission assertion on both the merge and its exact main parent.

GitHub CI on the Round 2 head

GitHub tested merge 3577371251 for the earlier head 1a2711956c5. The backend unit suite is red from two failures also observed on main before this follow-up.

  • Shard 7 failed test_listen_v3_rotation_custody.py::test_frames_during_a_failed_create_never_bind_to_its_successor because the producer missed the transient session-2 label before the test reached its custody assertions. The test and relevant listen code match the CI merge's main parent 7437adc424b9. The same assertion failed on earlier main 2a8b05cd3e0d and passed on 7437adc424b9. PR failure · Earlier main failure · Exact main parent pass
  • Shard 2 failed the CPU duration guard for test_monitoring_adapter_hpa_contract.py::test_hpa_and_adapter_changes_select_this_contract at 1.03 seconds against the 1.00-second limit. All 39 assertions in the file passed. The same test exceeded the guard at 1.06 seconds on earlier main ae68d3176d80. The selector additions in this PR match census and Firestore guard paths outside this test's HPA and adapter inputs. PR failure · Earlier main failure

View guided diff Turn on auto-fix

Failure-Class: FC-sync-assignment-read-abort-escapes-retry

Implemented by a delegated agent for the batch owner-state program.

Current head

The final head is 23d7a907b5f936b59db4f9674b4ca0bedee85d36. Its exact-head closure is comment 7016584048, which records the merge with main after #25724 and the outbox commit-contention fix. lead2 gave the batch-custody delta source ACK at this head (bus 0bd65c). CI is green.

Copy link
Copy Markdown
Member Author

Exact-head closure b15cfb5

GitHub reports this head mergeable with 45 successful checks, 26 skips, zero failures, and zero pending. The Round 3 backend unit and emulator runs now both pass. Backend unit run · Emulator proofs

Panel findings and exact-head verification

review-20261118t194924-4703 on 474effcf64ea93d0902a2b6592283dfa6682d19e

The panel returned INCOMPLETE and the ledger records dispositions for both findings it returned.

  • F1 accept. The probe budgets needed direct tests. 6c06588ec5a5359a380abb7535fbc56d5f8f5d50 adds test_firestore_probe_has_one_bounded_unretried_stream and test_postgres_probe_uses_only_an_idle_connection_with_a_statement_deadline. At this head they still pin the Firestore projection read limit, one-second timeout and disabled retries, and PostgreSQL's warm-only checkout and statement deadline.
  • F2 reject. An interior gap occupies real capture time. Sources at [0,1] and [2,3] have two seconds of PCM and end at 3. Computing the end from PCM alone would fabricate an extra gap before the next unit. The behavior stays at the reviewed implementation. 245ce0718ad58852ff881db4b370da31600cc63e pins the distinction in test_short_gap_is_silence_with_capture_clock_preserved. At this head test_intake_freezes_newest_source_age_and_scopes_key also pins an end computed from duration and eligible seconds computed from original frames.

review-20261118t205450-562c on 6c06588ec5a5359a380abb7535fbc56d5f8f5d50

  • F1 accept, open. The dedicated worker constructs a local Pump and Scheduler, and sampled pulls attribute reads to job:batch_packing_counterfactual. health_server exports its private registry. Its register_probe_collectors path omits FIRESTORE_BILLED_READS_BY_ORIGIN, so the packing_probe recording rule misses those worker reads. There is no fixing commit or worker-exposition regression test at this head. test_projected_read_origin_grid_and_completion_labels pins the source attribution and test_custom_registry_processes_export_the_overflow_counter checks the worker's shared exporter for the caller families. I registered the exact-head collectors on a private registry and injected a synthetic packing-origin sample. It appeared in the default exposition and was absent from the private exposition. Add the by-origin family to the dedicated worker exposition and pin it with a test that observes the packing-origin sample.
  • F2 accept. The coverage ratio needed semantic fixtures. 1a2711956c5b2114820b8b9dd71344d09cb17537 adds native coverage accepts a second series with 58 samples and native coverage rejects a second series with 57 samples in backend/tests/promql/firestore_cost_budget.py. Both are present at this head and exercised by the pinned PromQL preflight.

review-20261119t041052-488d on 6c06588ec5a5359a380abb7535fbc56d5f8f5d50

  • F1 accept. Filtering before the minimum can admit a read type with a sparse series. 1a2711956c5b2114820b8b9dd71344d09cb17537 takes the minimum across observed series per type before applying the floor. The same two 58/57 PromQL fixtures pin the positive and negative cases, and the rule and fixtures are present at this head.
  • F2 accept as documentation. A statement timeout exits Pool.connection through its close-on-error path and can require a replacement dial. The Round 2 PR cost-paragraph edit documents this unmeasured cost. The edit has no Git SHA. The probe source at 6c06588ec5a5359a380abb7535fbc56d5f8f5d50 is unchanged here. At this head test_postgres_probe_uses_only_an_idle_connection_with_a_statement_deadline pins the probe setup and test_deadline_discards_connection_and_releases_pool_slot pins exceptional teardown for the shared pool.
  • F3 accept. Missing or non-finite durations should stop the estimate with a bounded reason. 1a2711956c5b2114820b8b9dd71344d09cb17537 introduces unknown_duration. test_unknown_duration_keeps_the_valid_prefix is present at this head and covers missing, NaN, and infinity for anchors and following rows.

Raw triage provenance

The earlier triage record is in ~/.local/state/omi-panel/ledger.jsonl, event triage for review-20261118t194924-4703.

{"at": "2026-11-18T20:40:03Z", "calls": {"F1": {"call": "accept", "why": ""}, "F2": {"call": "reject", "why": "Interior silence is within the real capture-clock span. Sources at [0,1] and [2,3] end at 3 and contain 2 original seconds. Subtracting the interior gap from the endpoint fabricates a gap before the next source. Tests now pin both values."}}, "event": "triage", "id": "review-20261118t194924-4703"}
omi-panel triage review-20261118t205450-562c F1=accept F2=accept
{"recorded": ["F1", "F2"], "not_yet_triaged": [], "resolutions": []}

omi-panel triage review-20261119t041052-488d F1=accept F2=accept F3=accept
{"recorded": ["F1", "F2", "F3"], "not_yet_triaged": [], "resolutions": []}

Delta review

I re-read git diff 474effcf64ea93d0902a2b6592283dfa6682d19e..b15cfb58a3b221d2e7902a70fe9bb437abbbbb6f and git diff 6c06588ec5a5359a380abb7535fbc56d5f8f5d50..b15cfb58a3b221d2e7902a70fe9bb437abbbbb6f. The four first-parent lane commits below cover the earliest panel range. The last two cover the two later panels. The merge brings in 146 additional commits already present in its main parent, listed below with the risks of their integrated changes.

  • 245ce0718ad58852ff881db4b370da31600cc63e preserves receipt-clock job documents, uses a single primary observation in DualStore, keeps missing and explicit null fields distinct in PostgreSQL, and adds store and capture fixtures. Receipt-clock rows intentionally contribute less evidence. The primary-only route avoids doubling the measurement reads.
  • 6c06588ec5a5359a380abb7535fbc56d5f8f5d50 adds the two deadline and read-bound tests. Test-only change.
  • 1a2711956c5b2114820b8b9dd71344d09cb17537 fixes sparse-series aggregation, pins the threshold and guards malformed durations. Low coverage can suppress the ratio, and malformed rows stop estimates while preserving the prior valid prefix. These are telemetry outcomes.
  • b15cfb58a3b221d2e7902a70fe9bb437abbbbb6f merges e3cfebcfb32a4198071fb967729c88f508b71600. It resolves two intake conflicts by carrying the allowance refusal and packing observation into the same transaction. The timestamp is taken after the bounded probe. A verified refusal can park a row before its first lease, so the lease sample represents work that reaches leasing. Its admission stamp is optional metadata on that row. test_intake_parks_before_queueing_and_releases_in_capture_order and test_probe_crossing_owner_release_falls_back_to_worker are present. Round 3 passed 342 focused units and 75 allowance conformance cases. The legacy intake rollback fixture failed at the same pre-admission assertion on the merge and its exact main parent.

Privacy and deletion. Packing candidate queries project bounded scheduling and observation fields. Persisted observations use owner-scoped digests and bounded cohort labels, and the probe runs after the lease commit. The merge retains the original admission identity, privacy checks, and erasure routing. The imported purge changes keep conversation obligations open across pending artifact uploads and preserve owner and legal fences. The imported Home review handles projected metadata and aggregates under its own access and execution gates. Those main changes have separate rollout risks below.

Custody and mixed versions. The lane leaves the lease payload and completion fence intact. GPU image ef42ee8 can ignore the optional stamp, while new readers accept jobs without it. test_packing_sample_runs_after_commit_and_cohort_completes_once pins the post-commit sample, absence of the stamp from the lease payload, and single completion accounting. Allowance parking retains its audio and existing release and erase paths. The open telemetry defect affects exposure of the read counter on the new dedicated worker, independent of those custody fences.

Rollback. Set BATCH_PIPELINE_PACKING_SAMPLE_RATE=0 on intake, serving and workers, including Helm worker.packingSampleRate: '0', for observation rollback. Existing rows remain readable. The independent GMP rule can be withdrawn separately. Main's BATCH_ALLOWANCE_INTAKE_PARK_ENABLED=off stops new intake holds while existing workers and controllers drain retained holds. This closure covers source and CI evidence.

146 commits imported from main and their risk by upstream change

e338a9a. Moves the Unlimited backfill day cap to the upload gate and extends the production lookback. Retry occurs before server custody, so clients must retain and retry the upload.

24d814d. Keeps already accepted desktop frame requests draining at quota. Drain capacity and backlog are the operational risks.

  • 16a58d51834ee39ec6f585c657c45bf034fe81db fix: keep desktop frame requests draining at quota
  • b43042314dd959c5f4d8a2c6439f6b23525c74a8 Use the existing emulator workflow triggers
  • 24d814d99d7b6286268616290a702de662f55cbb SCA-2671: Keep desktop frame requests draining at quota (SCA-2671: Keep desktop frame requests draining at quota #25712)

faba7bd. Excludes idle open rows from the v3 live read and moves the predicate into a v3 helper. Window visibility can differ across mixed reader versions.

  • ca3acb688248c4dbd689f58e37b2fe73d720edbc fix(conversations-v3): the live read skips open rows that have been idle past the window cap
  • 3cf01384174f8df1cde343bc3f03b19c546fef5f refactor(conversations-v3): keep the live-row rule in a v3 module so the router does not grow
  • faba7bd8531a60cb8b868c02ae1da7cefc18b136 fix(conversations-v3): the live read skips open rows idle past the window cap (fix(conversations-v3): the live read skips open rows idle past the window cap #25719)

9a48db9. Deduplicates source claims, shrinks oversized write batches and separates colliding windows. A limit can park a large owner, with existing note debt still drainable.

  • 18e5c21e8fb41a6dc708f70fb61ea3cb0dcb8567 fix(conversations-v3): stop source claims doubling past the 1 MiB document limit
  • ea3f50f94b8ed8a702603f4abbb5485fa923a326 fix(conversations-v3): size projection batches on every write and drain parked owners' notes
  • 6be53a185f6c49f8a693d794efc088099264a9aa fix(conversations-v3): give a start-colliding fresh window its own id (panel review)
  • 2b0582df890db006b37abdc963fb07bc3564e655 fix(conversations-v3): keep the blocked-cause redaction off database helpers on the event loop
  • 9a48db99ac1b13dfe7815286b301fe3eddb3301b fix(conversations-v3): stop source claims doubling past the 1 MiB limit; size batches on every write (fix(conversations-v3): stop source claims doubling past the 1 MiB limit; size batches on every write #25714)

ffa1426. Shows held sync work as Processing and treats already summarized work as ready. A stale hold can delay or mislabel presentation until upstream state settles.

  • 65b650acf30fce7e172ecdc38490a8d56e300a07 fix(home): show a held sync piece as Processing on legacy Home
  • 4f44dca34160607b45c0dced39f05cecc7752a6e fix(home): a summarized piece with a stale bridge reads ready, not writing notes
  • ffa1426a0f64551837f35cf261c4758c14b10b31 fix(home): show a held sync piece as Processing on legacy Home (fix(home): show a held sync piece as Processing on legacy Home #25723)

b17161b. Adds a bounded tombstone-based remainder audit and query witnesses. Its Firestore and object-existence reads still consume the audit budget. The audit has read-only authority.

  • e693a37748132d8cd10fd3f57212d9d36a001b4f Add a read-only conversation purge remainder audit
  • ca4505fe1fab3b223e0f8c9da89a94a95b7efea7 Exercise the audit after a coalesced purge in the emulator
  • 769679af68b17ad664b6b4bdb177f98455b3b9c9 Share result document addressing with the purge audit
  • 96e3e63786bf5d5cb16a5869a4c2a0533f657d1d Refresh query witnesses for post-commit purge logging
  • 1543d01f76653f015b712781cc06fa7ebce6b4fb Pin worker query witnesses with the backend Python version
  • 17b5baff5b0c4c7e517edb168e6af82f32518ee8 Keep storage environment reads at the purge and audit entry points
  • 8f531e2f8f2d5226a88caf5eb79a3b642c06f4ee Register the purge remainder audit Firestore index
  • 9162920befb876f693cea8c472c918c75c8dce67 Report purge audit coverage for every verdict
  • b17161b674edc8fe986f2eed14911796919ee941 Audit conversation purge remainders from tombstones (Audit conversation purge remainders from tombstones #25708)

9f116b3. Applies v3 admission to sync projection rows and wakes reconciliation after commit. A failed wake can delay derived visibility while the durable assignment remains.

  • d33e81293c506ea5f518d3dd09b6968426f6d779 fix(v3): batch projection applies v3 admission to sync rows it creates
  • 1940047ca9d23d5d2f860b6e20c168479ab06d45 test(v3): caller contract checks each function and the projection call form
  • 3105381a2a31557c5e57531145206a5cb8692fae fix(v3): retry the append wake and count its degraded branch; exempt bridge by function (panel)
  • 9f116b34ae4cf88004431f59d34e1311759a6f79 fix(v3): batch projection applies v3 admission to sync rows it creates (fix(v3): batch projection applies v3 admission to sync rows it creates #25718)

075453f. Settles reservations with a matching projected job and prunes proved settled entries. Unresolved entries remain charged to the hold ledger, and reads used for pruning must stay bounded.

ae68d31. Adds default-off successor-first v3 rotation with archive retargeting and seal retry. Enabling it introduces a live handoff and retry exposure. Producer-owned and incompatible windows keep their existing path.

  • cf5bae297bb0fa81fb6aadf8c01fdb377b0f5b17 fix(conversations-v3): seal long v3 recordings at speech pauses so derived conversations appear during a long capture
  • 376195416ea9065678d3f44d3e29bedd773a4a79 test(firestore): drive the v3 successor-pending query shape
  • c4d6bed0858fbe97f1149d2021fba8463a3de9e1 style: format v3 review test
  • b375ea62e709b1fd9bdef146fa707787a8ece6ce fix(conversations-v3): rotate by successor-first cut with archive retarget; default off with cohort canary
  • 94ba341ab3e98c329f6ab784db01e524eff967e0 chore(listen): mark v3 rotation envs listen-only for the pusher co-host gate
  • 1bf7d3a50329209cc0cfc06fbca6d5ecd139cee5 fix(listen): v3 rotation supersedes the live continuation, retries refused seals and drains them at teardown
  • 1db5b163f4555f4226960364ca50ea63314315ab Merge origin/main into fix/v3-recording-rotation
  • e76edbb976a882a50d77b8fdc6f1ed56147c72ce chore(listen): rotation counter module name; compact teardown drain
  • 1cd85653abb54a10ab9b9e94610752c78be7b904 fix(listen): supersede after the switch, re-raise ownership loss, reason-enum rotation counter
  • ae68d3176d80f7679cf7282a6fdfbe9594683914 fix(conversations-v3): rotate long v3 recordings at speech pauses (default off, cohort canary) (fix(conversations-v3): rotate long v3 recordings at speech pauses (default off, cohort canary) #25726)

ae84c31. Adds bounded Home review and guarded repair. Mixed cohorts can affect aggregate representativeness. Content-minimized field selection, small-count suppression, and privacy and generation checks constrain disclosure and writes.

  • ff1d17baeb71421cf764c806d21e77c5f24868b9 feat(backend): add privacy-safe Home health review and repair worker
  • 9be729aa6ad3d585cd207d279250f2234e37cc94 fix(backend): enforce privacy and execution bounds in Home review
  • ccc555c1c7ccc9a7f6f478010b799bf993189899 Merge branch 'main' of https://github.com/BasedHardware/omi into lane/home-health-worker
  • 7fdbbb122296f31087390358aec334a39def98ba Merge branch 'main' of https://github.com/BasedHardware/omi into lane/home-health-worker
  • 29e7ab0539a25a3248d52cbff163c539af1c1596 fix(backend): verify the serving sweep before Home repair
  • 8a46564e2723c01ed795a5b2c2e67bae32fc999d Merge remote-tracking branch 'origin/main' into lane/home-health-worker
  • 34483d8d41af84708a30dd1990a3c84f455af197 Fix Home review protection ordering and summary eligibility
  • 8560c02ed6e8bfa889d4d4f20dd0c1f40aba7c05 Merge remote-tracking branch 'origin/main' into lane/home-health-worker
  • 3656e03ac099ee9b406eae7afa7a193d240c5bda Arm missing Home summaries for recordings with generated titles
  • f5a744940e8086a83a564acce22c26101b55d9da Merge remote-tracking branch 'origin/main' into lane/home-health-worker
  • e5293381db718c2ebe90078587d30532b48ee622 Tighten Home survey reads and explain reporting limits
  • ac05dbc531df35e694bc2c842fb8809350e7f8fa Merge commit '9c88e7f888b' into lane/home-health-worker
  • 6b97a655609e2b80d3d4919e0904fbb6a1a80dbf Suppress small Home repair outcome counts
  • b41451a5009158ac052dc047c24c0e4d4cc0002d Merge commit 'ffa1426a0f6' into lane/home-health-worker
  • b65dba46e4aa97ee2511f3ad0874d3eab21e8541 Match held sync visibility in Home health review
  • ae01aeb8b359a15e1d0573de2971c332c7a729ab Keep Home review inputs and receipts privacy-safe
  • 9dd6e84a2ad837bf6ae9a2ea958a9680b53ba42b Merge commit 'b17161b674e' into lane/home-health-worker
  • 8a4bad59cb278c037df0a2b362e884d7718c32cd Clarify Home repair receipt exit codes
  • ae84c3123cc685058022f74543f12781d8eec344 Add privacy-safe Home health review and repair worker (Add privacy-safe Home health review and repair worker #25666)

75cc459. Handles failed rotation pointers and empty successors. Cleanup requires close and empty evidence. A cleanup or seal failure can leave a row for stale recovery.

  • cf1dc4d6ddddfbdfeebafcc611bace2ccb00c159 fix(listen): v3 rotation survives a failed pointer move, cleans a failed successor, counts producer skips
  • 98328b24ea30451e864c3eb448991e7c77986408 fix(listen): publish the close barrier before deleting a failed rotation successor; bound producer skips
  • 75cc45961770b9f0764dad4a43647030e3abe7aa fix(listen): harden v3 rotation failure paths before the canary (fix(listen): harden v3 rotation failure paths before the canary #25731)

a6824b8. Narrows projection readback comparisons to tolerate the separate Home stamp and preserves presence-aware identity comparisons. A future stamp writer must preserve that comparison boundary.

f159cce. Adds bounded shadow-copy retirement and target-bound cursors. A wrong target or stuck cursor can leave stale copies. Firestore remains authoritative and the retirement switch stops new ticks.

  • 734283b00ef9e707781bab718ab815602e5510cb feat(backend): host bounded jobstore retirement in serving maintenance
  • 902528401da2b430c26f77afcb782097dcb9b885 test(backend): retain the active recorder for retirement query shapes
  • 04909912e2d0fe71ebcde9d4b1c762a3e9e98075 test(backend): keep query runtime arguments out of shape metadata
  • 5b5c0168f9a18ece56b3ac5fe64ce4853b6fcee2 test(backend): explain listen-only jobstore erasure bindings
  • cfa885b70940d1e2026b379511499cef9969edf8 test(backend): expect retire_copies in strict maintenance call assertions
  • 67778da49c1de71fbcbc0b7840f44b2f357c2017 fix(backend): admit absent data-plane project, keep cursor SQL static, align tests
  • 5266d81e98c0c0d0a3d3dda851948a9028d2ac39 test(backend): load runtime_env with the C YAML loader in the retirement deploy test
  • cfd406ad70313e08252f34b3ce382a2bdb4d7701 fix(backend): primary retirement pages only while copies are written
  • dd5b1c871bc06a85388e9ee91213cd1fe3c4f4af Merge remote-tracking branch 'origin/main' into lane/jobstore-fast-path
  • 96aa1997cb952031e2390543c200223d80b06ea1 fix(backend): index retirement scans in byte order; document stuck cursor remediation
  • c1ad007d3b7e55e444eda793e8ecb33d9189892b Merge remote-tracking branch 'origin/main' into lane/jobstore-fast-path
  • bcba1b459cd0afc5f19406a7930b4aa1a821f0a4 Merge remote-tracking branch 'origin/main' into lane/jobstore-fast-path
  • db8cdd0656446254775ae73b099eb601b5b15f11 test(jobstore): pin 0010's cursor tbl CHECK to MIRRORED_TABLES
  • 86b03f3b93f78298d823d14c911f9c42cd085c76 Merge remote-tracking branch 'origin/main' into lane/jobstore-fast-path
  • fa4cee63ed6f39669598edff0be494833ab37045 Merge remote-tracking branch 'origin/main' into lane/jobstore-fast-path
  • f159cceccac0ec7785d46a1ef239eed5e1c18931 feat(backend): host bounded jobstore retirement in serving maintenance (feat(backend): host bounded jobstore retirement in serving maintenance #25630)

b39ae02. Moves the Home stamp constants into an import-free module. Main risk is import-graph drift and is covered by the isolated-router follow-up.

f3d991e. Opens the conversation on Finish and adds Processing presentation. Retry and route races stay within client navigation and request handling.

  • 88cc4ad9606a45730989ed034610238353d27b74 fix(app): Finish opens the conversation, with Processing until it is ready
  • 7e8c80edb0ff53e2602d535c612cb3a0535701e3 docs(app): simulator evidence for Finish opening the conversation
  • 0caf86df3aec3eea771067968a87858a8711d912 fix(app): one Finish at a time, nothing to process after a repeat, Processing page ends
  • f3d991ec13478f62d2a3d2fe7cec4f8047e67bae fix(app): Finish opens the conversation, with Processing until it is ready (fix(app): Finish opens the conversation, with Processing until it is ready #25733)

c1ee221. Fills Home pages past hidden rows and bounds indexed v3 live reads. High hidden debt can reach the read bound, and client cursor visibility can differ across versions.

  • 9a951c9113f5d85ecbec7c636a8765077ab20f43 fix(conversations): page Home past hidden runs; live tile is an open v3 window
  • 0f0b461fc5064f0e1574522927b7f2615dc52b01 refactor(conversations): move live-window and page-header helpers out of the router
  • 0ca167128155919a237cc6cf28d3bb2823c9d00f Merge origin/main: fold the v3_derived live rule into v3/live.py (fix(conversations-v3): the live read skips open rows idle past the window cap #25719)
  • 0ec11764034036cddd1081ebf01e3187caa352dc fix(conversations): unbudgeted readers keep the 64-row hidden allowance; live scan has room past legacy rows
  • 628912387885d6ea1477acb2f74448978a31c443 Merge origin/main: keep fix(home): show a held sync piece as Processing on legacy Home #25723 show_held through the shared page fill
  • b91192fbb988e0bbafe977c7bd3f1ace0941d38d Merge remote-tracking branch 'origin/main' into fix/v3-home-read-path
  • 067fab4008003f430d154648d7fbe02f3867f1c6 fix(conversations): live tile reads v3 windows through the index
  • ed7274dc2feed7bf9f14e044f78f8c957d0d546d chore(conversations): classify the v3 live-window reader
  • 22a15105c2f7fa712e8acd6e5c7af039ac5d9697 fix(conversations): live read pages through the whole idle window
  • 81396f15f11cb90c97a08670e342581a71ba7470 fix(conversations): live read in two bands under one cap; no has-more without progress
  • ab826e7d66b7736c120bfd415f6f5fea970e6c0d fix(conversations): no has-more on an empty discarded page; disjoint live bands
  • 8039875b41aac15b095e42af5fa2f71d5414dc3c fix(conversations): order the live window read explicitly
  • c1ee221b518d34890987df8773f2f08945631afb fix(conversations): Home pages past hidden runs; live tile is an open v3 window; day view hides what Home hides (fix(conversations): Home pages past hidden runs; live tile is an open v3 window; day view hides what Home hides #25721)

6346f33. Keeps deletion obligations open while an artifact receipt is pending. Pending uploads can delay closure, and old erasers need independent mixed-version qualification for the renewed receipt gate.

  • 3b4f5580078d969d0619af0509ccf4b332f75348 Keep conversation purge open while artifact erasure is pending
  • 2d8d96c8fbfccf45235c3f8653ba5a14c95fed61 Refresh query coverage pins after purge handoff review
  • 78e2e7ad74c70dbc1e4b5d0759ec084fa45fa42d Cover coalesced receipt replay and repair transaction fences
  • 6346f33b0bbc859f8b4cdf727ceb55af24cbece6 Keep conversation purges open until pending artifact receipts are erased (Keep conversation purges open until pending artifact receipts are erased #25737)

7c7b491. Lets a failed offline Finish retry. The client must still prevent duplicate submissions and release its UI guard on failure.

2a8b05c. Runs isolated CI tests for v3 and Home import changes. Selection and CPU timing can affect CI coverage and duration.

1bdf17c. Sizes the cap-hold ledger to the bounded sweep and reports saturation as backpressure. A high-stock owner can grow the ledger and stay delayed while it fills.

d5329c7. Stages retirement off on the named production role and verifies fixture expectations. Rollout must preserve the intended distinction between staging and production.

d6f5ba7. Aligns orphan recovery and reclaim clocks to the server lookback. Reclaim remains irreversible once authorized, with the complete census, unreferenced-file proof, two clocks and fail-closed switch checks.

7437adc. Honors explicit backend test selections and bounds workers. CI jobs can cover a different set and expose existing timing flakes.

deef3b2. Parks only proven monthly allowance refusals on configured upload roles. The probe adds bounded latency, and incorrect parking would delay processing. The month and owner-release fences plus bounded hold drain constrain that risk.

  • 8c5382b90c99b78f3115d5da70d5cf6250f26ca4 feat(batch): park proven monthly allowance refusals at intake
  • 3abf2454542c666084c7fff1a5732c891d082611 test(firestore): cover verified-only monthly usage reads
  • dfe375cf4aa149eed78f279c99d10c82854e3bd5 test(batch): bind intake fixtures to the privacy generation
  • 19d7138708afea2998468070af8027a64a815ffc test(deploy): carry intake parking in runtime fixtures
  • 08a9ee2326cff595e8dd0c791161adddbac0a530 test(config): track the intake switch in the flag budget
  • 2091d9da96ec42153f0b7909d30f9a8c34bf1f5c test(batch): bind intake suites to the emulator stage
  • 337eeaaef80621ea562109dd2cdb6bc7233e5d81 refactor(batch): evaluate the intake switch on the executor
  • 8e1cf6a8d3a59eac599138d1a826c2eb7e35d746 refactor(batch): isolate upload eligibility for the allowance probe
  • 9fc4581f690aef9ecfb770342316c5d677f3a1d5 fix(deploy): expose the intake parking switch reader to static checks
  • ce4ca0efa4935e60d38ff01dc0847fbaf08a8215 fix(deploy): render the default-on intake parking switch as true
  • a728464743ed7b21ecc8bc666a0d3b1535198f4e test(deploy): reuse safe manifest parsing and unchanged reader inventories
  • 6ff70f8446de420c7681485bf44a66b63c02e918 docs(batch): reflect the sync-upload backfill day-cap boundary
  • b8b0faebc1876e70dbe15e62441cca7dd90ae0bb test(batch): load legacy seal fixtures before call-phase timing
  • 710bec54650568db3aaaf811ede064a997930666 fix(batch): bound cold imports to the upload allowance probe
  • 56c9d518c140cf5da6a159209dcaaf567872ad0a fix(batch): probe allowance for new GPU work in mixed uploads
  • e406266bc04432c82499a5cf917549bb7c111065 fix(batch): scope intake parking to sync upload roles
  • deef3b26fdba43b646571c14fc309d27231f7f5f Park allowance-exhausted batch jobs at sync intake (Park allowance-exhausted batch jobs at sync intake #25722)

44b3877. Allows preserve-live verification to tolerate HPA replica changes and CronJob history with ownership checks. A changed owner or rollback CAS can intentionally block a release.

  • c9137890ebf76de9148a030f37ced90484f0c2e9 fix(deploy): preserve-live worker verify and rollback tolerate HPA replicas and CronJob history
  • d2df5c26d14f3657ca6ebce15c40998f1d6a2cf9 fix(deploy): scope replica exclusion to HPA Deployments; bind T4 replicas and mismatched owned Jobs
  • 3e1c757f03473321176f03afb6079ddc1e7122ef fix(deploy): prove HPA ownership, match whole CronJob runs, rebuild CAS from a fresh read
  • 4d44cd8491d90db55961c3a96930f808516a34fd fix(deploy): bind owned-Job selector and generated labels, HPA apiVersion; fresh read before dry-run
  • 375cdf005057293ae898724129147a9821ca185b fix(deploy): reject terminating HPAs, print the patch actually sent, chart tripwire
  • 44b38776b1c1442c42b5b63cac121e13353e2ef8 fix(deploy): preserve-live worker verify and rollback tolerate HPA replicas and CronJob history (fix(deploy): preserve-live worker verify and rollback tolerate HPA replicas and CronJob history #25752)

e3cfebc. Loads v3 closure by claims with byte, source and transaction-write bounds. Heavy owners can park on budget exhaustion while earlier committed notes still drain.

  • 2e01b181144a0d8265f7421620e0816cf0eca639 fix(conversations-v3): load a heavy owner's closure by claims, bounded by size (v3_derived_budget)
  • 2373ca1d8c17147b81ee6e4fddbd88d0bd61a565 fix(conversations-v3): bounded claimant reads, write-capped batches, env levers (panel)
  • 19b50343eba71abaedbe141b818c441e436bac93 fix(conversations-v3): check the closure budget per document; bound loaded sources (panel 2)
  • 48faaa53cc90b7753f871617d4eee4aaf6436a0e fix(conversations-v3): bound source reads before reading; count re-derive deletes in the write cap (panel 3)
  • e3cfebcfb32a4198071fb967729c88f508b71600 fix(conversations-v3): load a heavy owner's closure by claims, bounded by size (v3_derived_budget) (fix(conversations-v3): load a heavy owner's closure by claims, bounded by size (v3_derived_budget) #25753)

DELTA FIX b15cfb5: expose the bounded packing-probe by-origin counter from the dedicated GPU worker registry and pin the exported sample in a worker exposition test.

Copy link
Copy Markdown
Member Author

Exact-head closure 2c82eef

Supersedes the Round 4 closure at b15cfb58a3b221d2e7902a70fe9bb437abbbbb6f.

GitHub reports this head mergeable with 45 successful checks, 25 skips, zero failures, and zero pending. The coordinator's HPA shard rerun and its backend unit suite passed. HPA shard rerun · Backend unit suite · Emulator proofs

Panel findings and exact-head verification

review-20261118t194924-4703 on 474effcf64ea93d0902a2b6592283dfa6682d19e

The panel returned INCOMPLETE and the ledger records dispositions for both findings it returned.

  • F1 accept. The probe budgets needed direct tests. 6c06588ec5a5359a380abb7535fbc56d5f8f5d50 adds test_firestore_probe_has_one_bounded_unretried_stream and test_postgres_probe_uses_only_an_idle_connection_with_a_statement_deadline. At this head they still pin the Firestore projection read limit, one-second timeout and disabled retries, and PostgreSQL's warm-only checkout and statement deadline.
  • F2 reject. An interior gap occupies real capture time. Sources at [0,1] and [2,3] have two seconds of PCM and end at 3. Computing the end from PCM alone would fabricate an extra gap before the next unit. The behavior stays at the reviewed implementation. 245ce0718ad58852ff881db4b370da31600cc63e pins the distinction in test_short_gap_is_silence_with_capture_clock_preserved. At this head test_intake_freezes_newest_source_age_and_scopes_key also pins an end computed from duration and eligible seconds computed from original frames.

review-20261118t205450-562c on 6c06588ec5a5359a380abb7535fbc56d5f8f5d50

  • F1 accept, fixed. 2c82eef591da696147265989f76774919f3bb762 registers the existing FIRESTORE_BILLED_READS_BY_ORIGIN collector in the dedicated GPU worker's private registry. test_packing_probe_origin_is_exposed_once_by_worker_and_default_registry injects job:batch_packing_counterfactual, scrapes the actual worker /metrics endpoint, and checks exactly one sample with those labels in the worker and default expositions. The registration and regression test are present at this head. Passing worker regression
  • F2 accept. The coverage ratio needed semantic fixtures. 1a2711956c5b2114820b8b9dd71344d09cb17537 adds native coverage accepts a second series with 58 samples and native coverage rejects a second series with 57 samples in backend/tests/promql/firestore_cost_budget.py. Both are present at this head and exercised by the pinned PromQL preflight.

review-20261119t041052-488d on 6c06588ec5a5359a380abb7535fbc56d5f8f5d50

  • F1 accept. Filtering before the minimum can admit a read type with a sparse series. 1a2711956c5b2114820b8b9dd71344d09cb17537 takes the minimum across observed series per type before applying the floor. The same two 58/57 PromQL fixtures pin the positive and negative cases, and the rule and fixtures are present at this head.
  • F2 accept as documentation. A statement timeout exits Pool.connection through its close-on-error path and can require a replacement dial. The Round 2 PR cost-paragraph edit documents this unmeasured cost. The edit has no Git SHA. The probe source at 6c06588ec5a5359a380abb7535fbc56d5f8f5d50 is unchanged here. At this head test_postgres_probe_uses_only_an_idle_connection_with_a_statement_deadline pins the probe setup and test_deadline_discards_connection_and_releases_pool_slot pins exceptional teardown for the shared pool.
  • F3 accept. Missing or non-finite durations should stop the estimate with a bounded reason. 1a2711956c5b2114820b8b9dd71344d09cb17537 introduces unknown_duration. test_unknown_duration_keeps_the_valid_prefix is present at this head and covers missing, NaN, and infinity for anchors and following rows.

Raw triage provenance

The earlier triage record is in ~/.local/state/omi-panel/ledger.jsonl, event triage for review-20261118t194924-4703.

{"at": "2026-11-18T20:40:03Z", "calls": {"F1": {"call": "accept", "why": ""}, "F2": {"call": "reject", "why": "Interior silence is within the real capture-clock span. Sources at [0,1] and [2,3] end at 3 and contain 2 original seconds. Subtracting the interior gap from the endpoint fabricates a gap before the next source. Tests now pin both values."}}, "event": "triage", "id": "review-20261118t194924-4703"}
omi-panel triage review-20261118t205450-562c F1=accept F2=accept
{"recorded": ["F1", "F2"], "not_yet_triaged": [], "resolutions": []}

omi-panel triage review-20261119t041052-488d F1=accept F2=accept F3=accept
{"recorded": ["F1", "F2", "F3"], "not_yet_triaged": [], "resolutions": []}

Delta review

I re-read git diff b15cfb58a3b221d2e7902a70fe9bb437abbbbb6f..2c82eef591da696147265989f76774919f3bb762. The range contains one commit. The prior closure records the earlier commit inventory and its risks.

  • 2c82eef591da696147265989f76774919f3bb762 adds the bounded by-origin collector to health_server and tests its exposition. The worker endpoint serializes its private registry. Processes serving the default registry continue to expose the original collector once. The shared probe exporter and record-seal exporter are unchanged.

Privacy and deletion. This exposes the existing bounded origin, collection, and kind labels. It adds no reads, user identifiers, persistence, or erasure paths.

Custody and mixed versions. The delta is confined to metrics registration. Leases and completions retain their payloads and fences, and old GPU image ef42ee8 remains compatible. During a mixed rollout, the worker cost breakout represents workers that export the counter. The added series can increase scrape size within the existing label bounds.

Rollback. Revert 2c82eef591da696147265989f76774919f3bb762 to restore the previous worker exposition. BATCH_PIPELINE_PACKING_SAMPLE_RATE=0 independently stops new packing observations. There is no data migration.

Verification. The worker runtime, Firestore caller exporter, record-seal repair budget, and runtime percent exporter unit files passed locally. The standard pre-push hook passed. The worker exposition regression passed on this head in GitHub CI. The emulator proofs passed after their package-install retry.

DELTA SHIP 2c82eef

Preserve worker read counters and the simulator packing and projection outbox imports.
Covered results wait for the outbox after Firestore exhausts its commit retries. Use the short retry cadence for contention so a fresh claim can advance projection without waiting for the generic follow-up backoff.

Failure-Class: FC-sync-assignment-read-abort-escapes-retry

Copy link
Copy Markdown
Member Author

Exact-head closure 23d7a90

Delta 2c82eef591da..23d7a907b5f9

  • Merge 3fe4ae46d312 kept both collectors in diarizer/batch_pipeline_runtime.py and both imports in testing/pipeline_sim/store.py. The census guard pins Schedule batch projection from committed result obligations #25724’s merged projection queries at the existing 200-row limit. The packing probe reads job metadata. The outbox schedules obligations on committed results.
  • The burst trace caught Firestore exhausting commit retries during projection. Because compatibility scans skip covered results, the generic retry deferred pending results for 60 seconds and ready results for 900 seconds at the default settings. This fix schedules confirmed contention after 10 seconds under the same revision and claim fences. The gauntlet now reports the statuses it observed on failure.
  • The regression exercises pending and ready results. Three full baseline runs and the zero-sampling control passed locally. All 10 batch scenarios, targeted store checks, and GitHub CI passed with the fix. Sync Cloud Tasks gauntlet

The legacy reader still covers unstamped results from GPU image ef42ee8. Setting BATCH_PROJECTION_OUTBOX=false restores legacy discovery.

DELTA SHIP 23d7a90

@Git-on-my-level
Git-on-my-level merged commit 3fbdd55 into main Nov 19, 2026
74 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/bos-batch-instrument branch November 19, 2026 17:40
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