Title: fix(knowledge): withdraw a queued generation when its Search KB turns dormant by waleedlatif1 · Pull Request #8445 · simstudioai/sim · GitHub
Open Graph Title: fix(knowledge): withdraw a queued generation when its Search KB turns dormant by waleedlatif1 · Pull Request #8445 · simstudioai/sim
X Title: fix(knowledge): withdraw a queued generation when its Search KB turns dormant by waleedlatif1 · Pull Request #8445 · simstudioai/sim
Description: Summary A queued document worker whose knowledge base has become a dormant Search index now gives back its own queue generation before it skips. It clears processingQueuedAt and refunds the attempt its dispatch charged, as clearDocumentsQueued does, and keeps the token as the ownership marker Before this change, the early return left the row pending with a live stamp and a spent attempt. Later dispatches treated the document as already queued until the 4-hour grace window passed, and each such skip used up one of the 5 processing attempts The retirement migration clears stamps only for Search KBs in its frozen snapshot. A KB that becomes a Search index later, through legacy index adoption in ensureSearchKnowledgeBase, keeps any in-flight generations The update is scoped to this invocation's exact generation and to pending rows, so a newer dispatch is never withdrawn or refunded. It is skipped when no generation was supplied Follows up a review finding on #8439 Type of Change Bug fix Testing dormant-search-processing.integration.ts (real Postgres via bun run test:integration): A queued generation for a dormant KB loses its stamp and charged attempt and keeps its token. Red on the previous code A worker from another generation leaves the current stamp and attempts untouched. Red with the generation guard removed lib/knowledge/documents unit suite passes (320 tests) bun run lint, bun run check:audits (52 audits), docs-manifest:check, and type-check pass Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing (new tests pass the test-audit authoring gate) 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 A queued document worker whose knowledge base has become a dormant Search index now gives back its own queue generation before it skips. It clears processingQueuedAt and refunds the attemp...
X Description: Summary A queued document worker whose knowledge base has become a dormant Search index now gives back its own queue generation before it skips. It clears processingQueuedAt and refunds the attemp...
Opengraph URL: https://github.com/simstudioai/sim/pull/8445
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:f4eabeee-0658-684f-b311-70275daf0444 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B348:147092:8D6CB6:C6DAFD:6AFB6EFF |
| html-safe-nonce | 20b6c8f4eed961321bda96bba03be5ec8daa4d8826a8d05ba3bf6afaa02d1089 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzQ4OjE0NzA5Mjo4RDZDQjY6QzZEQUZEOjZBRkI2RUZGIiwidmlzaXRvcl9pZCI6IjIxNDk2MDM3NjE2MTYyODU0MzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a1ea9beb4de4f3dfbd5d72288ea990928c5d76f839a97e7b1ad74f8904355db5 |
| hovercard-subject-tag | pull_request:4684841600 |
| 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/8445/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 A queued document worker whose knowledge base has become a dormant Search index now gives back its own queue generation before it skips. It clears processingQueuedAt and refunds the attemp... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cca289ecd54650fcf3c0b037a58b97186dee2cc4406819d87fab93728fd83700 |
| 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 | 88808b1fae5ab8a526a73e7ce5542a10eb9d6971 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width