René's URL Explorer Experiment


Title: fix(logging): log expected outcomes below ERROR and acknowledge a lost workflow-result race by waleedlatif1 · Pull Request #9056 · simstudioai/sim · GitHub

Open Graph Title: fix(logging): log expected outcomes below ERROR and acknowledge a lost workflow-result race by waleedlatif1 · Pull Request #9056 · simstudioai/sim

X Title: fix(logging): log expected outcomes below ERROR and acknowledge a lost workflow-result race by waleedlatif1 · Pull Request #9056 · simstudioai/sim

Description: Summary Several expected outcomes were logged at ERROR. One of them also returned a 500. Status change (only one): POST /api/copilot/confirm for a workflow tool now answers 200 with the stored outcome instead of 500 when the client's result loses the settlement race to the server recording that execution's outcome first. If the settled call belongs to a different execution, it still answers 404. Nothing is written or published again. Every other change here is a log level or a log message. Copilot confirm (workflow tools). The server can record a workflow execution's outcome on the tool call before the client's result arrives. The client's settlement CAS then lost, and the route answered 500 and logged ERROR. Because the log metadata carried a message key, the completion text also replaced the log message. On a conflict, workflow tools now re-read the call and answer through acknowledgeSettledWorkflowToolCall, the same response (and execution-id check) an already-settled workflow call gets before the update. Non-workflow tools already did this. The metadata key is now completionMessage, so a genuine update failure keeps its log message. Cancel a finished run. When completion wins the race with a cancel, cancelWorkflowExecution throws a classified conflict. Web already answers 409 and v2 already answers a 200 no-op, but the catch-all logged ERROR. Classified (non-internal, via asOrchestrationError) failures now log at info. Unclassified failures stay at ERROR. PostHog ingest proxy. A client disconnecting mid-request made the upstream fetch reject with aborted, which was logged at ERROR with a 502. When request.signal.aborted is true, the proxy now logs at info and answers 499, the same convention withRouteHandler uses. Real upstream failures (timeouts, socket errors) still log at ERROR with a 502. Nobody receives that status, because the client is already gone. Stripe plan resolution. Enterprise uses per-customer prices, and legacy pro/team plans keep their original price, so neither maps to a catalog plan. syncSubscriptionPlan then keeps the stored plan, as designed. That case now logs at info. It still logs ERROR when a catalog plan fails to resolve, or when a legacy plan moves to a new price (previous_attributes.items). Either means price env config is missing. The ERROR wording now says what actually happens ("keeping the stored plan"). The duplicate WARN for the same condition in onSubscriptionUpdate is removed. isLegacyPlan is added to plan-helpers and replaces the two inline pro/team checks there. The shared mock is updated to match. Surfaces Confirm: only the chat client's workflow-result delivery (session auth) is affected, and only on a lost race, where it now gets a 200 instead of a 500. Cancel: web (session or API key, 409), v2/MCP (200 no-op), the copilot tool and Slack ingress all keep the same error and status. Only the log level changes. Ingest: browser analytics only. Stripe hooks: logging only. Tests These fail before the change and pass after: confirm/route.test.ts, lost race: the stored outcome is acknowledged with a 200 (it was a 500). confirm/route.test.ts, lost race where the server settled a different execution: 404 (it was a 500). cancel-workflow-execution.test.ts: the terminal-race conflict no longer logs an error. New app/ingest/[[...path]]/route.test.ts: a client abort gives 499 with no error log, and an upstream failure still gives 502 and logs an error. The existing tests asserted the cancel status but not the log level. The confirm tests covered the conflict re-read only for non-workflow tools. The ingest proxy had no tests.

Open Graph Description: Summary Several expected outcomes were logged at ERROR. One of them also returned a 500. Status change (only one): POST /api/copilot/confirm for a workflow tool now answers 200 with the stored outc...

X Description: Summary Several expected outcomes were logged at ERROR. One of them also returned a 500. Status change (only one): POST /api/copilot/confirm for a workflow tool now answers 200 with the stored outc...

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

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:cea27662-40a6-8156-01d9-a78b885a9b3e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCD74:267719:B4D23D:F7E98C:6AFB532D
html-safe-nonce524c12f5d8aa2d2a9e8af565fb33f569a11967d00bb63c82056b79ff0943d501
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDc0OjI2NzcxOTpCNEQyM0Q6RjdFOThDOjZBRkI1MzJEIiwidmlzaXRvcl9pZCI6IjkwNzU1NjU3NDcwODk2NTg2NjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7e5bb6ed8938a86b5415482e53365afa1f0442f1520273acfe547805d4521b09
hovercard-subject-tagpull_request:4865965156
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/9056/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 Several expected outcomes were logged at ERROR. One of them also returned a 500. Status change (only one): POST /api/copilot/confirm for a workflow tool now answers 200 with the stored outc...
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/9056/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F9056%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%2F9056%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/9056/files
Reloadhttps://github.com/simstudioai/sim/pull/9056/files
Reloadhttps://github.com/simstudioai/sim/pull/9056/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/expected-outcomes-log-levelshttps://github.com/simstudioai/sim/tree/fix/expected-outcomes-log-levels
Conversation 19 https://github.com/simstudioai/sim/pull/9056
Commits 3 https://github.com/simstudioai/sim/pull/9056/commits
Checks 52 https://github.com/simstudioai/sim/pull/9056/checks
Files changed https://github.com/simstudioai/sim/pull/9056/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9056/files
fix(logging): log expected outcomes below ERROR and acknowledge a lost workflow-result race https://github.com/simstudioai/sim/pull/9056/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/9056/files
0892252 fix(logging): log expected outcomes below ERROR and acknowledge a los… waleedlatif1 Oct 14, 2026 https://github.com/simstudioai/sim/pull/9056/commits/08922526ac02db9ba29c411fc561222929967231
324bc43 refactor: share legacy-plan check, classify cancel refusals through a… waleedlatif1 Oct 14, 2026 https://github.com/simstudioai/sim/pull/9056/commits/324bc43b7447d693d34bbde918e5867ade0cf847
20bc96e fix(billing): treat only a real price swap as a legacy plan price change waleedlatif1 Oct 14, 2026 https://github.com/simstudioai/sim/pull/9056/commits/20bc96ed4b4193f46b789fbd8c278b8708de91c7
Clear filters https://github.com/simstudioai/sim/pull/9056/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9056/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9056/files
route.test.ts https://github.com/simstudioai/sim/pull/9056/files#diff-d4266de90811526cac807b27cb5287d59701900fcf22945eb3ea39f03dda6ddd
route.ts https://github.com/simstudioai/sim/pull/9056/files#diff-313c8d66f5de9ec050dacd52e247241e4acb4f0163d8ca50bd009f7b3ecc29fc
route.test.ts https://github.com/simstudioai/sim/pull/9056/files#diff-38c9cfe852a681c86965315ade07c1d843dd352e3fbe1288163fd22ece9a5586
route.ts https://github.com/simstudioai/sim/pull/9056/files#diff-fdf62d17f85bb67967245f6b66b27562e3cd44642fbc2ef421f046bb74dd62c1
auth.ts https://github.com/simstudioai/sim/pull/9056/files#diff-1196450729bfda994f3823921eacd28e3200408dbb562d8481108db9abe4a0e2
plan-helpers.ts https://github.com/simstudioai/sim/pull/9056/files#diff-140ac160fa4b00a045c8f32632ebe161e7b5d17f19517b820eda1af3c4989faa
plans.test.ts https://github.com/simstudioai/sim/pull/9056/files#diff-f1027bdb7eb1466028d10803ae45c5249650e619e7d1e2d622acef48953f225d
plans.ts https://github.com/simstudioai/sim/pull/9056/files#diff-d8eee0a51ff110f578179c8ae2b031b2b58ac57f57deedc936b93c2829d26d1e
cancel-workflow-execution.test.ts https://github.com/simstudioai/sim/pull/9056/files#diff-a71da39fdb4d6534f028dd1f0532f7ccc75908fa235903ff769ab3b9920548d2
cancel-workflow-execution.ts https://github.com/simstudioai/sim/pull/9056/files#diff-9d9920803ab82adaed6a74e928462a1f717dca01c69da3757d211c0cdb215637
billing-plan-helpers.mock.ts https://github.com/simstudioai/sim/pull/9056/files#diff-af0b9047acc8c6df60ea98dc26dbd3a419a6fbd575e0fdcb9485a43f7ee2691a
apps/sim/app/api/copilot/confirm/route.test.tshttps://github.com/simstudioai/sim/pull/9056/files#diff-d4266de90811526cac807b27cb5287d59701900fcf22945eb3ea39f03dda6ddd
View file https://github.com/simstudioai/sim/blob/20bc96ed4b4193f46b789fbd8c278b8708de91c7/apps/sim/app/api/copilot/confirm/route.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9056/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9056/files#diff-d4266de90811526cac807b27cb5287d59701900fcf22945eb3ea39f03dda6ddd
https://github.com/simstudioai/sim/pull/9056/files#diff-d4266de90811526cac807b27cb5287d59701900fcf22945eb3ea39f03dda6ddd
apps/sim/app/api/copilot/confirm/route.tshttps://github.com/simstudioai/sim/pull/9056/files#diff-313c8d66f5de9ec050dacd52e247241e4acb4f0163d8ca50bd009f7b3ecc29fc
View file https://github.com/simstudioai/sim/blob/20bc96ed4b4193f46b789fbd8c278b8708de91c7/apps/sim/app/api/copilot/confirm/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9056/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9056/files#diff-313c8d66f5de9ec050dacd52e247241e4acb4f0163d8ca50bd009f7b3ecc29fc
https://github.com/simstudioai/sim/pull/9056/files#diff-313c8d66f5de9ec050dacd52e247241e4acb4f0163d8ca50bd009f7b3ecc29fc
https://github.com/simstudioai/sim/pull/9056/files#diff-313c8d66f5de9ec050dacd52e247241e4acb4f0163d8ca50bd009f7b3ecc29fc
https://github.com/simstudioai/sim/pull/9056/files#diff-313c8d66f5de9ec050dacd52e247241e4acb4f0163d8ca50bd009f7b3ecc29fc
https://github.com/simstudioai/sim/pull/9056/files#diff-313c8d66f5de9ec050dacd52e247241e4acb4f0163d8ca50bd009f7b3ecc29fc
https://github.com/simstudioai/sim/pull/9056/files#diff-313c8d66f5de9ec050dacd52e247241e4acb4f0163d8ca50bd009f7b3ecc29fc
https://github.com/simstudioai/sim/pull/9056/files#diff-313c8d66f5de9ec050dacd52e247241e4acb4f0163d8ca50bd009f7b3ecc29fc
apps/sim/app/ingest/[[...path]]/route.test.tshttps://github.com/simstudioai/sim/pull/9056/files#diff-38c9cfe852a681c86965315ade07c1d843dd352e3fbe1288163fd22ece9a5586
View file https://github.com/simstudioai/sim/blob/20bc96ed4b4193f46b789fbd8c278b8708de91c7/apps/sim/app/ingest/%5B%5B...path%5D%5D/route.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9056/{{ revealButtonHref }}
apps/sim/app/ingest/[[...path]]/route.tshttps://github.com/simstudioai/sim/pull/9056/files#diff-fdf62d17f85bb67967245f6b66b27562e3cd44642fbc2ef421f046bb74dd62c1
View file https://github.com/simstudioai/sim/blob/20bc96ed4b4193f46b789fbd8c278b8708de91c7/apps/sim/app/ingest/%5B%5B...path%5D%5D/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9056/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9056/files#diff-fdf62d17f85bb67967245f6b66b27562e3cd44642fbc2ef421f046bb74dd62c1
Please reload this pagehttps://github.com/simstudioai/sim/pull/9056/files
https://github.com/simstudioai/sim/pull/9056/files#diff-fdf62d17f85bb67967245f6b66b27562e3cd44642fbc2ef421f046bb74dd62c1
apps/sim/lib/auth/auth.tshttps://github.com/simstudioai/sim/pull/9056/files#diff-1196450729bfda994f3823921eacd28e3200408dbb562d8481108db9abe4a0e2
View file https://github.com/simstudioai/sim/blob/20bc96ed4b4193f46b789fbd8c278b8708de91c7/apps/sim/lib/auth/auth.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9056/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9056/files#diff-1196450729bfda994f3823921eacd28e3200408dbb562d8481108db9abe4a0e2
https://github.com/simstudioai/sim/pull/9056/files#diff-1196450729bfda994f3823921eacd28e3200408dbb562d8481108db9abe4a0e2
https://github.com/simstudioai/sim/pull/9056/files#diff-1196450729bfda994f3823921eacd28e3200408dbb562d8481108db9abe4a0e2
https://github.com/simstudioai/sim/pull/9056/files#diff-1196450729bfda994f3823921eacd28e3200408dbb562d8481108db9abe4a0e2
https://github.com/simstudioai/sim/pull/9056/files#diff-1196450729bfda994f3823921eacd28e3200408dbb562d8481108db9abe4a0e2
https://github.com/simstudioai/sim/pull/9056/files#diff-1196450729bfda994f3823921eacd28e3200408dbb562d8481108db9abe4a0e2
https://github.com/simstudioai/sim/pull/9056/files#diff-1196450729bfda994f3823921eacd28e3200408dbb562d8481108db9abe4a0e2
https://github.com/simstudioai/sim/pull/9056/files#diff-1196450729bfda994f3823921eacd28e3200408dbb562d8481108db9abe4a0e2
https://github.com/simstudioai/sim/pull/9056/files#diff-1196450729bfda994f3823921eacd28e3200408dbb562d8481108db9abe4a0e2
apps/sim/lib/billing/plan-helpers.tshttps://github.com/simstudioai/sim/pull/9056/files#diff-140ac160fa4b00a045c8f32632ebe161e7b5d17f19517b820eda1af3c4989faa
View file https://github.com/simstudioai/sim/blob/20bc96ed4b4193f46b789fbd8c278b8708de91c7/apps/sim/lib/billing/plan-helpers.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9056/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9056/files#diff-140ac160fa4b00a045c8f32632ebe161e7b5d17f19517b820eda1af3c4989faa
https://github.com/simstudioai/sim/pull/9056/files#diff-140ac160fa4b00a045c8f32632ebe161e7b5d17f19517b820eda1af3c4989faa
https://github.com/simstudioai/sim/pull/9056/files#diff-140ac160fa4b00a045c8f32632ebe161e7b5d17f19517b820eda1af3c4989faa
https://github.com/simstudioai/sim/pull/9056/files#diff-140ac160fa4b00a045c8f32632ebe161e7b5d17f19517b820eda1af3c4989faa
https://github.com/simstudioai/sim/pull/9056/files#diff-140ac160fa4b00a045c8f32632ebe161e7b5d17f19517b820eda1af3c4989faa
apps/sim/lib/billing/plans.test.tshttps://github.com/simstudioai/sim/pull/9056/files#diff-f1027bdb7eb1466028d10803ae45c5249650e619e7d1e2d622acef48953f225d
View file https://github.com/simstudioai/sim/blob/20bc96ed4b4193f46b789fbd8c278b8708de91c7/apps/sim/lib/billing/plans.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9056/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/9056/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9056/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.