Title: fix(workflows): hold the v2 sync run result until its execution log is finalized by waleedlatif1 · Pull Request #8935 · simstudioai/sim · GitHub
Open Graph Title: fix(workflows): hold the v2 sync run result until its execution log is finalized by waleedlatif1 · Pull Request #8935 · simstudioai/sim
X Title: fix(workflows): hold the v2 sync run result until its execution log is finalized by waleedlatif1 · Pull Request #8935 · simstudioai/sim
Description: Summary A run-from-block call that names a just-finished v2 sync run as its source can fail with NOT_FOUND: No execution state found for source run. CI hit this in e2e (stop-after) (run 38262284889, attempt 1; it passed on rerun), and any v2 API, CLI or MCP caller can hit it the same way. Cause. After a run finishes, the core writes its log and saved execution state in a background step (execution-core.ts). runSynchronousWorkflow in execute-service.ts returned the completed result without waiting for that step. Run-from-block reads the state from the primary DB, found the log row with no state yet, and returned 404. In the CI log the source run passed at 14:24:52.750 and the CLI failed at 14:24:53.773, while the write was still in flight. Fix. Await loggingSession.waitForPostExecution() in runSynchronousWorkflow's finally, as the legacy execute route already does ("the sync response is the run's receipt"). It covers completed, failed, cancelled, timed-out and thrown runs, and does nothing after a pause. The wait swallows errors and the background step always settles, so it can't hang the response. This is not a retry. Trade-off. v2 sync responses now include the time to save the log, the same as the legacy route. Test plan CI e2e (stop-after) and the v2 execute suites
Open Graph Description: Summary A run-from-block call that names a just-finished v2 sync run as its source can fail with NOT_FOUND: No execution state found for source run. CI hit this in e2e (stop-after) (run 38262284889...
X Description: Summary A run-from-block call that names a just-finished v2 sync run as its source can fail with NOT_FOUND: No execution state found for source run. CI hit this in e2e (stop-after) (run 38262284889...
Opengraph URL: https://github.com/simstudioai/sim/pull/8935
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:659d6a18-0785-fed9-c48e-d2724ecb0f57 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AF6C:2F3575:7FBA7C:B67F97:6AFB4DAE |
| html-safe-nonce | d799f4792fd7ba436ec6087d8b89c4bf61cea6a3599ec4614daa97338e5a4a47 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjZDOjJGMzU3NTo3RkJBN0M6QjY3Rjk3OjZBRkI0REFFIiwidmlzaXRvcl9pZCI6IjcxNTY5MzkzNDEyNjI3MDQwNDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4c99d62f8046ef9523e4c396b9085ef357d613643951dc839a5f208646eac3f6 |
| hovercard-subject-tag | pull_request:4834173068 |
| 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/8935/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 run-from-block call that names a just-finished v2 sync run as its source can fail with NOT_FOUND: No execution state found for source run. CI hit this in e2e (stop-after) (run 38262284889... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1 |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 26504db649b58525278f77a52b80ba5f10d5f4de |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width