Skip to content

ci-flake: stabilize native audio dependency downloads - #23446

Merged
Git-on-my-level merged 1 commit into
mainfrom
ci-flake/native-audio-mirror-cache
Oct 23, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
ci-flake/native-audio-mirror-cache

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Cold native-audio setup repeatedly stalls on azure.archive.ubuntu.com, even after #23406 recycles the connection. Use one distro-stable .deb cache shared from main and official Ubuntu HTTPS archives for cold downloads, scoped to this step through apt source overrides. PRs restore but no longer save isolated merge-ref copies; main shard 1 seeds the cache immediately after installation and before tests. The v1 restore prefix preserves existing cache entries during migration.

Confirmed using gh api repos/BasedHardware/omi/actions/jobs/<id>/logs:

  • 40009383869 shard 3 and shard 4: repeated exit 124 while downloading from Azure.
  • 40008071034 shard 6: the same sliced-download exhaustion.
  • 39988312512 shard 1 and 39973040401 shard 1: old five-minute timeout during Azure downloads. Healthy siblings finish native setup.
  • Cache inventory on October 23 showed seven PR-scoped copies for one main entry. A stable key cannot prevent every quota eviction; the alternate cold source remains necessary.

Addresses both Codex P2s on #23406: only update and install --download-only run in timeout slices; dpkg installation runs once offline with --no-download, and failed cache replay runs dpkg --configure -a before dependency repair. Each slice is clamped to the remaining 300-second download budget. The whole native step is capped at seven minutes, leaving 198 seconds after the observed 72-second checkout, 90-second toolchain and allowed 720-second test wall inside the unchanged 25-minute job ceiling.

David's 2026-10-22 standing ruling: every caught CI flake gets fixed at the root; caching CI dependencies is approved. This change stays within the native-audio setup/cache steps. No new workflow, test omission, or merge action.

Failure-Class: FC-gate-timeout-below-cold-cost

Product invariants affected: none.

Why isn't this a shared primitive instead? The workflow's native-audio bootstrap is the shared implementation for all six shards and nightly reuse. Behavioral coverage exercises that exact shell through the existing nightly contract suite, including offline replay, failed-replay recovery, download retry, exhausted-budget failure and job margin; no additional gate or workflow is introduced.

Validation:

  • omi-heavy run -- nice -n 19 make setup-backend — locked Python 3.11 environment installed.
  • omi-heavy run -- nice -n 19 python3 scripts/ci/test_nightly_main.py — 22 tests passed, including all seven native-audio cases (also run by preflight).
  • actionlint -shellcheck '' .github/workflows/backend-unit-tests.yml — passed.
  • python3 .github/scripts/check_ci_budget.py --refresh — passed; budget manifest unchanged.
  • omi-heavy run -- nice -n 19 env OMI_PR_BODY_FILE=/tmp/flake-native-audio-pr.md make preflight — all 26 selected checks passed on the final commit.
  • scripts/pr-preflight --pr-body-file /tmp/flake-native-audio-pr.md under omi-heavy — all 26 checks passed.
  • Normal managed git push under omi-heavy — passed all hooks, including backend Pyright (zero errors), eight selected backend unit test files and actionlint; no bypass flags.

Local shell tests mock privileged commands and network; an actual Ubuntu install remains for PR CI. The separate main shard 5 741-second test wall versus its 720-second regression budget is outside this dependency-download fix and remains visible.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

Keep a distro-stable main-only cache, isolate official Ubuntu HTTPS sources for cold downloads, and slice download-only apt operations before one offline install. Reserve cache-save and cleanup margin under the existing job ceiling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T20:20:35.787099Z 36fd2bf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level
Git-on-my-level merged commit de8edcb into main Oct 23, 2026
59 checks passed
@Git-on-my-level
Git-on-my-level deleted the ci-flake/native-audio-mirror-cache branch October 23, 2026 20:26
Git-on-my-level added a commit that referenced this pull request Oct 23, 2026
…23402)

## Summary

Repeated released-memory reads reload identical canonical, historical
and metadata windows. This change atomically maintains a content-free
owner change head with source commits, including deletes, and reuses
exact raw-query projections at internal canonical, historical,
list-window, status-pair and MCP-card callers. Existing authorization,
policy, lineage, privacy, decryption and lever paths remain
authoritative.

Warm 100-document pages use two head reads instead of 100
source-document reads. Cold pages add head checks; queries smaller than
three rows bypass reuse. The sprint's **50M/day target is conditional
and unmeasured**. Grade avoided source reads minus marker reads and
added writes before booking savings.

This branch merges main through
`251892e223fca3bf5c90f060d3b9673683e258fa`, including P1 list
projections (#23394), fs-p5 operation snapshots (#23393), the typecheck
repair (#23440), merge-copy fixture repairs (#23447), and apt CI repair
(#23446). Conflict resolution retains BOTH writer installers, BOTH
account-erasure cleanup families, and all flag contracts. New real-SDK
sync/async mixed-batch checks verify one atomic commit, both projection
families, and unchanged source result counts. Erasure checks cover late
head recreation with both present and missing user roots. The final
fs-p5 refresh resolved only an adjacent flag insertion; its
origin-counter repair is byte-identical to P2's.

The archive-filter CI regression is fixed in production registration:
`firestore_read_origin` and `released_memory_projection` recover their
existing process-wide Prometheus counters after import-isolation
teardown evicts modules. Two re-import cycles prove collector identity
and counts survive. No test catches the error or weakens archive
behavior. The earlier shard-5 rerun passed all four archive cases in
514s against its unchanged 720s budget.

## Lane / contract

fs-p2 owns `released_memory_changes_v1`, `MEMORY_RELEASED_PROJECTION`,
`MEMORY_RELEASED_WRITERS_COVERED`, and
`omi_memory_released_projection_total`; original design bus 9012d9. MCP
consumes P1's `list_serving_versions/conversations.version`, writer kill
switch and coverage epoch (original bus dd3ecb). Missing P1 metadata
retains source reads. No additional conversation writer is introduced.

## Product invariants affected

- INV-MEM-1: existing three-tier policy, pending/expiry and
archive/device visibility checks rerun on raw candidates. No transcript,
speaker or Free-plan changes.
- INV-MEM-3: source errors and canonical/suppression/lineage checks
still fail closed. Projection faults fall back to the same authoritative
query.
- INV-MEM-4: projections grant no promotion authority. Canonical
receipts, graph transitions and lineage collapsing retain their existing
owners; source/head writes remain atomic, including deletes.

## Verification

Final focused conflict-resolution run on m1: **433 tests across 21 files
passed** through `/Users/david/workspace/omi-workspace/bin/omi-heavy run
-- nice -n 19 env
BACKEND_UNIT_TEST_FILE_LIST=/Volumes/scratch/m1-lanes/fs-p2/fs5-merge-files.txt
BACKEND_PYTEST_WORKERS=4 bash backend/test.sh`. Covers P1/P2
projections, mixed sync/async writes, erasure/privacy, archive
filtering, origin attribution/wiring, MCP consumers, memory policy, all
three shared-main merge-copy stub files, and fs-p5
snapshot/metric/tombstone/unlock contracts. Log:
`/Volumes/scratch/m1-lanes/fs-p2/fs5-merge-focused.log`. The prior P1/P2
refresh passed 353 tests across 17 files.

Full backend typecheck passed with **zero errors** (existing warnings
remain), via `omi-heavy run --cache-default backend-typecheck -- nice -n
19 bash backend/scripts/typecheck.sh`; log
`/Volumes/scratch/m1-lanes/fs-p2/merge-typecheck.log`. One read-only
Luna conflict delta review completed with **no P0/P1 findings**:
`exec-curve-yellow-plunge-fancy-pill-obtain`, result
`/Volumes/scratch/m1-lanes/fs-p2/luna-merge-result.txt`. Historical
metric delta review: `exec-rhythm-sort-chapter-traffic-comic-vendor`;
its P1 typing finding was corrected and verified.

Published final merge head: `6ac131f9f566b0eb2d35447329c685d76c951ed1`.
**Exact-head CI is green**: [Backend Unit Tests, attempt
2](https://github.com/BasedHardware/omi/actions/runs/40028276311),
[Firestore emulator
proofs](https://github.com/BasedHardware/omi/actions/runs/40028276314),
and [hermetic backend
gates](https://github.com/BasedHardware/omi/actions/runs/40028276356)
pass. All visible checks are terminal: 37 successful, 30 intentionally
skipped, no failures. Final-head shard 5 passes all four archive cases
with wall **673s/720s**. The single permitted failed-job rerun passed
shard 4 (all 66 runtime-contract assertions, GPU closure CPU
**0.88s/1.00s**, shard wall **615s/720s**). No threshold, allowlist or
source changes and no further reruns.

Attempt 1's sole failure was the unchanged GPU closure CPU guard at
1.01s against 1.00s, with all 66 assertions passing. **Exact main also
fails the same guard at 1.16s** in [run
40026957577](https://github.com/BasedHardware/omi/actions/runs/40026957577/job/120665436845);
test and closure tool blobs match. ANX `card:fs-p2-runtime-duration`
retains the shared-main timing follow-up for the lead.

**Normal pre-push exited 0**: all 37 manifest checks, full backend
typecheck with zero errors, runtime source closure and bounded selected
unit checks passed; log
`/Volumes/scratch/m1-lanes/fs-p2/fs5-merge-push.log`. The prior main
refresh also passed all normal pre-push gates; log
`/Volumes/scratch/m1-lanes/fs-p2/merge-push.log`.

Prior-head CI passed five unit shards, guardrails, Firestore emulator
proofs and hermetic gates. Shard 5 passed all four archive cases in
**635s against its unchanged 720s wall budget**. Shard 4 passed all 66
assertions in unchanged `test_runtime_image_contracts.py` but failed its
CPU guard on the GPU import-closure test at 1.05s versus 1.00s. A
focused same-runner local reproduction passed all 66 tests, that case at
0.31s; log `/Volumes/scratch/m1-lanes/fs-p2/runtime-focused.log`. No
threshold/allowlist changes and no CI rerun used. Tracking: ANX
`card:fs-p2-runtime-duration`. Main advanced with fs-p5 during this CI
run, so the final merge gets fresh CI rather than rerunning the
superseded head.

Earlier synthetic P2 Firestore emulator proof passed failed-batch
atomicity, SDK transaction retry, result cardinality, sync/async
deletes, bulk exclusion and raw-read parity at recovered head bf6f72c.
Emulator project `demo-fs-p2`, local `127.0.0.1:18585`; log
`/Volumes/scratch/m1-lanes/fs-p2/emulator.log`. This historical emulator
run is not claimed as fresh conflict-resolution evidence. New-head
registered CI emulator proofs must pass before merge.

## Rollout / rollback

Writer maintenance is on. Reader preference defaults on with
`MEMORY_RELEASED_PROJECTION=off` as kill switch. **Reuse requires
`MEMORY_RELEASED_WRITERS_COVERED=v1:<unique-epoch>`**, initially absent
until complete writer-fleet attestation. MCP additionally requires P1
writer coverage and its fresh epoch. Bulk-blocked or missing-head owners
retain source reads; no user-data backfill.

Owner: rollout lead. Target T2 **2026-10-24 08:00Z**, cutoff **07:30Z**,
only after exact-head CI is green. By cutoff, verify every
backend/sync/backfill/integration/listen/pusher/desktop/job writer
release and synthetic create/update/delete parity, including
standalone/non-Python/raw-RPC writers. If proof is missing, record the
blocker and keep reuse disabled. Once proved, enable all eligible owners
with a fresh epoch.

Metrics: bounded `surface/outcome/origin` on
`omi_memory_released_projection_total`; marker reads use
`origin=job:released_memory_projection`, and source reads retain their
existing caller/origin. Compare output/order/access parity and p95. Any
mismatch or regression disables readers. Grade net reads in equal
full-day windows and mature billing before recording savings.

Clear coverage before ANY writer rollback or gap; rotate the epoch after
restoration. Reader-only rollback keeps head writers installed. Details:
`backend/docs/released-memory-change-projection.md`.

Failure-Class: none
Line-Count-Exception: backend/database/memories.py | 1968 -> 1971 |
three raw query calls adopt the shared projection transport; query and
policy ownership remain in place

Tracking: ANX `card:fs-p2-released-memory-projection`, owner fs-p2; lead
owns merge/deploy and full writer-fleet audit/activation by 2026-10-24
07:30Z. Handoff: `/Volumes/scratch/m1-lanes/fs-p2/HANDOFF.md`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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