René's URL Explorer Experiment


Title: fix(search): bound retrieval and avoid repeated turn admission by icecrasher321 · Pull Request #7888 · simstudioai/sim · GitHub

Open Graph Title: fix(search): bound retrieval and avoid repeated turn admission by icecrasher321 · Pull Request #7888 · simstudioai/sim

X Title: fix(search): bound retrieval and avoid repeated turn admission by icecrasher321 · Pull Request #7888 · simstudioai/sim

Description: Summary Bound document-scoped vector probes with an indexed lookup and disable JIT inside deadline-bound search transactions. Admit Assistant spending once per logical turn. Continuations recheck current access and the original payer's account standing without repeating usage aggregation; cancellation remains available after usage exhaustion. Keep fresh pooled/member usage checks and existing workflow reservations. Remove duplicate organization reads without adding a billing projection, cache, or shared write lock. Build the search lookup index concurrently with interrupted-build recovery through the existing migration machinery. Companion: simstudioai/mothership#505 Deploy this Sim change before the companion. Missing validation purpose preserves the existing new-turn behavior, so the Sim change is compatible with the previous Assistant server. Type of Change Bug fix Testing Billing and background workflow regression suite: 916 tests passed. Callback, ownership, continuation, cancellation and chat lifecycle suites: 123 tests passed. Real PostgreSQL concurrent accounting, charge freshness, migration, concurrent index build and replay tests; real Redis pooled/member admission and duplicate reservation tests passed. Search query/budget unit tests and application/database type checks passed. Synthetic 300,000-chunk integration fixture on 2 CPU / 1 GiB: 24 tests passed, all 32 normal sampled searches completed, and 7 nearest-neighbor recall comparisons matched the exact baseline. Cache-pressured keyword retrieval can still dominate end-to-end latency. Real Drizzle push creates the lookup index concurrently and leaves it unchanged on replay. Full repository lint, all 46 audits, generated-contract checks and migration safety checks passed. Companion: complete Go test suites, race detector, vet, generated contracts, encrypted prompts and license checks passed. 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 Bound document-scoped vector probes with an indexed lookup and disable JIT inside deadline-bound search transactions. Admit Assistant spending once per logical turn. Continuations recheck ...

X Description: Summary Bound document-scoped vector probes with an indexed lookup and disable JIT inside deadline-bound search transactions. Admit Assistant spending once per logical turn. Continuations recheck ...

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

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:1b7c877e-93fd-ebab-e8fc-7ed302d41511
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idAE68:25A7D0:25BB15:35A5B2:6AFB306D
html-safe-nonce81abc3faf9024368881e9e2c1ab209386533c8d35befaa50907b837a0d5382cc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTY4OjI1QTdEMDoyNUJCMTU6MzVBNUIyOjZBRkIzMDZEIiwidmlzaXRvcl9pZCI6Ijg3NjU5NjgwMDMxMjk2MTg1NDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac3d0ec4af28f4055af7f38b65d202e9e2ab1717a10c5db83f35eb26e3c756f6b9
hovercard-subject-tagpull_request:4551298214
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/7888/files
twitter:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
og:image:altSummary Bound document-scoped vector probes with an indexed lookup and disable JIT inside deadline-bound search transactions. Admit Assistant spending once per logical turn. Continuations recheck ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneefe184de15c1d8c1107a340cfc27bf7187b458dc07687ee1fa51f035148fb3d1
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
releasef567cf3af46b50a3211fb5dab569a9d6a7b58025
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/7888/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F7888%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%2F7888%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/7888/files
Reloadhttps://github.com/simstudioai/sim/pull/7888/files
Reloadhttps://github.com/simstudioai/sim/pull/7888/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests198 (198)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
icecrasher321https://github.com/icecrasher321
staginghttps://github.com/simstudioai/sim/tree/staging
codex/fix-search-and-usage-query-costhttps://github.com/simstudioai/sim/tree/codex/fix-search-and-usage-query-cost
Conversation 22 https://github.com/simstudioai/sim/pull/7888
Commits 7 https://github.com/simstudioai/sim/pull/7888/commits
Checks 32 https://github.com/simstudioai/sim/pull/7888/checks
Files changed https://github.com/simstudioai/sim/pull/7888/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7888/files
fix(search): bound retrieval and avoid repeated turn admission https://github.com/simstudioai/sim/pull/7888/files#top
Show all changes 7 commits https://github.com/simstudioai/sim/pull/7888/files
3f1c026 fix(search): bound retrieval and billing query cost Sep 16, 2026 https://github.com/simstudioai/sim/pull/7888/commits/3f1c02608b4122ad585294771a743912df6a17e0
58bec9a refactor(billing): remove unneeded synchronous cost projection Sep 16, 2026 https://github.com/simstudioai/sim/pull/7888/commits/58bec9acfbfd1387a77102c9114cd94d73e86327
8517ff9 Merge remote-tracking branch 'origin/staging' into codex/fix-search-a… Sep 16, 2026 https://github.com/simstudioai/sim/pull/7888/commits/8517ff9cf2a1891783b9d5172c314f90f5f03f85
90e6d14 Merge remote-tracking branch 'origin/staging' into codex/fix-search-a… Sep 16, 2026 https://github.com/simstudioai/sim/pull/7888/commits/90e6d148d42c72e75b1480707a20a079d4a395d9
cac3963 fix(billing): authorize continuations without repeating spend admission Sep 16, 2026 https://github.com/simstudioai/sim/pull/7888/commits/cac396392fc1ed6e3bc1d3e6ea2c35847a749a77
17a22b6 Merge remote-tracking branch 'origin/staging' into codex/fix-search-a… Sep 16, 2026 https://github.com/simstudioai/sim/pull/7888/commits/17a22b609b007130f0cf527df8cbc093da722bde
9393486 fix(test): align session policy fixture with joined billing read Sep 16, 2026 https://github.com/simstudioai/sim/pull/7888/commits/939348682164e17d22c5009d7a6786480b8a4fff
Clear filters https://github.com/simstudioai/sim/pull/7888/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7888/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7888/files
test-build.yml https://github.com/simstudioai/sim/pull/7888/files#diff-a583f7935a5f3192471a2999cbf059eadc857228b5be2c7247f481b799949f8d
route.test.ts https://github.com/simstudioai/sim/pull/7888/files#diff-5f87cf2acbc6646b935f3ead5fee036c12372aac4eb69c4bd164cf27f6d9d7a4
route.ts https://github.com/simstudioai/sim/pull/7888/files#diff-11279d916ce2d7a7a6c2ab9d16a47e66ac95888511d8dbd22152011c075cabf9
route.test.ts https://github.com/simstudioai/sim/pull/7888/files#diff-4f03e697b17af810f8428c6dc0980e4ec5907ce2bc68ea3cb1d2d52ccce701e3
route.ts https://github.com/simstudioai/sim/pull/7888/files#diff-4e7ce8c053e7b762bb5aeab8850204b5951af0a6cc4681376ca96cca2d61b440
copilot.ts https://github.com/simstudioai/sim/pull/7888/files#diff-8b5dc9d30733bae6d14041b210bc4a1aacaa52829dcb1341289cf86395178fd0
session-hooks.test.ts https://github.com/simstudioai/sim/pull/7888/files#diff-be4f30a29c71ff5779ce08a80c7ade4e1c648d4cc0e1b6e6d8c43162cf8d9ac1
usage-reservation.test.ts https://github.com/simstudioai/sim/pull/7888/files#diff-106ada79a84bc56801c9ae6a3bc5239cd5b09a40061f145769957bb0bbee011d
access.test.ts https://github.com/simstudioai/sim/pull/7888/files#diff-d8ce46d4659ff84175a7845d0fa864d985010d2b1d7d6a1d262779e841ca904e
access.ts https://github.com/simstudioai/sim/pull/7888/files#diff-ff8213f97f44d80eac43ff9de56b4eb3f7379e3339beb6cb804e5693a4ce1d85
usage-log.postgres.test.ts https://github.com/simstudioai/sim/pull/7888/files#diff-9edf36203fe127079fe7de9bab948dfc440d2af4f676895eea3715554aed4d2c
usage.test.ts https://github.com/simstudioai/sim/pull/7888/files#diff-76cbcb288fc18e02a54367b5d926740e68df335b2b118c1d92cb407704fba1fd
usage.ts https://github.com/simstudioai/sim/pull/7888/files#diff-41305ed8be4067cf242cf6c6f01c4c2aa537836b1072141acf9adaef0e2a40e8
authorize-chat-callback.test.ts https://github.com/simstudioai/sim/pull/7888/files#diff-435e34dd133c046067e7094f9e6a4462b0e8d9bb87d1727af212610c4a8bfdde
authorize-chat-callback.ts https://github.com/simstudioai/sim/pull/7888/files#diff-fe5f2468c67807fd0a3550520349943b82d3cda06aa8554b0abc2989508e9ec3
operations.ts https://github.com/simstudioai/sim/pull/7888/files#diff-b81b128471146c053626fc7fda80d09354ff9d491d0afbcc01bb9af8d08c710f
lifecycle.test.ts https://github.com/simstudioai/sim/pull/7888/files#diff-0e2d56c1716b6d419cfff8df5546553c9b58d8f112d6785f76ad6b6adc119c07
lifecycle.ts https://github.com/simstudioai/sim/pull/7888/files#diff-412bf431f927ecc34ee4bd1cd7f089b212399fd692c0640e70d2bed4d5a8917d
organization-chats.test.ts https://github.com/simstudioai/sim/pull/7888/files#diff-741504a92ea0f048cd331fb86edbcd6e80fa56069f61bd06c23a9a07c1a42ca2
organization-chats.ts https://github.com/simstudioai/sim/pull/7888/files#diff-3617183c7097540ba5901f9749078d3c31339919d1639aad3af182461ed3b242
billing-protocol-v1.ts https://github.com/simstudioai/sim/pull/7888/files#diff-9173951ef344d6d2ec30ec32e6f4a86adff8cdc18cc5608c403d612a892a6d1d
run.ts https://github.com/simstudioai/sim/pull/7888/files#diff-8f9401002646f526b4435f2f4c8c1ad3cc2a433c924658ec60ada947d95fc1c5
search-latency.integration.ts https://github.com/simstudioai/sim/pull/7888/files#diff-2a5bd119422fb2a9a479531e9e0ea926dbaef06eb2a9ae45e1f786fac32385e8
budget.ts https://github.com/simstudioai/sim/pull/7888/files#diff-fc099ae3d7f1a159d3e213d403610fa7a7fdb66093d0700d1d2164d991519345
queries.test.ts https://github.com/simstudioai/sim/pull/7888/files#diff-b5bc7cdb4cf5dd93b0dc5beb76436fb9e70fc036e89833eaf8d9defb8bc83c3b
queries.ts https://github.com/simstudioai/sim/pull/7888/files#diff-5f10054baeef2f06350b32a6520d8f841f86a2fc908435296dd8dcb097497ba9
0352_search_document_lookup.sql https://github.com/simstudioai/sim/pull/7888/files#diff-33583ad6c9a6f8f5130811c76ae8263da79a548a6c499ce75eccd59304d0f674
0352_snapshot.json https://github.com/simstudioai/sim/pull/7888/files#diff-33f3c44fe1f1cab50784c25afcadcadbb2a1299dc78ee854eac7327c2c94ce91
_journal.json https://github.com/simstudioai/sim/pull/7888/files#diff-37150cc65ad16ee6fbc5fa318fc096be7730e16d63eaf863e3df5521b7030649
schema.ts https://github.com/simstudioai/sim/pull/7888/files#diff-9a959e2ce3cb4c86957bbae021d06eae364f7b0cb18964f5873bab53220af928
script-migrations-paused-billing-attribution.test.ts https://github.com/simstudioai/sim/pull/7888/files#diff-509458c3951fa9cd2e97a7942fd977a83ef520c679d29dc242a5b2cacfb02743
0016_backfill_search_vectors.postgres.test.ts https://github.com/simstudioai/sim/pull/7888/files#diff-356dbbd8454d0f54e3461aeedfa2b0bec37bfa5930f8272878b0455ab14d6711
0016_backfill_search_vectors.ts https://github.com/simstudioai/sim/pull/7888/files#diff-8fb653c37076b45a7ecd5611b929c27821b23d8149091ec5652b1ba4c2d803d7
0017_index_search_documents.ts https://github.com/simstudioai/sim/pull/7888/files#diff-e9012fea27dc2824664b81651b2592482499476dc04cc9e33f2bb4bcf77b0e48
index.ts https://github.com/simstudioai/sim/pull/7888/files#diff-4c8058a0b924ce061c5ce010c1308148ea03720952dda10d03cee092b61adbd6
sync-billing-protocol-contract.ts https://github.com/simstudioai/sim/pull/7888/files#diff-3ddf77f91e55defb0d469bb2c7feaee80b435bc373ec6fee493930d240eafff9
test-knowledge-acls.ts https://github.com/simstudioai/sim/pull/7888/files#diff-11d2eed992824bef9b61574a683fb54ee2e34caa0bf7a62ece280a56250db1af
.github/workflows/test-build.ymlhttps://github.com/simstudioai/sim/pull/7888/files#diff-a583f7935a5f3192471a2999cbf059eadc857228b5be2c7247f481b799949f8d
View file https://github.com/simstudioai/sim/blob/939348682164e17d22c5009d7a6786480b8a4fff/.github/workflows/test-build.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7888/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7888/files#diff-a583f7935a5f3192471a2999cbf059eadc857228b5be2c7247f481b799949f8d
https://github.com/simstudioai/sim/pull/7888/files#diff-a583f7935a5f3192471a2999cbf059eadc857228b5be2c7247f481b799949f8d
https://github.com/simstudioai/sim/pull/7888/files#diff-a583f7935a5f3192471a2999cbf059eadc857228b5be2c7247f481b799949f8d
https://github.com/simstudioai/sim/pull/7888/files#diff-a583f7935a5f3192471a2999cbf059eadc857228b5be2c7247f481b799949f8d
Please reload this pagehttps://github.com/simstudioai/sim/pull/7888/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7888/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.