Title: fix(account-deletion): resume the workspace storage sweep from its saved listing position by waleedlatif1 · Pull Request #9159 · simstudioai/sim · GitHub
Open Graph Title: fix(account-deletion): resume the workspace storage sweep from its saved listing position by waleedlatif1 · Pull Request #9159 · simstudioai/sim
X Title: fix(account-deletion): resume the workspace storage sweep from its saved listing position by waleedlatif1 · Pull Request #9159 · simstudioai/sim
Description: Summary Follow-up to #9146, from the v0.9.26 release review (#9155). The durable workspace storage sweep kept its listing position only in memory and checkpointed just the storage family. When a run stopped at its deadline, the next run listed that family again from page one. The failure: if the first pages hold only objects a surviving reference still names, every run re-walks them and deletes nothing, so each run spends an outbox attempt. The event then dead-letters and leaves later unreferenced objects behind. That is an erasure-completeness gap, never live-data loss. Saving the position The sweep checkpoints { family, pageToken } and resumes that family from the saved token. Finishing a family writes pageToken: null, because the checkpoint merges with jsonb ||. A run whose only progress is a moved position continues without spending an attempt, up to MAX_POSITION_RESUMES (1000, counted in the payload). Past that, attempts bound it, so the sweep always terminates even if a provider cursor misbehaved. If listing from a saved token fails, the family lists again once from the start in the same run. That restart never counts as progress; aborts and deadlines are rethrown. A local page token outside the prefix (e.g. a cloud token left by a provider switch) is rejected instead of skipping keys. Unchanged Every guard still runs on resumed pages: the prefix boundary, the sidecar owner, the reference guard, and the workspace re-check before each delete. Deletion semantics and Project cleanup. Payloads queued by the previous version (no pageToken, no resumes) parse as starting the family. Older code ignores the new fields and restarts the family, which is its existing behavior. Type of Change Bug fix Testing Unit tests on real local storage cover: 1000 kept objects before unkept ones: reached and deleted over several runs without spending attempts; resume from a saved token; invalid saved token → restart; a restart that walks only kept objects spends an attempt; the resume cap; a foreign local token; parser rejections. Each guard was reverted and its test went red. lib/users/storage-sweep.integration.ts (real Postgres) passes locally. An independent adversarial review found and fixed a termination gap (the resume cap) before this PR opened. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced
Open Graph Description: Summary Follow-up to #9146, from the v0.9.26 release review (#9155). The durable workspace storage sweep kept its listing position only in memory and checkpointed just the storage family. When a ru...
X Description: Summary Follow-up to #9146, from the v0.9.26 release review (#9155). The durable workspace storage sweep kept its listing position only in memory and checkpointed just the storage family. When a ru...
Opengraph URL: https://github.com/simstudioai/sim/pull/9159
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:dc07a663-98cc-e7d1-2dc8-04289e35e6a4 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E496:7C051:9F45C7:DBE918:6AFB501A |
| html-safe-nonce | 8d073d51d395a82a405e1820a09620d9d6ade537757376fce5e625f077655947 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDk2OjdDMDUxOjlGNDVDNzpEQkU5MTg6NkFGQjUwMUEiLCJ2aXNpdG9yX2lkIjoiMzc2NjE1NzIwMTg5MDgyNDIxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c548dba79b69cd1a4dcad4c0ee8ce5e8bd39fa8582fb95efd808968f4ed38d8c |
| hovercard-subject-tag | pull_request:4896220531 |
| 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/9159/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 #9146, from the v0.9.26 release review (#9155). The durable workspace storage sweep kept its listing position only in memory and checkpointed just the storage family. When a ru... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1 |
| 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 | cbf66c024bb6d10e6955baa7413c54cf13a201bb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width