Skip to content

v0.7.43: ci and connector fixes#5882

Merged
waleedlatif1 merged 3 commits into
mainfrom
staging
Jul 23, 2026
Merged

v0.7.43: ci and connector fixes#5882
waleedlatif1 merged 3 commits into
mainfrom
staging

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

…#5881)

* fix(ci): unblock the deploy chain — explicit need results on jobs downstream of test-build

test-build's needs chain now contains dedup-promotion, which is skipped on
every push event. A skipped transitive ancestor fails the implicit success()
on downstream jobs, so migrate, promote-images, create-ghcr-manifests,
process-docs, and create-release all cascade-skipped on push runs — blocking
staging and main deploys (no ECR tag push, no CodeDeploy). Each of those jobs
now uses !cancelled() plus explicit needs.<job>.result == 'success' checks,
preserving their original semantics while ignoring the skipped ancestor.

* chore(ci): remove the promotion-dedup gate — savings don't justify deploy-graph complexity

The bespoke dedup job hand-rolled what content-addressed caching solves
idiomatically, saved only ~$50-90/mo, and its needs edge just caused the
deploy-chain skip incident. test-build returns to its original shape; the
explicit need-result conditions on the deploy chain stay as hygiene.
…#5880)

* fix(confluence): exclude archived pages from KB connector listings so reconciliation purges them

* fix(connectors): purge archived/deleted source items across seven more KB connectors

The sync engine only purges a knowledge-base document when its source item is
absent from a full-sync listing, so any connector that keeps listing
archived/trashed/canceled items never drops them. An audit of all 51 connectors
found seven with this bug:

- asana: list only non-archived projects (the API returns both when `archived`
  is omitted), so tasks under archived projects stop being re-listed
- google-sheets: skip a spreadsheet Drive reports as trashed, which stays
  readable by id for 30 days before the Sheets call starts 404ing
- incidentio: exclude canceled incidents by default (cancelling is incident.io's
  documented stand-in for deletion), with an explicit opt-in to sync them
- outlook: exclude Deleted Items from the all-mail listing, which Graph
  otherwise includes
- servicenow: drop retired knowledge articles, which the Table API returns with
  no implicit state filter
- webflow: drop archived CMS items, which the staged items endpoint always
  returns and offers no way to filter
- youtube: drop playlist entries whose video was deleted or made private, which
  the API keeps returning as placeholder items

Every exclusion keys off an explicit non-current signal and fails open on a
missing field or a failed metadata read, since wrongly excluding a live item
would hard-delete it. Explicit user filter selections are still honoured
verbatim; the new defaults apply only when nothing is configured.

Also flag truncated listings as capped in asana, outlook, and servicenow. All
three silently cut a listing short at their configured item cap without setting
`syncContext.listingCapped`, so reconciliation read the untraversed tail as
deleted at the source and hard-deleted it.

* fix(asana): honour the pinned-project exception on the task rehydrate path

listDocuments deliberately keeps syncing a project the user pinned via the
`project` config field even once it is archived, but getDocument ignored
sourceConfig and applied the all-parents-archived exclusion unconditionally.
For a pinned archived project the listing kept emitting its tasks while every
hydration returned null, so new tasks were dropped as empty and already-indexed
ones were frozen at their last content.

isTaskUnderActiveProject now takes the pinned project gid and keeps any task
reachable through it, matching the listing exactly. The unpinned path is
unchanged and still fails open on missing/non-boolean archived values.

* fix(connectors): key removal on explicit source signals, never on absence

Follow-up to the connector purge fixes, from an independent audit.

YouTube inferred deletion from absence: a playlist entry whose id was missing
from a `videos.list` response was dropped, so a well-formed 200 that returned 49
of 50 requested ids hard-deleted the 50th. Playlist items instead carry a
documented `status.privacyStatus`, available as a free part on a call the
connector already makes, so the extra `videos.list` request is gone along with
its quota-failure and pagination-wedge risks. An item is now excluded only on an
explicit `private`; missing, empty, or unrecognized values keep it.

ServiceNow read every record through a guard requiring a string `sys_id`, but
the listing requests `sysparm_display_value=all`, under which every field —
`sys_id` included — comes back as `{display_value, value}`. The guard rejected
every record, so the retired-article filter was unreachable and the sys_id
object would have leaked into `externalId` and `title` had it not been. Records
are now read through the existing `rawValue` normalizer, which accepts both wire
shapes, and the fixtures use the shape the API actually returns.

Also: resolve the ServiceNow cap ambiguity with `X-Total-Count` so a table that
ends exactly on a page boundary is not read as truncated; stop the Google Sheets
comment claiming a purge the engine's zero-document guard prevents; and assert
the Outlook junk-mail invariant instead of comparing a constant to itself.

Document the behavior change: content archived, retired, or trashed at the
source is now removed from the knowledge base, and restoring it re-ingests it.
@vercel

vercel Bot commented Jul 23, 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 Jul 23, 2026 6:14am

Request Review

@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Connector listing changes can purge KB documents on the next full sync (especially Asana archived projects), and CI deploy gating changes affect whether migrations/promotions run after skipped jobs.

Overview
CI drops the dedup-promotion job that skipped duplicate test runs on staging/main promotion PRs, and simplifies test-build gating. Downstream jobs (migrate, promote-images, create-ghcr-manifests, process-docs, create-release) now require explicit !cancelled() plus needs.<job>.result == 'success' so a skipped upstream job no longer silently blocks the deploy chain.

Knowledge connectors treat source content that is no longer “current” like deletions: it is filtered out of listings (and often on getDocument) so deletion reconciliation can remove stored docs. Coverage includes Asana (archived projects/tasks, maxTaskslistingCapped), Confluence (status=current / isCurrentContent), Google Sheets (Drive trash), incident.io (default exclude canceled, new config labels), Outlook “All Mail” (Deleted Items subtree), ServiceNow KB (retired, sysparm_display_value=all parsing), Webflow (isArchived), and YouTube (private playlist items, safer videos.list trust). Docs add a “Content Removed From View” section and expand the deleted-document FAQ.

Large Vitest suites exercise the new filters, pagination when pages filter to empty, and cap/truncation flags.

Reviewed by Cursor Bugbot for commit 874e742. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR restores the deployment chain and removes retired source content from knowledge-base connectors. The main changes are:

  • Remove the promotion-run deduplication job and add explicit deployment dependency checks.
  • Filter archived, retired, trashed, cancelled, deleted, and private source items.
  • Protect deletion reconciliation when connector listings are capped or incomplete.
  • Add connector tests and document the new removal behavior.

Confidence Score: 5/5

The changed flow looks mergeable after hardening incident.io category parsing.

  • Deployment jobs now check the direct results they depend on.
  • Connector filters generally fail toward retaining content when provider data is ambiguous.
  • A malformed persisted incident.io category can stop scheduled synchronization.

apps/sim/connectors/incidentio/incidentio.ts

Important Files Changed

Filename Overview
.github/workflows/ci.yml Removes promotion deduplication and makes deploy and release jobs check direct dependency results.
apps/sim/connectors/asana/asana.ts Filters archived projects and protects reconciliation when task limits truncate a listing.
apps/sim/connectors/confluence/confluence.ts Limits listing and hydration to current Confluence content.
apps/sim/connectors/google-sheets/google-sheets.ts Detects trashed spreadsheets across listing, hydration, and configuration validation.
apps/sim/connectors/incidentio/incidentio.ts Excludes cancelled incidents by default, but assumes the persisted category value is always a string.
apps/sim/connectors/outlook/outlook.ts Excludes messages under Deleted Items during mailbox-wide synchronization.
apps/sim/connectors/servicenow/servicenow.ts Excludes retired articles and normalizes object-valued ServiceNow fields.
apps/sim/connectors/webflow/webflow.ts Filters archived CMS items from listing and hydration.
apps/sim/connectors/youtube/youtube.ts Removes explicitly private videos and blocks reconciliation on ambiguous batch responses.

Comments Outside Diff (1)

  1. apps/sim/connectors/incidentio/incidentio.ts, line 105-106 (link)

    P2 Malformed Category Crashes Sync

    If an existing or API-created connector stores a non-string statusCategory, this changed default-filter path calls .trim() on that value and aborts the full sync before listing incidents. Normalize or validate the persisted value before using string methods so malformed legacy configuration reports a configuration error instead of repeatedly failing scheduled syncs.

Reviews (1): Last reviewed commit: "fix(connectors): purge archived/deleted ..." | Re-trigger Greptile

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 874e742. Configure here.

Comment thread apps/sim/connectors/google-sheets/google-sheets.ts
)

* fix(knowledge): purge trashed Google Sheets tabs on a normal sync

Trashing a spreadsheet made listDocuments return an empty listing,
but the sync engine's zero-document guard skips deletion
reconciliation whenever a listing comes back empty and documents
already exist — it can't tell a genuinely empty source apart from a
provider outage. For a single-spreadsheet connector, trashing its
one source item empties the entire listing, so the guard always
fired and the stale tabs never got cleaned up on a normal sync,
contradicting the documented behavior.

Add shouldSkipEmptyListing, mirroring shouldReconcileDeletions: a
connector can now set syncContext.sourceConfirmedEmpty when it has
positively confirmed the empty result against the source (not
merely inferred it from an empty listing page), letting
reconciliation proceed. The Google Sheets connector sets this flag
when it confirms the spreadsheet is trashed via a direct Drive
metadata lookup. No other connector sets it, so this doesn't change
behavior anywhere else.

* fix(knowledge): let sourceConfirmedEmpty also bypass the mass-deletion safety threshold

The zero-document guard bypass alone wasn't enough: for a trashed
spreadsheet with more than 5 tabs, reconciliation would proceed but
the separate mass-deletion ratio guard (>50% deleted, >5 docs) still
blocked the actual delete on a normal sync, requiring a forced full
resync anyway. Extracted the ratio guard into
exceedsDeletionSafetyThreshold, mirroring shouldSkipEmptyListing, so
a connector's positive source confirmation bypasses both guards
consistently.
@waleedlatif1
waleedlatif1 merged commit 578d9dd into main Jul 23, 2026
29 checks passed
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