Skip to content

fix(knowledge): resolve Drive shortcuts during connector sync - #7701

Merged
waleedlatif1 merged 1 commit into
stagingfrom
codex/fix-drive-shortcut-sync
Sep 10, 2026
Merged

fix(knowledge): resolve Drive shortcuts during connector sync#7701
waleedlatif1 merged 1 commit into
stagingfrom
codex/fix-drive-shortcut-sync

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

  • Resolve Google Drive file shortcuts using current target metadata, download/export the target with its resource key, and preserve the shortcut's document identity.
  • Detect target-only edits and access changes with bounded metadata requests and a paginated shortcut pass alongside the member change feed. Require access to both the shortcut and target when mirroring permissions; leave unchanged content unprocessed.
  • Preserve provider error classifications so unsupported downloads and quota responses are not mislabeled as permission failures.

Type of Change

  • Bug fix

Testing

  • Connector and KB Vitest regression suites.
  • Three end-to-end scenarios with disposable PostgreSQL, real storage, PDF parsing, indexing, and authorized search: failed-row recovery and target edits, mirrored ACL changes, and member access revocation/restoration. Drive and embedding responses use synthetic fixtures.
  • App type checking, repository lint, all 46 audits (including API validation), generated-artifact checks, and secret/incident-data scan.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 10, 2026 12:13am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with shortcut resolution, access revocation, pagination, and provider error behavior handled consistently.

Summary

  • Resolves current target metadata and resource keys before downloading or exporting content.
  • Incorporates target metadata and permissions into content hashes and mirrored ACL requirements.
  • Adds resumable shortcut sweeps after Drive change-feed processing to detect target-only edits and access changes.
  • Preserves structured provider error categories in connector diagnostics.
  • Adds focused unit and end-to-end regression coverage for hydration, permissions, recovery, pagination, and target changes.

Diagram

sequenceDiagram
    participant Sync as Connector sync
    participant Drive as Google Drive API
    participant Shortcut as Shortcut metadata
    participant Target as Target file
    participant Index as Knowledge index

    Sync->>Drive: List files or changes
    Drive-->>Sync: Shortcut identity and target reference
    Sync->>Target: Read current metadata with resource key
    Target-->>Sync: MIME type, modification time, size, permissions
    Sync->>Sync: Build hash from shortcut and target metadata
    Sync->>Sync: Require both shortcut and target ACL clauses
    alt Content changed
        Sync->>Target: Download or export target
        Target-->>Sync: Target bytes
        Sync->>Index: Update shortcut document content
    else Content unchanged
        Sync->>Index: Refresh visibility without re-embedding
    end
    Sync->>Drive: Paginated shortcut sweep
    Drive-->>Sync: Target-only edits and access changes
Loading

Reviews (1) · Last reviewed commit: "fix(knowledge): resolve Drive shortcuts ..."

@waleedlatif1
waleedlatif1 merged commit c723a3a into staging Sep 10, 2026
33 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/fix-drive-shortcut-sync branch September 10, 2026 00:42
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.

2 participants