Title: fix(knowledge): purge trashed Google Sheets tabs on a normal sync by waleedlatif1 · Pull Request #5883 · simstudioai/sim · GitHub
Open Graph Title: fix(knowledge): purge trashed Google Sheets tabs on a normal sync by waleedlatif1 · Pull Request #5883 · simstudioai/sim
X Title: fix(knowledge): purge trashed Google Sheets tabs on a normal sync by waleedlatif1 · Pull Request #5883 · simstudioai/sim
Description: Summary Follow-up to #5880 — Cursor Bugbot flagged (#5882 (comment)) that a trashed Google Sheets spreadsheet never actually gets purged on a normal sync, contradicting the docs. Root cause: the sync engine's zero-document guard skips deletion reconciliation whenever a listing comes back empty and documents already exist, since it can't tell a genuinely empty source apart from a transient provider outage. Google Sheets is a single-spreadsheet-per-connector integration, so trashing the one source item empties the entire listing — the guard fired every time, and only a forced full resync could complete the cleanup. Added shouldSkipEmptyListing to sync-engine.ts, mirroring the existing shouldReconcileDeletions helper: a connector can set syncContext.sourceConfirmedEmpty to vouch that it positively confirmed the empty result against the source (not merely inferred it from an empty listing page). Google Sheets sets this flag when its direct Drive metadata lookup confirms the spreadsheet is trashed. No other connector sets this flag, so behavior everywhere else is unchanged. Type of Change Bug fix Testing Added unit tests for shouldSkipEmptyListing covering: non-empty listing, no existing docs, forced fullSync, default skip behavior, and the new sourceConfirmedEmpty override (including a falsy-value case). Updated Google Sheets connector tests to assert sourceConfirmedEmpty is set only on the trashed path, and left unset on the absent/false/fail-open paths. bun run lint, tsc --noEmit, and the full connectors + lib/knowledge/connectors test suites (411 tests) all pass. 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)
Open Graph Description: Summary Follow-up to #5880 — Cursor Bugbot flagged (#5882 (comment)) that a trashed Google Sheets spreadsheet never actually gets purged on a normal sync, contradicting the docs. Root cause: the s...
X Description: Summary Follow-up to #5880 — Cursor Bugbot flagged (#5882 (comment)) that a trashed Google Sheets spreadsheet never actually gets purged on a normal sync, contradicting the docs. Root cause: the s...
Opengraph URL: https://github.com/simstudioai/sim/pull/5883
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:811365ce-f32d-c4da-e6d5-2c271abc4893 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D8FE:15403D:25FB0F:35BFDD:6A6375D7 |
| html-safe-nonce | 28a1c5b2f2615e63d4ea3780422bd40b5a4c83352331896a6331e65c3d9fd188 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEZFOjE1NDAzRDoyNUZCMEY6MzVCRkREOjZBNjM3NUQ3IiwidmlzaXRvcl9pZCI6IjE1MzI2NjAwNzM0OTk5NDg1MDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4200c6261ce224bce015e515791c589762b38f15c4a870a44be5088693f5e4de |
| hovercard-subject-tag | pull_request:4114006131 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5883/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Follow-up to #5880 — Cursor Bugbot flagged (#5882 (comment)) that a trashed Google Sheets spreadsheet never actually gets purged on a normal sync, contradicting the docs. Root cause: the s... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 15e78334bb345f3864e70c5a376ed0383374123629b9e3022398d9431f6cd8bf |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 51da2d8d0a841a1393b806a6559fa9ad757e1666 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width