Title: fix(mothership): let Chat read its own permission config and file version history by waleedlatif1 · Pull Request #8839 · simstudioai/sim · GitHub
Open Graph Title: fix(mothership): let Chat read its own permission config and file version history by waleedlatif1 · Pull Request #8839 · simstudioai/sim
X Title: fix(mothership): let Chat read its own permission config and file version history by waleedlatif1 · Pull Request #8839 · simstudioai/sim
Description: Summary workspaces permission-config and files versions list|describe|read|revert answered every Chat call with 403 This operation is unavailable through Mothership, because their use cases admitted no delegated caller permission_groups.read_user_config now admits Copilot delegation (sim:settings) through the same use case. Chat reads the delegating member's own group config in the chat's workspace. The use case resolves the subject user instead of reading principal.userId files.versions.list, .read, .read_content and .revert now admit Copilot delegation through the existing workspace-file funnel (sim:workspace-files). Chat gets the delegating user's role and files.use capability, pinned to its workspace Version text reads from Chat go through the same secret-provenance delivery observer as current-file reads: the snapshot's provenance is imported into the chat's secret registry, and a read without a registry fails with 503 before any bytes reach the model files.versions.delete (irreversible purge) and files.versions.download (raw bytes) stay direct-only. The policy comment that deferred delegated version access now records this split Workspace API key and direct-caller admission are unchanged. Executor delegation is not added copilot-refused-routes.json regenerated from the route inventory (the source for the CLI's mothershipUnavailable flag): version delete and download stay listed as refused Type of Change Bug fix Testing New lib/permission-groups/__integration__/copilot-permission-config.integration.ts (real Postgres, Chat's in-process CLI transport, real route and use case): two members each read their own group; a chat pinned to another workspace and a user with no workspace role are both refused with 404 NOT_FOUND. Before the fix all 3 failed; after, 3/3 pass New lib/workspace-files/__integration__/copilot-file-versions.integration.ts (real Postgres, local storage, Chat's composed file-read and scoped transports): a read-only member lists and describes versions a historical version holding a secret reaches the model only as [REDACTED_SECRET], and the same read without a provenance registry answers 503 a writer reverts, with the audit recorded as the delegated Copilot actor a read-only member's revert is refused with INSUFFICIENT_WORKSPACE_ROLE version delete and download still answer 403 for Chat Before the fix 4 of 5 failed (the direct-only guard passes both ways); after, 5/5 pass Existing lib/permission-groups, lib/workspace-files, lib/api/server/routes, app/api/v2/files, app/api/v2/workspaces, lib/mothership/agent-cli, lib/core/application suites pass (session, personal-key, OAuth and workspace-key cases unchanged) bun run lint, bun run type-check, bun run check:audits (58), docs-manifest:check, block-registry check, root bun run test (one timeout in lib/mothership/agent-cli/services.test.ts under full-suite load; the file passes on its own and does not touch these operations) Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing (new tests pass the test-audit authoring gate) 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 workspaces permission-config and files versions list|describe|read|revert answered every Chat call with 403 This operation is unavailable through Mothership, because their use cases admitt...
X Description: Summary workspaces permission-config and files versions list|describe|read|revert answered every Chat call with 403 This operation is unavailable through Mothership, because their use cases admitt...
Opengraph URL: https://github.com/simstudioai/sim/pull/8839
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:3a6e2924-d1f2-164a-49f1-7a45d898012f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CD64:1C8E04:DEFA02:132453F:6AFB5EA8 |
| html-safe-nonce | 1f6182002943b6f73d0921558ed98d15a1b7aecce765d2df29acd32ecbc7ceaf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDY0OjFDOEUwNDpERUZBMDI6MTMyNDUzRjo2QUZCNUVBOCIsInZpc2l0b3JfaWQiOiI0NjQyOTI2MzMyNDMzMDk2MzYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | fb9159ea9552c33d51186019d39c0eee49d78eb13a2f1af04d3c2020ffb9f198 |
| hovercard-subject-tag | pull_request:4796398818 |
| 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/8839/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 workspaces permission-config and files versions list|describe|read|revert answered every Chat call with 403 This operation is unavailable through Mothership, because their use cases admitt... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | ea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94 |
| 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 | 59ef97164c52cf59bd10558ddec9c4f482763988 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width