Repository navigation
[codex] Propagate private cloud sync through file sync - #7894
Git-on-my-level merged 10 commits into
Conversation
Greptile SummaryThis PR closes a gap where conversations created through file sync (both v1 and v2 paths) were always written with
Confidence Score: 4/5Safe to merge; the change adds a single DB read per sync request and threads a boolean flag through an already-established parameter chain with no side-effects on the merge path. The propagation chain is complete and verified — No files require special attention; Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant sync_local_files as sync_local_files (v1)
participant bg as _run_full_pipeline_background_async (v2)
participant db_executor
participant users_db
participant process_segment
participant process_conversation
Client->>sync_local_files: POST /v1/sync/file
sync_local_files->>db_executor: get_user_transcription_preferences(uid)
db_executor->>users_db: fetch prefs
sync_local_files->>db_executor: get_user_private_cloud_sync_enabled(uid)
db_executor->>users_db: fetch flag
Note over sync_local_files: private_cloud_sync_enabled = bool(result)
sync_local_files->>process_segment: "process_segment(..., private_cloud_sync_enabled=flag)"
process_segment->>process_conversation: "CreateConversation(private_cloud_sync_enabled=flag)"
process_conversation-->>process_segment: "Conversation (audio files assembled if flag=True)"
Client->>bg: POST /v2/sync/file (background)
bg->>db_executor: get_user_transcription_preferences(uid)
bg->>db_executor: get_user_private_cloud_sync_enabled(uid)
Note over bg: private_cloud_sync_enabled = bool(result)
bg->>process_segment: "process_segment(..., private_cloud_sync_enabled=flag)"
process_segment->>process_conversation: "CreateConversation(private_cloud_sync_enabled=flag)"
process_conversation-->>process_segment: "Conversation (audio files assembled if flag=True)"
Reviews (1): Last reviewed commit: "Document storage executor worker count" | Re-trigger Greptile |
kodjima33
left a comment
There was a problem hiding this comment.
Backend feature (propagate private cloud sync through file sync) — approve only per policy.
fd5ff52 to
7ae9883
Compare
kodjima33
left a comment
There was a problem hiding this comment.
Propagate private cloud sync through file sync — approve only (re-approve)
7ae9883 to
962e7f6
Compare
kodjima33
left a comment
There was a problem hiding this comment.
Re-approved on new commits; approve-only per area policy. (auto-review)
|
Thanks @tianmind-studio — nice catch on the v1 gap here. Verified against current The genuinely valuable parts are the v1 The Since this touches data-handling / private-cloud / data-protection-level propagation, I am flagging it for a security + data-handling pass before merge. No issues found on static review: settings are read via the existing trusted DB helpers and propagated correctly ( |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks @tianmind-studio — I did the heightened data-handling/security pass for the private-cloud sync wiring.
I’m approving this. The change is coherent and limited: it carries the existing user private-cloud setting through file sync, adds the missing CreateConversation.private_cloud_sync_enabled field so process_conversation can persist it, and only fetches data_protection_level when private-cloud sync is enabled. I don’t see new dependency/workflow risk, secret exposure, or an exfiltration path; the calls use the existing DB helpers and the final audio-file rebuild is idempotent over stored chunks.
A couple of notes for maintainers before merge:
- The branch is based on an older
main, and the v2/background-path portion already landed via #7981; after rebase, that part should mostly drop to harmless style/no-op changes. - The remaining valuable delta is the v1
sync_local_filespath plus theCreateConversationmodel field and test hardening. - I verified a clean local merge into current
mainand CI is currently green on this head.
No changes requested from my side.
Automated approval dismissed: this PR falls into a category that should receive human maintainer/product/security judgment rather than formal auto-approval. No changes are being requested by this dismissal; prior automated feedback should be treated as an implementation review/positive signal only.
Summary
private_cloud_sync_enabledtoCreateConversationand propagate the user's private-cloud setting through v1/v2 file sync segment processing.Current status
mainatcc06c20fae75e88b15e220d57402f6f47591dd72.962e7f6f55b6856cddab89aca86fcb9266c9d1c0.Validation
backend/:D:\codex-omi-work\.venvs\omi-backend-vad-refresh\Scripts\python.exe -m pytest tests\unit\test_sync_transcription_prefs.py tests\unit\test_sync_v2.py tests\unit\test_conversation_model_split.py tests\unit\test_sync_silent_failure.py tests\unit\test_sync_cloud_tasks.py -q --tb=shortD:\codex-omi-work\.venvs\omi-backend-vad-refresh\Scripts\python.exe -m py_compile models\conversation.py routers\sync.py tests\unit\test_sync_transcription_prefs.py tests\unit\test_sync_v2.py tests\unit\test_conversation_model_split.py tests\unit\test_sync_silent_failure.pyD:\codex-omi-work\.venvs\omi-backend-vad-refresh\Scripts\python.exe -m black --line-length 120 --skip-string-normalization --check models\conversation.py routers\sync.py tests\unit\test_sync_transcription_prefs.py tests\unit\test_sync_v2.py tests\unit\test_conversation_model_split.py tests\unit\test_sync_silent_failure.pyPYTHONUTF8=1 D:\codex-omi-work\.venvs\omi-backend-vad-refresh\Scripts\python.exe backend\scripts\scan_async_blockers.pygit diff --check origin/main...HEADscripts/pre-commitwith the backend Windows venv and local Dart SDK onPATHNot run
tests\unit\test_sync_fair_use_gate.pyin this branch: its Windows lightweight import isolation is handled in [codex] Add Retry-After to sync fair-use restrictions #7893 to avoid duplicating the same test-file changes across PRs.