Title: fix(skills): only reject a built-in name collision on an actual rename by waleedlatif1 · Pull Request #6570 · simstudioai/sim · GitHub
Open Graph Title: fix(skills): only reject a built-in name collision on an actual rename by waleedlatif1 · Pull Request #6570 · simstudioai/sim
X Title: fix(skills): only reject a built-in name collision on an actual rename by waleedlatif1 · Pull Request #6570 · simstudioai/sim
Description: Stacked on #6569 → #6568 → #6567 → #6565 → #6560. Review only this PR's own commits; merge after its parents. A skill whose existing name matches a built-in returned 400 on every save, with no in-product way out except renaming it. Cause updateSkill ran builtinNameCollision(params.name) in the field-validation block before resolveEditableSkill loaded the canonical row — so the persisted name was not yet in scope and the guard could not compare against it. It fired on any update carrying a name, changed or not. Reachable from the real client: the skill modal sends updates: { name, description, content } — always the full object, including an unchanged name. (The detail page sends only changed fields and was unaffected, so the "skill modal" framing is the accurate one.) Not theoretical Built-in skills shipped in #4923; this guard shipped in #5273. In between, operations.ts merged built-ins with BUILTIN_SKILLS.filter((b) => !dbNames.has(b.name.toLowerCase())), so a workspace skill named research, create-table, deploy-workflow, or connect-integration was freely creatable and simply shadowed the built-in. Those rows are now stuck. Fix The guard moves to after resolveEditableSkill and fires only when params.name !== resolved.skill.name. Comparison is exact, so research → Research still counts as a rename into a collision and is rejected. Error shape is unchanged (OrchestrationError('validation', …), identical to the create path). Creating a new skill with a built-in name still 400s. Layer choice: the shared updateSkill orchestration primitive, not updateSkillUseCase. The two surfaces diverge today — v2 PATCH /api/v2/skills/[id] and Copilot go through the use case, but internal POST /api/skills calls performUpdateSkill directly. updateSkill is the single chokepoint both reach and the layer where the canonical row is loaded; placing it in the use case would have left the internal path broken. Side effect: a non-editor attempting a colliding rename now gets 403 rather than 400 — correct, since authorization should precede business validation. Pre-existing issue, not fixed here POST /api/skills bypassing updateSkillUseCase skips that use case's authorization and semantic audit — an Application Operation Boundary violation worth its own ticket. This fix is placed so the two surfaces cannot disagree on this rule regardless. Test 1 (unchanged colliding name succeeds) goes red on revert. Tests 2 and 3 are regression guards that pass with and without the fix — proven capable of failing by neutering builtinNameCollision. type-check · biome · 44 tests · check:api-validation — all pass.
Open Graph Description: Stacked on #6569 → #6568 → #6567 → #6565 → #6560. Review only this PR's own commits; merge after its parents. A skill whose existing name matches a built-in returned 400 on every save, with no ...
X Description: Stacked on #6569 → #6568 → #6567 → #6565 → #6560. Review only this PR's own commits; merge after its parents. A skill whose existing name matches a built-in returned 400 on every save, with...
Opengraph URL: https://github.com/simstudioai/sim/pull/6570
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:bff8a087-28a0-01ad-19b2-1a0b72a648d2 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8250:37E613:697489:9276B8:6AFB4338 |
| html-safe-nonce | f54846e27cd02190a8180efd63befe8aea8469af369a48b2f1fe53d8beab6fad |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjUwOjM3RTYxMzo2OTc0ODk6OTI3NkI4OjZBRkI0MzM4IiwidmlzaXRvcl9pZCI6Ijc4MDA3NTU4NjY2NDYwMzczMDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 721cced406b4365c2a21573fa30c604e105769a71c14a20f65b892027e477b07 |
| hovercard-subject-tag | pull_request:4257637430 |
| 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/6570/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 | Stacked on #6569 → #6568 → #6567 → #6565 → #6560. Review only this PR's own commits; merge after its parents. A skill whose existing name matches a built-in returned 400 on every save, with no ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd |
| 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 | a6c2f87cbcb6414452377b4967858ed6a66f1109 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width