René's URL Explorer Experiment


Title: improvement(knowledge): scan processing recovery per connector and prune finished outbox events by waleedlatif1 · Pull Request #8330 · simstudioai/sim · GitHub

Open Graph Title: improvement(knowledge): scan processing recovery per connector and prune finished outbox events by waleedlatif1 · Pull Request #8330 · simstudioai/sim

X Title: improvement(knowledge): scan processing recovery per connector and prune finished outbox events by waleedlatif1 · Pull Request #8330 · simstudioai/sim

Description: Summary Processing recovery discovered candidates by walking the global (uploaded_at, id) recovery index, joining each document to its knowledge base and connector, and rejecting it only afterwards. Retained inputs of paused or dormant sources sit at the front of that order, so every call read through all of them first. Follow-up batches (NOT IN attempted connectors) walked the same range again Discovery now starts from the eligible connectors and reads each one's oldest candidates through a new partial index doc_connector_processing_recovery_idx (connector_id, uploaded_at, id) with a CROSS JOIN LATERAL, then takes the oldest overall. Paused sources cost nothing. Batch size, the follow-up batches for refused connectors, blocked knowledge bases, the lock-time recheck, and liveness are unchanged, so recovery picks the same candidates as before The old doc_processing_recovery_idx stays for now and is dropped in a later contract migration Outbox retention: outbox_event never deleted completed rows. The outbox processor now prunes completed rows older than 7 days in bounded, SKIP LOCKED batches, only for knowledge.document.processing.recover and knowledge.document.storage.cleanup. Both have random ids, and nothing reads their completed rows. Every other event type is kept, including idempotency-keyed ones and the checkpoint expiry events, whose completed rows are read back by id, as are pending, processing, and dead-letter rows Type of Change Improvement Testing stored-document-recovery.integration.ts: with 5,000 older paused-source documents ahead of a recoverable one, discovery stays under 1,000 buffers (EXPLAIN ANALYZE BUFFERS) and recovers it in one call. The old query read 10,516 buffers a connector whose full batch is refused doesn't block a sibling's candidate in the same call retention.integration.ts: deletes only old completed allowlisted rows and drains past one batch. Removing the status, age, or type filter, or the batch loop, turns it red Migration replayed twice (concurrent build, index valid); check:migrations origin/staging passes Type-check, lint, check:audits, and the recovery, outbox, and document unit suites 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 Processing recovery discovered candidates by walking the global (uploaded_at, id) recovery index, joining each document to its knowledge base and connector, and rejecting it only afterward...

X Description: Summary Processing recovery discovered candidates by walking the global (uploaded_at, id) recovery index, joining each document to its knowledge base and connector, and rejecting it only afterward...

Opengraph URL: https://github.com/simstudioai/sim/pull/8330

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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-controllerpull_requests
route-actionfiles
fetch-noncev2:36ebfaa7-ad79-5f0d-840b-d99ceecb0e56
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC416:9D91A:64D40:915D8:6AFB4969
html-safe-noncef4385a7fa1cec6870f00552f049b49be106d2e293d002623329f508d05b3f986
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDE2OjlEOTFBOjY0RDQwOjkxNUQ4OjZBRkI0OTY5IiwidmlzaXRvcl9pZCI6IjMzODk1MjY3MDA3NTEyNzYzOTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac98bd7619b2f0c8150850ca5ec8de590072a17dabef4c6c78839b46188b39c304
hovercard-subject-tagpull_request:4648577016
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/8330/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Processing recovery discovered candidates by walking the global (uploaded_at, id) recovery index, joining each document to its knowledge base and connector, and rejecting it only afterward...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneacf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release26504db649b58525278f77a52b80ba5f10d5f4de
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/8330/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8330%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8330%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/8330/files
Reloadhttps://github.com/simstudioai/sim/pull/8330/files
Reloadhttps://github.com/simstudioai/sim/pull/8330/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests199 (199)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
improvement/processing-recovery-per-connectorhttps://github.com/simstudioai/sim/tree/improvement/processing-recovery-per-connector
Conversation 11 https://github.com/simstudioai/sim/pull/8330
Commits 2 https://github.com/simstudioai/sim/pull/8330/commits
Checks 31 https://github.com/simstudioai/sim/pull/8330/checks
Files changed https://github.com/simstudioai/sim/pull/8330/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8330/files
improvement(knowledge): scan processing recovery per connector and prune finished outbox events https://github.com/simstudioai/sim/pull/8330/files#top
Show all changes 2 commits https://github.com/simstudioai/sim/pull/8330/files
3af0700 improvement(knowledge): scan processing recovery per connector and pr… waleedlatif1 Sep 26, 2026 https://github.com/simstudioai/sim/pull/8330/commits/3af0700c6dd90efb9033952a8aa3ee0beb398d59
0bc8747 improvement(outbox): prune one bounded batch per type per run waleedlatif1 Sep 26, 2026 https://github.com/simstudioai/sim/pull/8330/commits/0bc8747882ffc3c10597445048014b056761d2b1
Clear filters https://github.com/simstudioai/sim/pull/8330/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8330/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8330/files
processor.test.ts https://github.com/simstudioai/sim/pull/8330/files#diff-cc28ebea18d0cff0a69d7d070b62c59c7c82c4c3fa1f868f0896e96bf7b394bb
processor.ts https://github.com/simstudioai/sim/pull/8330/files#diff-857731712fec55979a7ba76b0bb7bb964c64a40062b5b475d136460d3716cbe3
retention.integration.ts https://github.com/simstudioai/sim/pull/8330/files#diff-7fe62c4d9902e8682974fa0a8549bd61d72ef2a1b16150703434d14b57dc4c63
retention.ts https://github.com/simstudioai/sim/pull/8330/files#diff-219895d477156c3abd1a7c8521715724e5f3aeffa28ebe8608168700a9014502
stored-document-recovery.integration.ts https://github.com/simstudioai/sim/pull/8330/files#diff-7163ab8c4dbf1e9f6bfc6a789516964647d039d52fe966b75264ac0e8c1152f6
processing-recovery.ts https://github.com/simstudioai/sim/pull/8330/files#diff-2f6f9ad334323675ccb3ac6e09f90845c0531ee9a3236de15e951ffdeae56632
storage-cleanup.md https://github.com/simstudioai/sim/pull/8330/files#diff-bc8ed88d57adeb4a5afbd2e67af1e085389f62fa60fb79661e12f406211e92dc
0385_document_connector_processing_recovery_index.sql https://github.com/simstudioai/sim/pull/8330/files#diff-e83a055113d88214e5d2a0a4da2cb724163f9df91b3bf73ca5c9ffa2fddc95a3
0385_snapshot.json https://github.com/simstudioai/sim/pull/8330/files#diff-aa37579ddd8d1ec9d5711fbfa42559dc8d4198ee5291a520d8da41355be7c600
_journal.json https://github.com/simstudioai/sim/pull/8330/files#diff-37150cc65ad16ee6fbc5fa318fc096be7730e16d63eaf863e3df5521b7030649
schema.ts https://github.com/simstudioai/sim/pull/8330/files#diff-9a959e2ce3cb4c86957bbae021d06eae364f7b0cb18964f5873bab53220af928
apps/sim/lib/core/outbox/processor.test.tshttps://github.com/simstudioai/sim/pull/8330/files#diff-cc28ebea18d0cff0a69d7d070b62c59c7c82c4c3fa1f868f0896e96bf7b394bb
View file https://github.com/simstudioai/sim/blob/0bc8747882ffc3c10597445048014b056761d2b1/apps/sim/lib/core/outbox/processor.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8330/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8330/files#diff-cc28ebea18d0cff0a69d7d070b62c59c7c82c4c3fa1f868f0896e96bf7b394bb
https://github.com/simstudioai/sim/pull/8330/files#diff-cc28ebea18d0cff0a69d7d070b62c59c7c82c4c3fa1f868f0896e96bf7b394bb
https://github.com/simstudioai/sim/pull/8330/files#diff-cc28ebea18d0cff0a69d7d070b62c59c7c82c4c3fa1f868f0896e96bf7b394bb
https://github.com/simstudioai/sim/pull/8330/files#diff-cc28ebea18d0cff0a69d7d070b62c59c7c82c4c3fa1f868f0896e96bf7b394bb
https://github.com/simstudioai/sim/pull/8330/files#diff-cc28ebea18d0cff0a69d7d070b62c59c7c82c4c3fa1f868f0896e96bf7b394bb
https://github.com/simstudioai/sim/pull/8330/files#diff-cc28ebea18d0cff0a69d7d070b62c59c7c82c4c3fa1f868f0896e96bf7b394bb
https://github.com/simstudioai/sim/pull/8330/files#diff-cc28ebea18d0cff0a69d7d070b62c59c7c82c4c3fa1f868f0896e96bf7b394bb
apps/sim/lib/core/outbox/processor.tshttps://github.com/simstudioai/sim/pull/8330/files#diff-857731712fec55979a7ba76b0bb7bb964c64a40062b5b475d136460d3716cbe3
View file https://github.com/simstudioai/sim/blob/0bc8747882ffc3c10597445048014b056761d2b1/apps/sim/lib/core/outbox/processor.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8330/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8330/files#diff-857731712fec55979a7ba76b0bb7bb964c64a40062b5b475d136460d3716cbe3
https://github.com/simstudioai/sim/pull/8330/files#diff-857731712fec55979a7ba76b0bb7bb964c64a40062b5b475d136460d3716cbe3
https://github.com/simstudioai/sim/pull/8330/files#diff-857731712fec55979a7ba76b0bb7bb964c64a40062b5b475d136460d3716cbe3
https://github.com/simstudioai/sim/pull/8330/files#diff-857731712fec55979a7ba76b0bb7bb964c64a40062b5b475d136460d3716cbe3
https://github.com/simstudioai/sim/pull/8330/files#diff-857731712fec55979a7ba76b0bb7bb964c64a40062b5b475d136460d3716cbe3
https://github.com/simstudioai/sim/pull/8330/files#diff-857731712fec55979a7ba76b0bb7bb964c64a40062b5b475d136460d3716cbe3
apps/sim/lib/core/outbox/retention.integration.tshttps://github.com/simstudioai/sim/pull/8330/files#diff-7fe62c4d9902e8682974fa0a8549bd61d72ef2a1b16150703434d14b57dc4c63
View file https://github.com/simstudioai/sim/blob/0bc8747882ffc3c10597445048014b056761d2b1/apps/sim/lib/core/outbox/retention.integration.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8330/{{ revealButtonHref }}
apps/sim/lib/core/outbox/retention.tshttps://github.com/simstudioai/sim/pull/8330/files#diff-219895d477156c3abd1a7c8521715724e5f3aeffa28ebe8608168700a9014502
View file https://github.com/simstudioai/sim/blob/0bc8747882ffc3c10597445048014b056761d2b1/apps/sim/lib/core/outbox/retention.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8330/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/8330/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8330/files
apps/sim/lib/knowledge/__integration__/stored-document-recovery.integration.tshttps://github.com/simstudioai/sim/pull/8330/files#diff-7163ab8c4dbf1e9f6bfc6a789516964647d039d52fe966b75264ac0e8c1152f6
View file https://github.com/simstudioai/sim/blob/0bc8747882ffc3c10597445048014b056761d2b1/apps/sim/lib/knowledge/__integration__/stored-document-recovery.integration.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8330/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8330/files#diff-7163ab8c4dbf1e9f6bfc6a789516964647d039d52fe966b75264ac0e8c1152f6
https://github.com/simstudioai/sim/pull/8330/files#diff-7163ab8c4dbf1e9f6bfc6a789516964647d039d52fe966b75264ac0e8c1152f6
https://github.com/simstudioai/sim/pull/8330/files#diff-7163ab8c4dbf1e9f6bfc6a789516964647d039d52fe966b75264ac0e8c1152f6
https://github.com/simstudioai/sim/pull/8330/files#diff-7163ab8c4dbf1e9f6bfc6a789516964647d039d52fe966b75264ac0e8c1152f6
https://github.com/simstudioai/sim/pull/8330/files#diff-7163ab8c4dbf1e9f6bfc6a789516964647d039d52fe966b75264ac0e8c1152f6
Please reload this pagehttps://github.com/simstudioai/sim/pull/8330/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8330/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.