Fix knowledge connector sync follow-up - #6927
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryHigh Risk Overview Automatic dispatch is stricter: it requires a matching CLI: manual sync is Reviewed by Cursor Bugbot for commit 75cb92c. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
@cursor review |
Greptile SummaryThe PR makes runnable connector source changes queue an immediate synchronization while preserving paused state and preventing active-sync races.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/knowledge/orchestration/connectors.ts | Source updates now persist durable sync intent, use optimistic concurrency checks, and await the immediate handoff. |
| apps/sim/lib/knowledge/connectors/queue.ts | Automatic dispatch now validates runnable state and expected due time and uses due-time-based idempotency. |
| apps/sim/lib/knowledge/connectors/sync-engine.ts | Synchronization acquires an authoritative connector snapshot under the lock and guards automatic work and terminal writes. |
| apps/sim/lib/knowledge/application/connectors.ts | Connector updates now resolve billing attribution required for source-change synchronization. |
| apps/sim/connectors/linear/linear.ts | Linear requests now use the shared authorization formatter for personal API keys and OAuth tokens. |
| packages/sim-cli/src/contract/commands.ts | Knowledge connector commands are reorganized under the corrected nested CLI hierarchy. |
Sequence Diagram
sequenceDiagram
participant Caller
participant Update as Connector update
participant DB
participant Queue
participant Worker
Caller->>Update: Replace sourceConfig
Update->>DB: CAS update sourceConfig + due marker
DB-->>Update: Updated connector
Update->>Queue: Dispatch with expected due time
Queue->>DB: Verify due marker and runnable status
Queue->>Worker: Enqueue idempotent sync
Worker->>DB: Acquire sync lock and return current row
Worker->>Worker: Sync using locked sourceConfig snapshot
Worker->>DB: Write terminal state if lock still owned
Update-->>Caller: Updated connector or dispatch failure
Reviews (6): Last reviewed commit: "Merge origin/staging into fix/kb-connect..." | Re-trigger Greptile
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
1 issue from previous review remains unresolved.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 335c015. Configure here.
|
@cursor review |
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit ea8b877. Configure here.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 5d0ac9c. Configure here.
…ync-followup # Conflicts: # apps/sim/background/knowledge-connector-sync.ts # apps/sim/lib/knowledge/connectors/queue.test.ts # apps/sim/lib/knowledge/connectors/queue.ts # apps/sim/lib/knowledge/connectors/sync-engine.ts # apps/sim/lib/knowledge/orchestration/connectors.test.ts # apps/sim/lib/knowledge/orchestration/connectors.ts

Summary
sim knowledge connectors syncand fix nested connector document commandsType of Change
Testing
Checklist