Skip to content

legacy-retire C6 (draft, deletion): retire POST /v1/sync-local-files - #22501

Merged
Git-on-my-level merged 26 commits into
mainfrom
lr/10-delete-v1
Nov 1, 2026
Merged

Git-on-my-level merged 26 commits into
mainfrom
lr/10-delete-v1

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Retire POST /v1/sync-local-files to an authenticated HTTP 410 sync_v1_retired response with Deprecation and successor Link headers. 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/main is 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.py auto-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)

  • Zero 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.
  • Oldest-edge control: /v2/sync-local-files entries are readable in the first hour of the 7d window (2026-10-25 05:58Z), so the window is retained.
  • Caveat: Cloud Run 2xx request logs are sampled; non-2xx are not. Together with the 10-23 census (zero over 7d), this is about 15 days with no sampled success and no unsampled failure.
  • Repeat this census immediately before merge.

Validation

  • Refreshed head: 13 changed unit test files through backend/test.sh with BACKEND_UNIT_TEST_FILE_LIST, omi-heavy, nice -n 19, 4 workers: 637 passed, 0 failed.
  • 10-23 evidence still applies to the unchanged C6 source: independent Luna review with no P0/P1; hermetic HTTP smoke (missing auth 401, authenticated multipart upload 410 with deprecation/successor headers and no stored audio).
  • CI on the refreshed head is authoritative; checks below.

Product invariants affected

  • INV-DATA-1: 410 returns without consuming client audio; no data deletion.
  • INV-MEM-4: only the v1 route retires; v2 memory behavior remains.

Failure-Class: none

Rollback: revert C6 and deploy its predecessor. A flag cannot restore deleted handler code.

🤖 Generated with Claude Code

Git-on-my-level and others added 15 commits October 19, 2026 16:41
…-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
…lr/10-slice2b

# Conflicts:
#	config/feature-flags.yaml
…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
Base automatically changed from integration/legacy-retire to main October 21, 2026 23:49
Git-on-my-level and others added 5 commits October 23, 2026 13:56
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
Git-on-my-level marked this pull request as ready for review November 1, 2026 06:51

@cubic-dev-ai cubic-dev-ai 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.

2 issues found across 15 files

Confidence score: 5/5

  • test_legacy_dark_router.py does not verify the required successor Link header, so clients could lose the migration path without the test catching it. Assert its exact value alongside Deprecation.
  • The comment in backend/routers/sync.py still describes the removed mixed-return v1 implementation. Update it to describe the always-410 JSONResponse stub.
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'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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"'

Comment thread backend/routers/sync.py
lane_decision.trust.value,
lane_decision.maximum_age_seconds,
lane_decision.reason,
@router.post("/v1/sync-local-files", deprecated=True, status_code=410)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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>

@Git-on-my-level
Git-on-my-level merged commit 2804a77 into main Nov 1, 2026
63 checks passed
@Git-on-my-level
Git-on-my-level deleted the lr/10-delete-v1 branch November 1, 2026 06:55
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