Repository navigation
legacy-retire C6 (draft, deletion): retire POST /v1/sync-local-files - #22501
Merged
Merged
Conversation
…-local-files 410 (lane 10 slice 2b) routers/sync.py: no legacy job outside on (fence for legacy-owned content, 409 retry-later otherwise), legacy-fresh skipped, sequencer registration and pre-sequencer migration only at on, dark sweep stops claims but keeps enrichment and summary-debt repair, dark wake 200. uid_sequencer: kick/sweep inert in dark. /v1/sync-local-files returns 410 (7-day census: zero calls); its v1-only tests are removed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # backend/utils/sync/uid_sequencer.py
# Conflicts: # config/feature-flags.yaml
… 410 in slice 2b Co-Authored-By: Claude Opus 5.5 <[email protected]>
…te is 410) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lr/10-slice2b # Conflicts: # config/feature-flags.yaml
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n def Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…listed like test_sync_cloud_tasks Co-Authored-By: Claude Opus 5.5 <[email protected]>
…oves to the C6 deletion PR (lead ruling (a)) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…v1 census by app_build, 12h soak and David's go Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lr/10-delete-v1 # Conflicts: # backend/routers/sync.py # backend/tests/unit/test_legacy_dark_router.py # backend/tests/unit/test_stt_cap_dispatch_http.py
…lr/10-delete-v1 # Conflicts: # backend/tests/unit/test_legacy_dark_router.py
Merge the original C6 draft with current main, retaining only the authenticated 410 retirement stub and removing v1-only tests. Preserve newer router changes. Production release remains gated on p90 and the 12h legacy-dark evidence. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preserve the current CI download fix and inherited retirement review fixes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preserve the current CI download fix and inherited retirement review fixes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve two test conflicts by keeping the C6 deletion of v1-only cases that main had added or edited after the last restack. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… retirement Luna round 1 on #22501 (P2): C6 deleted the shared header assertion along with v1. Restore it scoped to the v2 handler; the v1 route is a 410 stub. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level
marked this pull request as ready for review
November 1, 2026 06:51
There was a problem hiding this comment.
2 issues found across 15 files
Confidence score: 5/5
test_legacy_dark_router.pydoes not verify the required successorLinkheader, so clients could lose the migration path without the test catching it. Assert its exact value alongsideDeprecation.- The comment in
backend/routers/sync.pystill describes the removed mixed-return v1 implementation. Update it to describe the always-410JSONResponsestub.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="backend/tests/unit/test_legacy_dark_router.py">
<violation number="1" location="backend/tests/unit/test_legacy_dark_router.py:242">
P2: This test does not protect the required successor `Link` header. Assert its exact value alongside `Deprecation` so clients retain the migration path.</violation>
</file>
<file name="backend/routers/sync.py">
<violation number="1" location="backend/routers/sync.py:566">
P3: The comment above this route still describes the removed mixed-return v1 implementation. Update it to describe the always-410 `JSONResponse` stub so future readers do not infer removed behavior.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| response = module.sync_local_files(uid='test-uid') | ||
| assert response.status_code == 410 | ||
| assert json.loads(response.body)['code'] == 'sync_v1_retired' | ||
| assert response.headers['deprecation'] == 'true' |
There was a problem hiding this comment.
P2: This test does not protect the required successor Link header. Assert its exact value alongside Deprecation so clients retain the migration path.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/tests/unit/test_legacy_dark_router.py, line 242:
<comment>This test does not protect the required successor `Link` header. Assert its exact value alongside `Deprecation` so clients retain the migration path.</comment>
<file context>
@@ -233,6 +233,17 @@ async def test_dark_wake_does_not_kick(monkeypatch):
+ response = module.sync_local_files(uid='test-uid')
+ assert response.status_code == 410
+ assert json.loads(response.body)['code'] == 'sync_v1_retired'
+ assert response.headers['deprecation'] == 'true'
+ finally:
+ _restore(saved)
</file context>
Suggested change
| assert response.headers['deprecation'] == 'true' | |
| assert response.headers['deprecation'] == 'true' | |
| assert response.headers['link'] == '</v2/sync-local-files>; rel="successor-version"' |
| lane_decision.trust.value, | ||
| lane_decision.maximum_age_seconds, | ||
| lane_decision.reason, | ||
| @router.post("/v1/sync-local-files", deprecated=True, status_code=410) |
There was a problem hiding this comment.
P3: The comment above this route still describes the removed mixed-return v1 implementation. Update it to describe the always-410 JSONResponse stub so future readers do not infer removed behavior.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/routers/sync.py, line 566:
<comment>The comment above this route still describes the removed mixed-return v1 implementation. Update it to describe the always-410 `JSONResponse` stub so future readers do not infer removed behavior.</comment>
<file context>
@@ -563,467 +563,17 @@ def download_audio_file_endpoint(
- lane_decision.trust.value,
- lane_decision.maximum_age_seconds,
- lane_decision.reason,
[email protected]("/v1/sync-local-files", deprecated=True, status_code=410)
+def sync_local_files(uid: str = Depends(auth.get_current_user_uid)):
+ """Retired by legacy-retire C6; v2 is the successor and the client retains local audio."""
</file context>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Retire
POST /v1/sync-local-filesto an authenticated HTTP 410sync_v1_retiredresponse withDeprecationand successorLinkheaders. The client keeps its audio. V2 upload, polling, batch and held-capture recovery behavior remain intact.Refreshed 2026-11-01 (planc, Plan C owner). Current
origin/mainis merged into the original C6 ancestry with a merge commit (no rebase, no force-push). Two test conflicts were resolved by keeping C6's deletion of v1-only cases that main had added or edited since the 10-23 restack (test_sync_cloud_tasks.py,test_stt_cap_dispatch_http.py).routers/sync.pyauto-merged; the v1 handler is the fixed 410 and nothing else in the route changed.RELEASE HOLD, with a proposed amendment for the lead. The 10-23 hold tied C6 to batch 100% plus a 12h dark soak, like C9–C11. C6 does not touch batch, legacy admission or the sequencer: it only changes a route that has carried zero requests for at least 15 days (census below). planc proposes the lead merge C6 ahead of R100 on the fresh census, so the post-R100 chain is C9 → C10 → C11 only. Until the lead rules, the original hold stands. David's 2026-10-23 go covers C6→C9→C10→C11; the lead alone merges and deploys.
V1 census — 2026-11-01 05:58:23Z (ro-prod, aggregates only)
POST /v1/sync-local-files(exact path, optional trailing slash or query) over 24h and 7d, in both Cloud Run request logs and the external load balancer. Responses were field-projected to resource type and status only./v2/sync-local-filesentries are readable in the first hour of the 7d window (2026-10-25 05:58Z), so the window is retained.Validation
backend/test.shwithBACKEND_UNIT_TEST_FILE_LIST,omi-heavy,nice -n 19, 4 workers: 637 passed, 0 failed.Product invariants affected
Failure-Class: none
Rollback: revert C6 and deploy its predecessor. A flag cannot restore deleted handler code.
🤖 Generated with Claude Code