René's URL Explorer Experiment


Title: refactor(table): move the internal row routes onto the application boundary by waleedlatif1 · Pull Request #6809 · simstudioai/sim · GitHub

Open Graph Title: refactor(table): move the internal row routes onto the application boundary by waleedlatif1 · Pull Request #6809 · simstudioai/sim

X Title: refactor(table): move the internal row routes onto the application boundary by waleedlatif1 · Pull Request #6809 · simstudioai/sim

Description: Summary Stacked on #6808. Moves the internal table row routes onto the application boundary — the routes that authorized in their own handlers and queried the database from the adapter. rows/[rowId] (GET/PATCH/DELETE) is 127 lines instead of 274, with no @sim/db, no drizzle and no checkAccess. rows/upsert and the enrichment-detail route follow the same shape. Both internal direct-DB adapters are now closed. Only the v1 one remains (see below). Migrating surfaced why the violation existed: write-provenance resolution needs the canonical schema to map a caller's column key to the storage column it certifies, and the adapter could only do that because it was already loading the table illegally. The envelope now splits on the real seam — the adapter reads the header and payload field (transport), the use case resolves the selections against the canonical table (domain). That split preserves a distinction the defaulting logic would erase: an internal caller that sends no envelope stays deliberately untracked. Defaulting it to exact-empty would certify "this write introduced no secrets" on a runtime write that may well have introduced some. present() now receives the same { principal, input } its sibling hooks responseHeaders and finalizeResponse already got. These routes serve a session and a workflow execution on one path and owe them different column keyings, so rendering per caller kind is presentation, not domain — a gap in the builder rather than a special case for one route. tableRowWireSchema describes what the single-row routes actually return. The contract claimed a full TableRow with the executions sidecar and Date objects — true of the list route, never true here. The hand-rolled handlers were never validated against their own contracts, so the drift was invisible. New use case readTableRowEnrichmentDetail, sharing tableOperations.readRow since it is a projection of the same row under the same role. Deliberate wire changes Both follow from adopting the shared concealment policy, and both are narrower than what they replace: a cross-tenant table conceals as 404 where the old blanket handler answered 403, while an in-workspace role denial still answers 403. The upsert row now carries position, which every other single-row response already returned. Nothing in hooks/queries/tables.ts branches on either status. Not in this PR v1/tables/[tableId]/rows/[rowId] is the last direct-DB adapter. It resolves its actor through resolveWorkspaceRequestActor rather than the canonical resolvePrincipalAttribution the use cases use, so migrating it changes billing attribution for workspace API keys. That deserves its own analysis rather than being folded in here. rows, query and rows/find are also still on the legacy pattern. Wire changes Beyond the refactor, four intended differences on the three migrated routes: Cross-tenant denial is now concealed as 404 Table not found instead of 403. In-workspace role denials still answer 403. This matches what v2 and the ~80 other routes on the shared builder already do, and it stops the internal surface confirming a table's existence to a non-member. Workspace mismatch answers 404 rather than 400. An unclassified failure answers 500 Internal server error rather than leaking the message. The upsert response now carries position, which the sibling GET/PATCH already emitted. No client branches on any of the changed statuses or strings — hooks/queries/tables.ts inspects only 423 for the lock. Type of Change Refactor Bug fix (contract drift, provenance certification) Testing Tested manually. 2,785 tests pass, type-check clean, all 29 audits pass. Every behavioural change is mutation-tested — forcing one keying, dropping the actor, pre-resolving the envelope, certifying an untracked internal write, and skipping the bundle completeness check each turn the covering tests red. The upsert and enrichment surfaces had no route-level tests before; they do now. 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 Stacked on #6808. Moves the internal table row routes onto the application boundary — the routes that authorized in their own handlers and queried the database from the adapter. rows/[rowI...

X Description: Summary Stacked on #6808. Moves the internal table row routes onto the application boundary — the routes that authorized in their own handlers and queried the database from the adapter. rows/[rowI...

Opengraph URL: https://github.com/simstudioai/sim/pull/6809

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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-controllerpull_requests
route-actionfiles
fetch-noncev2:aadc2f71-1331-99b7-0767-be50c3b867c4
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCC78:11532:924666:CF23E7:6AFB5128
html-safe-nonce8a4afc22f26387a7e16ca59c263c3255bf40265ded05608b8102fc2081ea3465
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzc4OjExNTMyOjkyNDY2NjpDRjIzRTc6NkFGQjUxMjgiLCJ2aXNpdG9yX2lkIjoiNjU2NTI2OTY3NTk3MjQ0ODU1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace220f444f0d4616f947a9613e512b400f9f35848eb5916a927767d22cb23327d
hovercard-subject-tagpull_request:4301600946
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6809/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Stacked on #6808. Moves the internal table row routes onto the application boundary — the routes that authorized in their own handlers and queried the database from the adapter. rows/[rowI...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6809/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6809%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6809%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6809/files
Reloadhttps://github.com/simstudioai/sim/pull/6809/files
Reloadhttps://github.com/simstudioai/sim/pull/6809/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
refactor/table-rows-application-boundaryhttps://github.com/simstudioai/sim/tree/refactor/table-rows-application-boundary
refactor/table-internal-row-route-boundaryhttps://github.com/simstudioai/sim/tree/refactor/table-internal-row-route-boundary
Conversation 12 https://github.com/simstudioai/sim/pull/6809
Commits 7 https://github.com/simstudioai/sim/pull/6809/commits
Checks 5 https://github.com/simstudioai/sim/pull/6809/checks
Files changed https://github.com/simstudioai/sim/pull/6809/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6809/files
refactor(table): move the internal row routes onto the application boundary https://github.com/simstudioai/sim/pull/6809/files#top
Show all changes 7 commits https://github.com/simstudioai/sim/pull/6809/files
d038f52 refactor(table): move the single-row route onto the application boundary waleedlatif1 Aug 18, 2026 https://github.com/simstudioai/sim/pull/6809/commits/d038f521b9b75374bf7d18457b9178cd8450df02
ff80f2c refactor(table): move the upsert route onto the application boundary waleedlatif1 Aug 18, 2026 https://github.com/simstudioai/sim/pull/6809/commits/ff80f2c970b398e3e4d145f46c83bcf8ade7d99c
1fa9afb refactor(table): move the enrichment-detail route onto the applicatio… waleedlatif1 Aug 18, 2026 https://github.com/simstudioai/sim/pull/6809/commits/1fa9afb7cbee704f6e48d3bbc4094010a773d28f
5915fe3 fix(table): mirror the storage rule when keying write provenance waleedlatif1 Aug 18, 2026 https://github.com/simstudioai/sim/pull/6809/commits/5915fe39b26c5a91af0f6519dd3baa30f78fff5c
ff6e61c fix(table): restore executor access to the migrated row routes waleedlatif1 Aug 18, 2026 https://github.com/simstudioai/sim/pull/6809/commits/ff6e61c873f731a9381da2f1366d251fc6b434bd
9b1b0d0 fix(table): keep the lock on a 423 and pin the remaining wire changes waleedlatif1 Aug 18, 2026 https://github.com/simstudioai/sim/pull/6809/commits/9b1b0d0f7c05a13fda683846da8229672a4138bb
7f9a1de refactor(table): apply the quality pass waleedlatif1 Aug 18, 2026 https://github.com/simstudioai/sim/pull/6809/commits/7f9a1dea4442099917f6d4c2489a4598f6a5f410
Clear filters https://github.com/simstudioai/sim/pull/6809/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6809/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6809/files
route.test.ts https://github.com/simstudioai/sim/pull/6809/files#diff-e655576b25c88807612b7dbb5f2b2ca32f31579d447c0a105f4fa17fdc3a9dec
route.ts https://github.com/simstudioai/sim/pull/6809/files#diff-a02fec1a4feefd2ace8a17677786bb4219349c30bb1446071f2eb8e2714829f2
route.test.ts https://github.com/simstudioai/sim/pull/6809/files#diff-8f932a4e86740bee41c08169a7c43a5ef46462d32e554664fd8335f298f2bcda
route.ts https://github.com/simstudioai/sim/pull/6809/files#diff-645eb9cb737e88d528c2fa56a12f66b9a1195ab8f139fe7ccd8a288593533f38
route.test.ts https://github.com/simstudioai/sim/pull/6809/files#diff-22f2152441bb03dcefd1ceb7d64d922ecddabbb0e62e72539bf2edd616141288
route.ts https://github.com/simstudioai/sim/pull/6809/files#diff-0f0b09ebc40935db7a10eaf876c152b022cb3c6274986c64cc713e2441c65db9
row-secret-provenance.ts https://github.com/simstudioai/sim/pull/6809/files#diff-17df80908e894563ce78df28f7cb008e44445c3b9e250ac6cf00fce81113c1f5
row-wire.ts https://github.com/simstudioai/sim/pull/6809/files#diff-23d8d71abc8873db396db63b1874e97875de87073f5450c636b8085fcd339f39
table-tool-auth.test.ts https://github.com/simstudioai/sim/pull/6809/files#diff-b77f156c6ec36af0f58a17ce65cbf6d4b03787508e9fb59c91a9b3be941c6fbf
tables.ts https://github.com/simstudioai/sim/pull/6809/files#diff-927ba827479bb6f5c0c9cee9dfe1067112e939610060f6a1e939f232b976257d
internal-json-route.ts https://github.com/simstudioai/sim/pull/6809/files#diff-97b2f3cc3f5b8e62f536c627f6b57d8e215978dd86069d159dfe2f1e98c88da8
update-row.test.ts https://github.com/simstudioai/sim/pull/6809/files#diff-e8d9471b9eadbae982819875ea48865b31f9e068727463f31d484deb0a748939
row-route-policies.ts https://github.com/simstudioai/sim/pull/6809/files#diff-a6f13727267471970feb825ed0408a053bdf4ca63e57ff17c69c3f9822d1c748
operations.test.ts https://github.com/simstudioai/sim/pull/6809/files#diff-015a2cf67b00f6fefc1b73c908edc24a6db5a18d79f9b8fb8b9971c7bbd62fba
operations.ts https://github.com/simstudioai/sim/pull/6809/files#diff-7ac22c9f7a2f7d3c72584c0226da5b5523e52f1bff56e1c5362fc336b1326024
row-secret-provenance.test.ts https://github.com/simstudioai/sim/pull/6809/files#diff-144b0c1f0114ff0623e66c7f133e21f278cb0c7c002bc16a7dfe07bb16307ebd
row-secret-provenance.ts https://github.com/simstudioai/sim/pull/6809/files#diff-67be03f53a9ef96132b1b7bc6880357979fe33e2b26c34e27abf8f05a228a4c8
rows.test.ts https://github.com/simstudioai/sim/pull/6809/files#diff-4f91ef4046401cb100975937adc02bbe1b1eb74a0b78676413331558b6a5c70f
rows.ts https://github.com/simstudioai/sim/pull/6809/files#diff-54e60750fc863d4d4f70a80d2ae0f09bc223d6a42faf574f94f93fa8c935063b
events.attribution.test.ts https://github.com/simstudioai/sim/pull/6809/files#diff-e52fb0b21a18dd4954496acffcbd9323004d053b5516ae73fd6491f120b74078
service.ts https://github.com/simstudioai/sim/pull/6809/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
trigger.ts https://github.com/simstudioai/sim/pull/6809/files#diff-9f55fbdc1a1fc17cdf6207d6edb8cc18712ba68b6a3f1530ea0be00c91a4c711
types.ts https://github.com/simstudioai/sim/pull/6809/files#diff-d1e7779b43ae63cc518e46dc1391df909007ee5cd0f9ee4c920688b1111e2cf1
delete_row.ts https://github.com/simstudioai/sim/pull/6809/files#diff-6d1a9460e6d786f200b638f7dcc98f3ae7cc582bd329e9e4f73a2e219ba6d3eb
get_row.ts https://github.com/simstudioai/sim/pull/6809/files#diff-eb361a0ab56ff84023091c14b3c5ffe9fc91e6918ea423150f4b3b492c560595
update_row.ts https://github.com/simstudioai/sim/pull/6809/files#diff-8ad3e5cf54f89a54d011d4f13447b10f6163f05f381fde2c5c98afa10dea676d
upsert_row.ts https://github.com/simstudioai/sim/pull/6809/files#diff-c6b92ff2ed017b6e01e3e881a07c77810165967b8443210acb1c1cc800c81da1
table.factory.ts https://github.com/simstudioai/sim/pull/6809/files#diff-541802d6d0f736d172ef51a0684a7b17bb2946b04a9ca65552234994adfcf666
apps/sim/app/api/table/[tableId]/rows/[rowId]/enrichment/[groupId]/route.test.tshttps://github.com/simstudioai/sim/pull/6809/files#diff-e655576b25c88807612b7dbb5f2b2ca32f31579d447c0a105f4fa17fdc3a9dec
View file https://github.com/simstudioai/sim/blob/7f9a1dea4442099917f6d4c2489a4598f6a5f410/apps/sim/app/api/table/%5BtableId%5D/rows/%5BrowId%5D/enrichment/%5BgroupId%5D/route.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6809/{{ revealButtonHref }}
apps/sim/app/api/table/[tableId]/rows/[rowId]/enrichment/[groupId]/route.tshttps://github.com/simstudioai/sim/pull/6809/files#diff-a02fec1a4feefd2ace8a17677786bb4219349c30bb1446071f2eb8e2714829f2
View file https://github.com/simstudioai/sim/blob/7f9a1dea4442099917f6d4c2489a4598f6a5f410/apps/sim/app/api/table/%5BtableId%5D/rows/%5BrowId%5D/enrichment/%5BgroupId%5D/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6809/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/6809/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6809/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.