Skip to content

feat(staging): lane 4 David-only mirror, synthetic population and replay driver - #22428

Merged
Git-on-my-level merged 2 commits into
integration/legacy-retirefrom
lr/04-mirror
Oct 19, 2026
Merged

Git-on-my-level merged 2 commits into
integration/legacy-retirefrom
lr/04-mirror

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

Swarm lane 4 (legacy-sync retirement), first slice: the tooling that feeds staging realistic input. New files only; no runtime code path changes; deploy class none.

  • testing/loadgen/profile.json + refresh_profile.py (plan F F7): prod upload arrival shape from ro-prod Prometheus aggregates only (k≥20 floor, no uids). Measured: ~219 accepted uploads/min (24h level) with the UTC hour-of-day curve, 76% iOS / 24% Android, lane decisions (60% legacy-fresh, 33% unbound backfill, 0.6% device-bound fresh), recording-age CDFs per lane, VAD speech share 40.6%. Unmeasured fields (reverse-upload share, burst-owner shape, files per upload) stay under assumed with their basis.
  • testing/loadgen/population.py: deterministic pseudo-owner population (lg-<run>-oNNNN): steady fresh owners at the hour-of-day rate, burst owners (8-10-day-old backlog back to back), reverse (newest-first) and shuffled backlog owners; backlog share derived from the profile; silence pads and near-silent files; capture times stored relative to send so names are minted at send time; N-owner burst mode for M2.
  • testing/loadgen/mirror_codec.py: staging-mirror envelope (AES-GCM, key from the staging-only secret, object name as AAD); prod per-uid decrypt re-implemented with an explicit secret (byte-compatible with utils.encryption, tested) so one process holds both keys; chunk / raw-upload payloads to WAL upload bodies without decoding; pendant opus_fs320 filenames.
  • scripts/staging/mirror_owner_recordings.py: owner pinned by three David-only prod allowlists (fails closed if any is missing, a secret ref, or not exactly that uid); prod via a list/get-only facade; plaintext only in memory; sealed copies to based-hardware-dev-staging-mirror; aggregate-only run record.
  • scripts/staging/replay.py: plan (pure) and run through the real /v2/sync-local-files (+ /v2/sync-capture-manifest for device-bound fresh uploads, seeded only behind lane 2's staging fence). Refuses non-staging targets and any load host other than in-cluster or m1-mac-studio (swarm §8). Writes results.jsonl, summary.json, population.json (lane 5's input).
  • testing/loadgen/staging_replay_job.yaml: in-cluster Job template.

Product invariants affected

none

Test plan

  • bin/omi-heavy run -- nice -n 19 .venv/bin/python -m pytest tests/unit/test_loadgen_mirror_codec.py tests/unit/test_loadgen_population.py tests/unit/test_staging_mirror.py tests/unit/test_staging_replay.py → 55 passed (unit layer).
  • Covers: prod-decrypt compatibility with utils.encryption, envelope AAD binding, population determinism / exact shape allocation / no future captures / fresh vs backfill classification through the real utils.sync.lanes.classify_sync_lane / reverse ordering / burst ages, replay guards (prod hosts, non-staging hosts, m5), per-owner serial sends with impersonation headers, manifest binding for seeded fresh uploads, mirror→manifest→population→replay byte round trip.
  • scripts/scan_import_time_side_effects.py clean on the new modules; .github/scripts/check_dead_code.py --area backend ok.
  • Not yet run against staging (lane 2's bucket, key and admin key pending).

Prod data read (this slice)

prod-operator, David's own prefixes only, list + object metadata only (no audio read): omi-private-cloud-sync chunks/ 73,723 objects (16,300 conversations, 2026-04-16..10-19) and syncing-local syncing/ 20,318 objects (20,155 raw pendant uploads, 6,558 upload jobs). Aggregates recorded in the workspace lane04 record; no uid or names.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

Git-on-my-level and others added 2 commits October 19, 2026 13:31
…ver (lane 4)

Swarm lane 4 (legacy-retire), contracts (i) and (j) inputs.

- testing/loadgen/profile.json + refresh_profile.py: prod upload arrival
  shape from ro-prod Prometheus aggregates only (k>=20 floor, no uids):
  ~219 accepted uploads/min, hour-of-day curve, platform and lane mix,
  recording-age CDFs, VAD speech share. Unmeasured fields stay under
  `assumed` with their basis.
- testing/loadgen/population.py: deterministic pseudo-owner population
  (steady/burst/reverse/shuffled), relative time shifts so names are minted
  at send time, silence pads and near-silent files, backlog share from the
  profile, N-owner burst mode.
- testing/loadgen/mirror_codec.py: staging-mirror envelope (AES-GCM, key
  from the staging-only secret, object name as AAD), byte-compatible prod
  per-uid decrypt with an explicit secret, chunk/raw upload -> WAL upload
  bodies without decoding, pendant `opus_fs320` filename support.
- scripts/staging/mirror_owner_recordings.py: owner pinned by three
  David-only prod allowlists, read-only prod facade (list/get), plaintext
  only in memory, sealed copies to based-hardware-dev-staging-mirror,
  aggregate-only run record.
- scripts/staging/replay.py: plan/run CLI through the real
  /v2/sync-local-files (+ capture manifest for fresh device-bound uploads,
  seeded only behind the staging fence); refuses non-staging targets and
  any host other than in-cluster or m1-mac-studio.
- testing/loadgen/staging_replay_job.yaml: in-cluster Job template.

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

chatgpt-codex-connector Bot commented Oct 19, 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 ⚠️ Failed 2026-10-19T07:24:19.131198Z ce0a275 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 96a1932 into integration/legacy-retire Oct 19, 2026
25 checks passed
@Git-on-my-level
Git-on-my-level deleted the lr/04-mirror branch October 19, 2026 07:49
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