Title: fix(copilot): name a count-parallel's branch count `count` in the model's read view by waleedlatif1 · Pull Request #7082 · simstudioai/sim · GitHub
Open Graph Title: fix(copilot): name a count-parallel's branch count `count` in the model's read view by waleedlatif1 · Pull Request #7082 · simstudioai/sim
X Title: fix(copilot): name a count-parallel's branch count `count` in the model's read view by waleedlatif1 · Pull Request #7082 · simstudioai/sim
Description: sanitizeForCopilot builds the workflow JSON the model reads before editing. The loop and parallel branches disagreed about what to call a subflow's count. write contract (model is told) edit path reads read view emitted loop iterations params.inputs.iterations → data.count iterations ✅ parallel count params.inputs.count → data.count iterations ❌ The parallel branch copied the loop's line without renaming the field. So the model was shown a branch count under a name its own write contract never defines. If it echoes that back, the value is dropped silently — neither addSubflowConfig (editing/operations.ts:64) nor the update path (:168) looks for iterations on a parallel. Scope. Confined to the copilot read/edit round-trip (edit-workflow/index.ts:131 returns this straight back to the model after every edit). sanitizeForExport is a different function and is unaffected — it preserves state.blocks wholesale, so user JSON export, superuser import, and admin folder backup/restore always carried the real data.count. I checked that specifically because "backup/restore loses data" would have made this far more serious than it is. Tests. The sanitizer had zero parallelType coverage, which is how this drifted. Adds three cases pinning both contracts plus the collection variant. The parallel case fails against the old code (expected { parallelType, iterations } to deeply equal { parallelType: 'count', count: 5 }); the loop case passes before and after, confirming the loop path is untouched. bun run type-check clean, all 33 audits pass, 204 tests across sanitization, editing, and copilot/tools/server/workflow green.
Open Graph Description: sanitizeForCopilot builds the workflow JSON the model reads before editing. The loop and parallel branches disagreed about what to call a subflow's count. write contract (model is told) edi...
X Description: sanitizeForCopilot builds the workflow JSON the model reads before editing. The loop and parallel branches disagreed about what to call a subflow's count. write contract (model is told)...
Opengraph URL: https://github.com/simstudioai/sim/pull/7082
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:036dcb57-76ab-a687-6bc7-3dc68b4fda30 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AD0E:186510:BCC91E:1033656:6AFB5453 |
| html-safe-nonce | b1e0a16e429a0fb3f8b4cf995ac51e7491d3c4d8f184a66ea005ac4fac087285 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDBFOjE4NjUxMDpCQ0M5MUU6MTAzMzY1Njo2QUZCNTQ1MyIsInZpc2l0b3JfaWQiOiI3NzY1NTE0NzkyMzk4OTY3ODkxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 45b8ae99e3723a79b31ae11254768aa667fc0ede6811001db4096de5f3cb3399 |
| hovercard-subject-tag | pull_request:4362023044 |
| 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/7082/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 | sanitizeForCopilot builds the workflow JSON the model reads before editing. The loop and parallel branches disagreed about what to call a subflow's count. write contract (model is told) edi... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1 |
| 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 | cbf66c024bb6d10e6955baa7413c54cf13a201bb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width