Title: test(table): pin the executor auth pairing on the table read route by waleedlatif1 · Pull Request #6603 · simstudioai/sim · GitHub
Open Graph Title: test(table): pin the executor auth pairing on the table read route by waleedlatif1 · Pull Request #6603 · simstudioai/sim
X Title: test(table): pin the executor auth pairing on the table read route by waleedlatif1 · Pull Request #6603 · simstudioai/sim
Description: Summary Follow-up to #6593. fetchTableSchema is the last enricher still calling the deprecated buildAuthHeaders, and after #6593 migrated its two siblings in the same file it now reads like a missed migration. It isn't — and "fixing" it today would break table tools. GET /api/table/[tableId] authenticates through checkSessionOrInternalAuth → verifyInternalToken, which requires type: 'internal'. An executor delegation carries type: 'internal_delegation' and is rejected, then falls through to session auth the executor doesn't have. The sibling table routes ([tableId]/groups, [tableId]/exports, imports/*) are already on internalTableSessionOrExecutorAuth, so this route is the straggler and a plausible next migration target. tables.read also declares delegatedServices: ['copilot'], so an executor delegation would be refused at the operation layer even if the route accepted it. So: assert the route still authenticates through the legacy path, and record on the caller why it is deliberately not migrated. The migration that flips this route now fails on a test that names the caller, instead of shipping and breaking table tools. Why not migrate the route here readTableUseCase exists, but this GET returns an 18-field payload including maxRows from getWorkspaceTableLimits, which the use case does not supply, and the response is consumed by the Tables UI. Doing it properly means a new contract matched field-by-field against the current output plus widening tables.read's principal policy — a scoped migration of its own, not a follow-up rider on something that isn't broken. Correction to how this was previously described I earlier called this a latent copy of the #6593 bug. The auth coupling is the same; the failure mode is the opposite. enrichTableToolSchema is wired as a tool-level toolEnrichment, and createLLMToolSchema wraps those in ToolSchemaEnrichmentError naming the tool — so a break here fails the Agent block loudly rather than silently degrading the schema the way the workflow and knowledge enrichers did. That is why this is a guard rather than a fix. Type of Change Test / maintainability Testing Verified the guard actually trips: stubbed out the route's checkSessionOrInternalAuth call and the new test failed while the existing PATCH tests stayed green, so it is targeted rather than incidental. bunx vitest run app/api/table/ tools/ — 2,746 passing. Repo-wide lint:check, type-check, and check:api-validation. No runtime behavior change. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing 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 Follow-up to #6593. fetchTableSchema is the last enricher still calling the deprecated buildAuthHeaders, and after #6593 migrated its two siblings in the same file it now reads like a misse...
X Description: Summary Follow-up to #6593. fetchTableSchema is the last enricher still calling the deprecated buildAuthHeaders, and after #6593 migrated its two siblings in the same file it now reads like a misse...
Opengraph URL: https://github.com/simstudioai/sim/pull/6603
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:f350c0b3-ee80-69d2-0883-d3608bd34e22 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | EB30:243AE6:663B33:913D26:6AFB4628 |
| html-safe-nonce | d4977c85cac93065a00ef34f375e71b097e15e67bdc5d2ca83253649d38757d8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjMwOjI0M0FFNjo2NjNCMzM6OTEzRDI2OjZBRkI0NjI4IiwidmlzaXRvcl9pZCI6Ijc1MTc0ODg0MDI1MTQyNjU2NDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d910594e2dfdc773c6916fccf8ea591838f71d5a85a2b03e3f24cbc091fdef27 |
| hovercard-subject-tag | pull_request:4259268171 |
| 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/6603/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 Follow-up to #6593. fetchTableSchema is the last enricher still calling the deprecated buildAuthHeaders, and after #6593 migrated its two siblings in the same file it now reads like a misse... |
| 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