Skip to content

SCA-4464: Retire the sync poll-backoff experiment; keep legacy polling - #26390

Merged
Git-on-my-level merged 2 commits into
mainfrom
lane/sca4464-retire
Nov 27, 2026
Merged

Git-on-my-level merged 2 commits into
mainfrom
lane/sca4464-retire

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

SCA-4464 retires the SCA-3504 sync poll-backoff experiment. It removes the cohort selector, experimental pacing hints, and cohort telemetry from authenticated GET /v2/sync-local-files/{job_id}. The legacy response, five-minute custody holds, repair capability, and account-wide poll ceiling remain in place. The existing optional query parameter remains compatible with shipped clients.

Removes SYNC_POLL_BACKOFF_ENABLED and SYNC_POLL_BACKOFF_PERCENT from the Backend, Sync, Integration, and Projection Pump runtime bindings and clears residual bindings from Sync Backfill, dev, and the Helm values. The runtime manifest is regenerated from its declarative sources. The checked-in production Backend overlay still rendered true/5 before this change. The serving Backend was already off according to the issue handoff.

Verification

The authenticated flag_off_poll_client, legacy_poll_status, and custody_poll_status fixtures use a FastAPI test-auth dependency override. The tests compare the queued response byte-for-byte against the flag-off control and check the complete response for all three custody-hold reasons across both surface modes and both repair protocol modes. The durable completion test preserves its existing zero-millisecond hint.

The baseline route suite passed 31 cases, including all 14 new route cases, before the runtime change. After cleanup, 168 focused backend cases passed via omi-heavy run -- bash test.sh. The hermetic backend/scripts/pre-deploy-check.sh passed via omi-heavy, including 707 pytest cases and 45 deploy source-admission tests.

Rollback

Revert this PR. The experiment was already off on the serving Backend before this cleanup.

Product invariants affected

  • INV-MEM-4

Failure class (fixes)

  • Failure-Class: none

View guided diff Turn on auto-fix

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 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-26T12:57:04.362338Z a9cbf83 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 Git-on-my-level left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The legacy queued wire assertion is useful, and the production custody helper preserves the five-minute hold for non-capable clients. I found one fixture fidelity issue in the repair-capable artifact-missing case; see the inline comment. Please correct that durable response before treating custody coverage as verified. GitHub does not allow this account to submit REQUEST_CHANGES because it identifies the account as the PR author, so this is recorded as a comment review.

@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: 43e3dd5afd

ℹ️ 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 backend/utils/sync/poll_limit.py Resolved
@Git-on-my-level
Git-on-my-level merged commit d7d7628 into main Nov 27, 2026
72 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/sca4464-retire branch November 27, 2026 02:30
Git-on-my-level added a commit that referenced this pull request Nov 27, 2026
Git-on-my-level added a commit that referenced this pull request Nov 27, 2026
…poll helper (SCA-4464) (#26483)

## Summary

This fixes a semantic merge conflict that is failing Backend Unit Tests
shard 2 on main. The fix is test only.

- #26390 (SCA-4464) replaced
`routers.sync.sync_job_poll_response(status, uid, surface_open)` with
`with_custody_hold_poll_hint(status)`.
- The receipts/wait account-deletion test from SCA-4084
(`test_sync_receipts_wait_account_deletion.py`) still monkeypatched the
old name. On main carrier `d7d76281`, 6 cases fail with `AttributeError:
module 'routers.sync' has no attribute 'sync_job_poll_response'`.
- The test now patches `with_custody_hold_poll_hint` with an identity
function, the same stand-in it used before. No production code changes.

## Verification (m1, `backend/test.sh`)

- `tests/unit/test_sync_receipts_wait_account_deletion.py`: 6 passed.
- `tests/unit/test_terminal_relevance.py`: 101 passed. It also failed in
that shard and passes on current main.

## Product invariants affected

none

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/26483?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/26483?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26483&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
Git-on-my-level added a commit to Git-on-my-level/omi that referenced this pull request Nov 27, 2026
…letion test

BasedHardware#26390 (SCA-4464) replaced routers.sync.sync_job_poll_response with
with_custody_hold_poll_hint; the account-deletion receipt test added by
SCA-4084 still patched the old name, so main shard 2 failed with AttributeError.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Nov 27, 2026
## What changed and why

Add an Offline sync backlog row to Omi Core Features. The failed upload,
backend-sync revision-wide HTTP 503, and upload age panels use request
or attempt counts. The v2 handler counts valid upload traces by
platform, bounded release build, and whether the oldest recording was
sealed more than six hours ago. Upload age buckets extend to seven days.
Part of SCA-4753.

The merge with main preserves [SCA-4464’s retirement of the poll-backoff
experiment](#26390). It drops
the settlement cohort panel and histogram expansion because the metric
producer was removed. The refusal and upload-age queries are unchanged
by the repair.

## Product invariants affected

none

## How it was verified

- After resolving the merge, 92 tests passed across the sync trace,
legacy poll, and dashboard contract suites. The resolution preserves the
metrics registry from main and removes the dashboard query for the
retired cohort series.
- Six focused backend test files passed during implementation. After the
settlement panel wording revision, 11 dashboard contract tests passed
across the Cloud Monitoring query-shape, query-budget, and absence
suites.
- Before the conflict repair, Promtool evaluated the dashboard queries
with synthetic counters, including mixed histogram layouts. A scrape
check verified the 48-series ceiling per target and the new bucket
bounds.
- On the publication run, 43 local preflight checks and all 40 selected
backend test files passed. The initial push timed out during OpenAPI
verification. The retry reused the completed preflight and unit-test
results, then passed the remaining hook checks, including OpenAPI
compatibility. The shallow clone skipped the 90-day failure-class
history check. Offline alert lint passed during implementation.
- Production evidence follows release. Check the Grafana row, confirm
the new counter for the current build within one hour of serving, and
verify that the upload-age median fits in a finite bucket.

## Tests

`backend/tests/unit/test_sync_capture_end.py` covers the exact six-hour
boundary, bounded build/platform labels, and rejection of invalid
traces.

## UI evidence

UI-Evidence: none -- Internal Grafana dashboard, with production
screenshot due in the serving readback.

## Failure class (fixes)

Failure-Class: none

Line-Count-Exception: backend/routers/sync.py | 4399 -> 4406 | Pass the
existing client headers to the upload trace observer at the
pre-admission call site.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/26474?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/26474?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26474&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
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