Skip to content

test(mobile-perf): upload-success window, sparse scoring, semantics knob; lag stalls name work in flight - #23910

Closed
Git-on-my-level wants to merge 2 commits into
mainfrom
lane/iphone-perf-harness2
Closed

Git-on-my-level wants to merge 2 commits into
mainfrom
lane/iphone-perf-harness2

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Why

Follow-on to #23859. The device harness could not reproduce the field's worst stall cluster: main-isolate stalls are ~20x over-represented right after sync phase boundaries and successful uploads, but the fixture refused every upload. Two sparse windows (cold_start, home_idle_sync_refresh) failed the 15% p90 spread rule on healthy runs (70–164%, 21–36%) because they hold only a handful of frames, so no 3-run batch could become a baseline. The heavy harness also kept the semantics tree on, which is about half of its main-thread time but is only paid by people using assistive tech. Field lag logs said that the main isolate stalled, not what was running.

What

  • Upload-success window: --upload accept --upload-wals N appends wal_sync_upload_success. Synthetic, loopback-only uploads and jobs drive real sync phases, persistence and reconcile. Existing windows keep their names and order.
  • Sparse-window scoring (approved by David 2026-10-28): cold_start, home_idle_sync_refresh and the new upload window are scored as sparse. Cold readiness (cache_ready_us) keeps the 15% spread gate, and every run of a sparse window must stay within a stall budget (at most 2 stalls over 100 ms, totaling 500 ms or less). Frame p90 is still reported for sparse windows. Dense windows keep the unchanged 15% p90 gate, no run is ever dropped, and summaries carry scoring_protocol, so compare refuses older baselines.
  • Semantics knob: heavy perf runs with semantics off by default; --semantics on is a separately recorded dataset, and compare refuses to compare runs whose semantics settings differ.
  • Field stall tags: LagWorkRegistry (bounded slots, begin/end allocate nothing) tags each mobile_lag_stall with overlapping sync, sync phase, upload, reconcile and WAL-load work. Instrumented in SyncProvider and uploadLocalFilesV2/fetchSyncJobStatus with pure try/finally wraps.

Review

GLM (zai/glm-5.3) adversarial review found two issues, both fixed with a regression test:

  1. A direct device transfer after a finished sync opened a phase tag nothing closed. Phase tags now open only inside an admitted _performSync; the new test fails without the fix.
  2. The mostly idle upload window would flake on frame p90. It is now scored as sparse, and its upload and job evidence is validated separately.

Noted, not changed: refuse-mode windows now upload through the fixture gate, which skips production upload telemetry work. That changes the measured workload, so scoring_protocol forces a new baseline.

Evidence

  • python3 -m unittest discover -s app/tool: OK. python3 -m unittest discover -s app/tool/perf -p 'test_*.py': OK.
  • flutter test test/perf test/unit/lag_recorder_test.dart test/providers on main + this commit: 1,260 passed.
  • flutter analyze on the changed Dart files: clean. Profile iOS kernel compile of the integration target passed. Device qualification of the new window is still to come and will be posted here.

Product invariants affected

  • INV-PERF-1 (mobile perf harness fidelity): the scoring protocol changed, as approved; dense-window gates are unchanged and older baselines are refused rather than compared.
  • INV-CAP-1: unaffected. Uploads and sync only gain begin/end tags; there is no control-flow change.

UI-Evidence: none -- perf harness, scoring tools and diagnostic tags only; no rendered UI changed.

Failure-Class: none

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

…nob; tag lag stalls with work in flight

- --upload accept --upload-wals N appends wal_sync_upload_success: synthetic
  uploads and jobs drive real sync phases, persistence and reconcile.
- cold_start, home_idle_sync_refresh and the upload window are sparse: cold
  readiness keeps the 15% spread gate and each run has a stall budget (<=2
  stalls over 100 ms, <=500 ms). Dense windows keep 15% p90; no run dropped.
- Semantics is off for heavy perf by default; --semantics on is a separate
  dataset and compare refuses mixed settings.
- LagWorkRegistry: bounded, allocation-free begin/end; mobile_lag_stall
  records overlapping sync/upload/reconcile/WAL-load work.

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

chatgpt-codex-connector Bot commented Oct 28, 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 🔄 Running since 2026-10-28T17:13:37.195448Z 8d5572f 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0dee88b234

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/tool/perf/test_device_tools.py Resolved
Without one, device_run.main() exits 2 on hosts with no scratch mount, so
the manifest check failed on ordinary Linux checkouts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Folded into survivor #24591 (lane/lcinv, pushed head b8e0b1e0b3). As part of consolidating the open PR batch, origin/main and every other listed PR were merged into the survivor branch; all tests were kept. This PR is being closed as folded — its content lives on in #24591.

Carried as-is: the full perf-harness change set (upload-success window, sparse scoring, semantics knob, lag work registry, heavy_upload_fixture, tooling and tests).

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Hey @Git-on-my-level 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing.

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community!

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