Skip to content

fix(knowledge): stabilize skipped connector documents - #7130

Merged
waleedlatif1 merged 1 commit into
stagingfrom
codex/stable-connector-skips
Aug 26, 2026
Merged

fix(knowledge): stabilize skipped connector documents#7130
waleedlatif1 merged 1 commit into
stagingfrom
codex/stable-connector-skips

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • reuse the same replacement rule for listing-time and hydration-time skipped documents
  • persist a rediscovered skip when the existing row is already a content-less failed placeholder
  • keep last-known-good indexed content unless a connector explicitly declares the skip authoritative
  • preserve every existing retry path, including same-hash placeholder hydration

Production evidence

A production GitHub sync reported previously recorded binary placeholders as source failures after the ingestion hardening rollout. Trigger traces showed successful listing and processing dispatch, while persisted state showed the reported failures were existing binary placeholders rather than GitHub API or child-processing failures. The hydration path rediscovered an intentional binary skip but, unlike the equivalent listing-time path, treated the content-less existing row as an unverified indexed refresh.

Why this is minimal

The correction extracts the existing skip-replacement predicate and reuses it after deferred hydration. Existing content-less placeholders continue to rehydrate so providers with weak or absent modification metadata can recover. A rediscovered intentional skip is persisted and counted as docsSkipped; indexed last-known-good content is still retained unless the connector opts into authoritative replacement. No provider-specific suppression, retry change, or alert filtering is added.

Validation

  • 45 connector/sync test files, 1,416 tests passed
  • monorepo lint passed (one unrelated pre-existing unused suppression warning)
  • monorepo type-check passed (26 tasks)
  • all 33 repository audits passed
  • block registry audit passed
  • agent-stream docs and skills generators were idempotent

No schema or migration changes.

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 26, 2026 9:46pm

Request Review

@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR aligns deferred-hydration skip handling with listing-time reconciliation while preserving retry behavior for content-less placeholders.

  • Extracts a shared predicate for deciding whether a skipped document replaces an existing record.
  • Applies that predicate after deferred hydration.
  • Adds focused coverage for placeholder, indexed-content, and authoritative-replacement cases.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported retry path remains reachable because unchanged content-less placeholders still enter hydration during normal syncs.

Important Files Changed

Filename Overview
apps/sim/lib/knowledge/connectors/sync-engine.ts Extracts and reuses the skip-replacement predicate during deferred hydration without disabling same-hash placeholder rehydration.
apps/sim/lib/knowledge/connectors/sync-engine.test.ts Adds focused assertions covering content-less placeholders, indexed content retention, and authoritative skip replacement.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Listed external document] --> B{Needs deferred hydration?}
  B -- No --> C[Apply skip replacement predicate]
  B -- Yes --> D[Hydrate document]
  D --> E{Hydration returns skip?}
  E -- No --> F[Continue normal processing]
  E -- Yes --> C
  C --> G{Existing row has no storage key or skip is authoritative?}
  G -- Yes --> H[Persist and count intentional skip]
  G -- No --> I[Retain last-known-good indexed content]
Loading

Reviews (2): Last reviewed commit: "fix(knowledge): stabilize skipped connec..." | Re-trigger Greptile

Comment thread apps/sim/lib/knowledge/connectors/sync-engine.ts Outdated
@waleedlatif1
waleedlatif1 force-pushed the codex/stable-connector-skips branch from 9c819fa to 30745dc Compare August 26, 2026 21:46
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 26, 2026

Copy link
Copy Markdown

@cubic

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 2d4dfcf into staging Aug 26, 2026
25 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/stable-connector-skips branch August 26, 2026 21:50
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