Skip to content

fix(sync): remote doc sync — MIME inference and CLI compatibility#9

Merged
feliperun merged 2 commits into
mainfrom
felipe/fix-expert-sync
Jun 9, 2026
Merged

fix(sync): remote doc sync — MIME inference and CLI compatibility#9
feliperun merged 2 commits into
mainfrom
felipe/fix-expert-sync

Conversation

@feliperun

@feliperun feliperun commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Backend accepts expert sync manifest entries with sha256/size only (no local_path), for out-of-band GCS pre-upload
  • Backend guesses MIME type from file extension instead of defaulting to application/octet-stream (fixes Gemini Context Cache INVALID_ARGUMENT)
  • CLI sends mime_type in manifest and drops forbidden extra keys (agent_id, schema_version)
  • CLI diff table accepts backend responses with string paths and maps changedupdated
  • Adds RFC draft for a generic Google Drive connector (docs/rfc/google-drive-connector.md)

Test plan

  • ruff check on changed files
  • Manual expert sync against Cloud Run with pre-uploaded GCS docs
  • Context Cache rebuild succeeds with text/markdown MIME
  • CI (pytest, mypy)

feliperun and others added 2 commits June 6, 2026 05:26
…ovided

The `expert sync` CLI sends manifest entries without a `local_path` field,
which caused `DocsSyncService._manifest_from_payload` to raise a `ValueError`
and return a 500/422 error. This relaxes `LocalFile` (extra="ignore")
and accepts CLI payloads assuming the files were uploaded separately.

Co-authored-by: Cursor <cursoragent@cursor.com>
Guess MIME from file extension when the CLI posts sha256/size without local
paths, include mime_type in the sync manifest, and render backend diff
responses that list paths as strings. Add RFC for a generic Drive connector.

Co-authored-by: Cursor <cursoragent@cursor.com>
@feliperun feliperun changed the title fix(docs): allow missing local_path in sync payload if sha256/size provided fix(sync): remote doc sync — MIME inference and CLI compatibility Jun 9, 2026
@feliperun feliperun merged commit 83c1954 into main Jun 9, 2026
4 checks passed
@feliperun feliperun deleted the felipe/fix-expert-sync branch June 9, 2026 21:10
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