Title: fix(file-search): claim owners woken by a file write ahead of backfill reconciliation by waleedlatif1 · Pull Request #9655 · simstudioai/sim · GitHub
Open Graph Title: fix(file-search): claim owners woken by a file write ahead of backfill reconciliation by waleedlatif1 · Pull Request #9655 · simstudioai/sim
X Title: fix(file-search): claim owners woken by a file write ahead of backfill reconciliation by waleedlatif1 · Pull Request #9655 · simstudioai/sim
Description: Summary The backfill walk wakes every owner a page passes so the dispatcher reconciles its builds. Those wake-ups entered the owner queue never dispatched, exactly like an owner the file trigger wakes for a write, and each claim pass takes never-dispatched owners first in enqueue order. A page across many small owners put dozens of wake-ups with nothing to claim ahead of a fresh upload, which then waited several passes (minutes) to be indexed. Owners with pending work that had been dispatched before waited behind every one of them, so a busy workspace could go an hour between turns. Backfill wake-ups now enter the queue as if just dispatched. Write-woken owners are claimed first; the wake-ups still rotate in by dispatch age, so reconciliation and backfill-found work are delayed behind fresh writes but never starved. An owner already queued keeps its place (the upsert is unchanged). Only the backfill enqueue changes. The release, reaper, and trigger paths still enqueue never-dispatched, per-owner (2) and global (100) caps are unchanged, no migration. README notes the ordering. Type of Change Bug fix Testing dispatcher.integration.ts (real PostgreSQL, bun run test:integration dispatcher.integration), three new tests: a write-woken owner is claimed on the next pass behind a page of 250 reconciliation wake-ups — red on the old code (claimed nothing) with one free slot per pass, a fresh write is claimed before work the backfill found, then the backfill work on the next pass — red on the old code (backfill work won, the write was not claimed in two passes) an owner already queued by a write stays ahead of an owner served earlier when a backfill page passes it — red on a mutant whose upsert stamps existing rows writes go through the real workspace_file_search_mark_pending trigger, not hand-written queue rows Whole suite 37/37; also ran owners.integration 18/18, chunks.integration 49/49 (1 opt-in skip), index-plan.integration 9/9, content-rendered.integration 31/31, dispatcher.test.ts + enqueue-dispatch.test.ts 17/17 lint and type-check (pre-push hooks); remaining audits in CI 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 The backfill walk wakes every owner a page passes so the dispatcher reconciles its builds. Those wake-ups entered the owner queue never dispatched, exactly like an owner the file trigger w...
X Description: Summary The backfill walk wakes every owner a page passes so the dispatcher reconciles its builds. Those wake-ups entered the owner queue never dispatched, exactly like an owner the file trigger w...
Opengraph URL: https://github.com/simstudioai/sim/pull/9655
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:23ef4dc3-759f-70e3-3ba4-a679f82fb2af |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9ACC:442D2:15E10F:208B00:6AFB1D4F |
| html-safe-nonce | 60b29b4927169932f9d6e71dd479023b70ef618b6638ac60de96cfb767758ef0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QUNDOjQ0MkQyOjE1RTEwRjoyMDhCMDA6NkFGQjFENEYiLCJ2aXNpdG9yX2lkIjoiMjYxNDg3MTM5MjYyODk3Mjg3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 22ba746efbc6cff927110790423683395bf4e8e870215ab4690ce0ce1b453682 |
| hovercard-subject-tag | pull_request:5147724198 |
| 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/9655/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 The backfill walk wakes every owner a page passes so the dispatcher reconciles its builds. Those wake-ups entered the owner queue never dispatched, exactly like an owner the file trigger w... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 24933791aba0f10b2f189f8b953a1452dd79933933ac13a0a67b8ad3acee3d9f |
| 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 | 030711cc180b563614a434f4376acf7da5d445fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width