René's URL Explorer Experiment


Title: chore(api): remove a dead route builder, bound folder-index reads, reject invalid cursors by waleedlatif1 · Pull Request #6568 · simstudioai/sim · GitHub

Open Graph Title: chore(api): remove a dead route builder, bound folder-index reads, reject invalid cursors by waleedlatif1 · Pull Request #6568 · simstudioai/sim

X Title: chore(api): remove a dead route builder, bound folder-index reads, reject invalid cursors by waleedlatif1 · Pull Request #6568 · simstudioai/sim

Description: Stacked on #6567 → #6565 → #6560. Review only this PR's own commits; merge after its parents. Three independent tidies from the v2 parity audit, one commit each. All are incomplete application of new work rather than regressions from main. 1. Dead route builder and 27 dead endpoint labels withPublicApiRouteHandler (~80 lines) had zero production callers — referenced only by its own test and two regexes in the audit script that existed to recognize it. It shipped in #5273 alongside 27 extra ApiEndpoint members, but the v2 surface actually runs on defineV2JsonRoute + v2RateLimits.publicApi. Verified by string literal, not just by symbol: each of the 46 members was grepped as a bare string across apps/, packages/, and scripts/, then narrowed to the only two positions that reach telemetry (checkRateLimit, authenticateRequest). 19 are live and kept. The decisive fact is that v2RateLimits never reads an ApiEndpoint, so no removed label can be emitted by any v2 route. Ratchet metrics are byte-identical before and after (1093 routes, 1093 Zod-backed, 0 non-Zod) — the builder lived outside a route.ts path, so it was never counted as a route. 2. Unbounded folder-index reads loadActiveFolderPathIndex was called without maxRows at 15 sites, while adjacent code two lines away passed the cap. Rather than paste the constant 15 more times, the cap is now the function's default. Safe because it throws (FolderCollectionLimitExceededError) rather than truncating, the query uses .limit(maxRows + 1) so a workspace exactly at the cap still passes, and folder creation already refuses at the same ceiling. Every domain constant is the identical value — MAX_KNOWLEDGE_FOLDERS_PER_WORKSPACE is literally an alias. 3. Invalid cursors silently restarting pagination GET /api/v2/tables/{tableId}/rows coerced an undecodable cursor to offset 0 and re-served page 1 — which can make a paging client loop forever. Eight sibling v2 cursor lists already reject; this route was the sole outlier. Extracted decodeOffsetCursor beside the existing decodeSortedCursor (the only two routes using the offset shape). Kept the literal 'Invalid cursor' rather than INVALID_CURSOR_MESSAGE, whose text is sort-mismatch-specific and would be wrong here. Reverting each fix turns its tests red. type-check · biome · 633 tests · check:api-validation · check:openapi — all pass. Follow-up left undone: maxRows: MAX_FOLDERS_PER_WORKSPACE is now redundant at ~25 call sites, but removing it means edits far outside this diff and would break tests asserting it explicitly.

Open Graph Description: Stacked on #6567 → #6565 → #6560. Review only this PR's own commits; merge after its parents. Three independent tidies from the v2 parity audit, one commit each. All are incomplete application ...

X Description: Stacked on #6567 → #6565 → #6560. Review only this PR's own commits; merge after its parents. Three independent tidies from the v2 parity audit, one commit each. All are incomplete applicat...

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

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:398a4496-756b-03d8-d5da-ba0dfce96614
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idAA64:3722BA:9996:D89E:6AFB42F1
html-safe-nonce76b0f33a37248c1ff769493b79c435f7f97ff3ad744bfec5b1c635c97a7eb7ea
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTY0OjM3MjJCQTo5OTk2OkQ4OUU6NkFGQjQyRjEiLCJ2aXNpdG9yX2lkIjoiNTQyMDI0NDk3NTU0NTQzNDg2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6901f2433d29d2bca5a13094feaf1fc86c639a3ae333202836b758c90ddc569d
hovercard-subject-tagpull_request:4257632862
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/6568/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:altStacked on #6567 → #6565 → #6560. Review only this PR's own commits; merge after its parents. Three independent tidies from the v2 parity audit, one commit each. All are incomplete application ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd
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
releasea6c2f87cbcb6414452377b4967858ed6a66f1109
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6568/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6568%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%2F6568%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/6568/files
Reloadhttps://github.com/simstudioai/sim/pull/6568/files
Reloadhttps://github.com/simstudioai/sim/pull/6568/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests200 (200)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
improvement/v2-route-standardizationhttps://github.com/simstudioai/sim/tree/improvement/v2-route-standardization
chore/v2-dead-code-and-boundshttps://github.com/simstudioai/sim/tree/chore/v2-dead-code-and-bounds
Conversation 7 https://github.com/simstudioai/sim/pull/6568
Commits 3 https://github.com/simstudioai/sim/pull/6568/commits
Checks 5 https://github.com/simstudioai/sim/pull/6568/checks
Files changed https://github.com/simstudioai/sim/pull/6568/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6568/files
chore(api): remove a dead route builder, bound folder-index reads, reject invalid cursors https://github.com/simstudioai/sim/pull/6568/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/6568/files
aa8f09a chore(api): remove the unused public API route builder and dead endpo… waleedlatif1 Aug 11, 2026 https://github.com/simstudioai/sim/pull/6568/commits/aa8f09a034cc863e761b629465e988219ca691ea
46f9c2f fix(folders): bound the workflow folderId-branch path index reads waleedlatif1 Aug 11, 2026 https://github.com/simstudioai/sim/pull/6568/commits/46f9c2f250330a0a518a9bb3f802a0cd203a27f8
23b7792 fix(api): reject an undecodable offset cursor on v2 table rows waleedlatif1 Aug 11, 2026 https://github.com/simstudioai/sim/pull/6568/commits/23b779277146c2b0cf62a1b589c95dbbeda713a9
Clear filters https://github.com/simstudioai/sim/pull/6568/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6568/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6568/files
public-api-route-handler.test.ts https://github.com/simstudioai/sim/pull/6568/files#diff-5000d780a1dbb94a53602d0fb928a61d45e8ed6243a747e377e6e03a5752147a
public-api-route-handler.ts https://github.com/simstudioai/sim/pull/6568/files#diff-cd6d68e413610bb21c64b4b7f9a5da7f0020d9c923b01f56c6d1413c6ce6b0b2
middleware.ts https://github.com/simstudioai/sim/pull/6568/files#diff-92f74d9ee4f123e429cd83a651c51fe276952d40ddd7fea7b0cb32bc48593ffe
route.ts https://github.com/simstudioai/sim/pull/6568/files#diff-a8e1d9283f3e9c6520683be558a41c2bdd0391725803519cc99d9a3fd4d204b5
response.ts https://github.com/simstudioai/sim/pull/6568/files#diff-5846b44ffd25e5e2483dcdd64d5cbb796d06236d4e86bb0d7a670b32b8220851
route.test.ts https://github.com/simstudioai/sim/pull/6568/files#diff-d0f5df963e05fd85c694d1add485441b0aed45698c91c6c44652d27d543cd668
route.ts https://github.com/simstudioai/sim/pull/6568/files#diff-5ba547bb6177e2911f3be66d288e8195ee633d070f135117e0d5e4903b803231
queries.test.ts https://github.com/simstudioai/sim/pull/6568/files#diff-76c466bd8dd934f65570b800c2e539a2e034da449727b0a9c354c0e259c8dea2
queries.ts https://github.com/simstudioai/sim/pull/6568/files#diff-8c09d4934ac710b9fc5d471563a51c44da290d6daee339c54f2d124faad282e4
create-workflow.ts https://github.com/simstudioai/sim/pull/6568/files#diff-06c4ff4755f774eb9a01e98605606f658f9bec1c972aaf369764504d9e83e1dc
update-workflow.ts https://github.com/simstudioai/sim/pull/6568/files#diff-8383fddc927e37eb61053ebbe3749a554e38d75a03b7f6b8fe978a852bc66c49
workflow-crud.test.ts https://github.com/simstudioai/sim/pull/6568/files#diff-1dab0db07c56867d10da13af0b466c5d630bc9c006f8e696cb19b2ef6169af7c
check-api-validation-contracts.ts https://github.com/simstudioai/sim/pull/6568/files#diff-48ae6a4d0c1f820d5b644522d25742bb29af758bc8350f1a3cf3f8afa0bd00b0
apps/sim/app/api/public-api-route-handler.test.tshttps://github.com/simstudioai/sim/pull/6568/files#diff-5000d780a1dbb94a53602d0fb928a61d45e8ed6243a747e377e6e03a5752147a
View file https://github.com/simstudioai/sim/blob/79a3486a364b6a34cb1a31350c9a5b07780f7fdb/apps/sim/app/api/public-api-route-handler.test.ts
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/simstudioai/sim/pull/6568/files
apps/sim/app/api/public-api-route-handler.tshttps://github.com/simstudioai/sim/pull/6568/files#diff-cd6d68e413610bb21c64b4b7f9a5da7f0020d9c923b01f56c6d1413c6ce6b0b2
View file https://github.com/simstudioai/sim/blob/79a3486a364b6a34cb1a31350c9a5b07780f7fdb/apps/sim/app/api/public-api-route-handler.ts
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/simstudioai/sim/pull/6568/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6568/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6568/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.