René's URL Explorer Experiment


Title: fix(mothership): decide once whether a queued send may already be on the server by waleedlatif1 · Pull Request #8727 · simstudioai/sim · GitHub

Open Graph Title: fix(mothership): decide once whether a queued send may already be on the server by waleedlatif1 · Pull Request #8727 · simstudioai/sim

X Title: fix(mothership): decide once whether a queued send may already be on the server by waleedlatif1 · Pull Request #8727 · simstudioai/sim

Description: Summary Follow-up to #8723. This closes the remaining ways a queued message the server may already hold could be edited into a second turn, and decides that question in one place instead of several. One source of truth for "this id may already be on the server". Before this PR the answer was inferred separately by the store guard, a stopRequired exemption, the stored-handoff restore, and the notAdmitted/neverSent results. The exemption was wrong: a Send-now reuses a re-queued message's earlier id, which may already have reached the server. startSendMessage now decides it where it chooses the id. A reused id carries its queue entry's admissionUnknown, and is unknown when the entry doesn't say. A fresh id is unsent until its POST goes out. Only the server refusing the id clears it. That one value rides the withdrawal result, the stored queued-send handoff, and the queue entry. The notAdmitted/neverSent pair and the stopRequired exemption are gone. The store guard reads only the flag. It fills the flag in only for writers with no say (a session saved before it existed, a send handed over from another surface). A Send-now restored from its stored handoff can't be edited. After a reload the handoff comes back with the flag it was stored with, including a resumed message whose Stop hadn't settled yet. A send superseded at admission is answered as a duplicate. Admission's "superseded" conflict means another attempt with the same id re-took the claim after the 60s in-progress TTL ran out, which can happen because branch, attachment and context preparation all run before admission. That attempt may admit the turn. It used to come back as a bare 409, read as a busy refusal. Admission now throws ChatSendSupersededError, and the route answers it as a 409 naming the send's own id, so the client keeps the message under that id. Doc fixes: claimChatSend fails closed with a 500 (its storage is forced to Postgres), not open. The admission flag's comment notes the 1-hour claim TTL. Type of Change Bug fix Testing DOM: keeps a resumed Send-now uneditable when the page reloads before its Stop settles: the reviewer's probe, end to end. It fails on this PR's previous head. guards a Send-now restored from its stored handoff, for both values of the stored flag. Fails on staging. keeps a send answered as a duplicate with no stream uneditable, then retries it. Store: reads a reused handoff id as possibly sent unless the entry says otherwise. Fails on staging. Route: answers a send superseded at admission as a duplicate naming its id. Fails against the staging route. Admission: refuses to admit a send whose claim another attempt took. Fails on staging. The full gate and integration tests ran on the CI runner. 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 Follow-up to #8723. This closes the remaining ways a queued message the server may already hold could be edited into a second turn, and decides that question in one place instead of several...

X Description: Summary Follow-up to #8723. This closes the remaining ways a queued message the server may already hold could be edited into a second turn, and decides that question in one place instead of several...

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

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:24777f47-1468-76c5-4e23-92a384f88059
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE76A:1F76:AA541:EB33F:6AFB5729
html-safe-noncebd744078b877eb300e3ab61e8858aec511a6e49a78a5087d7a7a1ab3bc3918fe
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzZBOjFGNzY6QUE1NDE6RUIzM0Y6NkFGQjU3MjkiLCJ2aXNpdG9yX2lkIjoiNTE1OTMyMzk0Mjc4NjkxNDA4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac797d775150082b7e7e6ddd87d61047a1e94f7507146680ba899bc436b65cf7ac
hovercard-subject-tagpull_request:4768458710
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/8727/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 Follow-up to #8723. This closes the remaining ways a queued message the server may already hold could be edited into a second turn, and decides that question in one place instead of several...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
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
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/8727/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8727%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%2F8727%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/8727/files
Reloadhttps://github.com/simstudioai/sim/pull/8727/files
Reloadhttps://github.com/simstudioai/sim/pull/8727/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)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
fix/mothership-handoff-send-edithttps://github.com/simstudioai/sim/tree/fix/mothership-handoff-send-edit
Conversation 34 https://github.com/simstudioai/sim/pull/8727
Commits 5 https://github.com/simstudioai/sim/pull/8727/commits
Checks 32 https://github.com/simstudioai/sim/pull/8727/checks
Files changed https://github.com/simstudioai/sim/pull/8727/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8727/files
fix(mothership): decide once whether a queued send may already be on the server https://github.com/simstudioai/sim/pull/8727/files#top
Show all changes 5 commits https://github.com/simstudioai/sim/pull/8727/files
1c9b89e fix(mothership): guard a Send-now restored from its stored handoff ag… waleedlatif1 Oct 7, 2026 https://github.com/simstudioai/sim/pull/8727/commits/1c9b89ed594456749447b890ac220a747aefb516
159d115 fix(mothership): answer a send superseded at admission as a duplicate waleedlatif1 Oct 7, 2026 https://github.com/simstudioai/sim/pull/8727/commits/159d1152fac3f08b9bd67db60f95d26111d14f7d
07b32dd fix(mothership): decide once whether a send's id may already be on th… waleedlatif1 Oct 7, 2026 https://github.com/simstudioai/sim/pull/8727/commits/07b32dd4b4ac240455d404832e2b9661cad48976
97f5c94 fix(mothership): align the one admission fact with the history check … waleedlatif1 Oct 7, 2026 https://github.com/simstudioai/sim/pull/8727/commits/97f5c94aac7a667847b3ff84cd9a6d9aa13a4017
ef65480 test(mothership): cover the pre-POST handoff write and the own-id con… waleedlatif1 Oct 7, 2026 https://github.com/simstudioai/sim/pull/8727/commits/ef6548022ece695d40386e6fca6e34e456b832c6
Clear filters https://github.com/simstudioai/sim/pull/8727/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8727/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8727/files
send-handoff.ts https://github.com/simstudioai/sim/pull/8727/files#diff-4611a2bea5661f96fe40b384ef6ed25285845435daf9c697c27c7a671c4e8d3b
use-chat.dom.test.tsx https://github.com/simstudioai/sim/pull/8727/files#diff-f13f1eaa18b785ec858b76bfef8952fc11d2c6730951634aad2c3bf4e167e62e
use-chat.ts https://github.com/simstudioai/sim/pull/8727/files#diff-1a0584ccf9cc4bacd55ce19aeeea8d807c39f36c365fa5b6638587aad38c700d
admit-turn.test.ts https://github.com/simstudioai/sim/pull/8727/files#diff-217b15a8677275939bb7298a0ccb2da484d9edb76b3d8a303810ce20dedd42f7
admit-turn.ts https://github.com/simstudioai/sim/pull/8727/files#diff-95433caaeaf5c1ea273978f8b7b29990b1a8f029f114205c1ff3a17ce798d5b4
send-superseded.ts https://github.com/simstudioai/sim/pull/8727/files#diff-64edd4f314bb39ea4ebaaa8b915bc66decec63dc696b7b5b6591d384eae19825
post.test.ts https://github.com/simstudioai/sim/pull/8727/files#diff-6d0b4ca3c83105bc58cee0c55acba06bb1f231570a250386296939e365c11531
post.ts https://github.com/simstudioai/sim/pull/8727/files#diff-3706d2f19175754e3005560cd5a01658d443edbd6724899e9e7ef0238e6fdffa
store.test.ts https://github.com/simstudioai/sim/pull/8727/files#diff-7d2974e798ef7a4d7a04a4cf937327e478bb15555326c08838222e30dcbf5c54
store.ts https://github.com/simstudioai/sim/pull/8727/files#diff-f9609bb09028d5fea616b8fbeca370d62c6a6d20f6dc460fed34a8a0594dce70
apps/sim/app/workspace/[workspaceId]/home/hooks/send-handoff.tshttps://github.com/simstudioai/sim/pull/8727/files#diff-4611a2bea5661f96fe40b384ef6ed25285845435daf9c697c27c7a671c4e8d3b
View file https://github.com/simstudioai/sim/blob/ef6548022ece695d40386e6fca6e34e456b832c6/apps/sim/app/workspace/%5BworkspaceId%5D/home/hooks/send-handoff.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8727/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8727/files#diff-4611a2bea5661f96fe40b384ef6ed25285845435daf9c697c27c7a671c4e8d3b
https://github.com/simstudioai/sim/pull/8727/files#diff-4611a2bea5661f96fe40b384ef6ed25285845435daf9c697c27c7a671c4e8d3b
https://github.com/simstudioai/sim/pull/8727/files#diff-4611a2bea5661f96fe40b384ef6ed25285845435daf9c697c27c7a671c4e8d3b
https://github.com/simstudioai/sim/pull/8727/files#diff-4611a2bea5661f96fe40b384ef6ed25285845435daf9c697c27c7a671c4e8d3b
Please reload this pagehttps://github.com/simstudioai/sim/pull/8727/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8727/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.