Repository navigation
chore(audit): add fetch timeouts on the checkout path - #2562
Conversation
Bound the live checkout fetches with AbortSignal.timeout(30_000) and replace aspectRatio `as any` with an allow-list type guard. Co-authored-by: KK <kk-agent@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
|
Please add a See governance: #898 |
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
Outcome
Live checkout fetches now stop after 30 seconds, matching
apps/web/src/lib/billing/grok-client.ts. The video generate route no longer castsaspectRatiowithas any.Findings
apps/web/src/lib/billing/turnstile.tssiteverifyPOSTnow passessignal: AbortSignal.timeout(30_000).apps/web/src/components/billing/ProCheckoutButton.tsxcheckout fetch.apps/web/src/components/billing/ProRenewPanel.tsxstatus and renew fetches.apps/web/src/components/billing/CheckoutSuccessActivator.tsxactivate fetch.apps/web/src/app/api/video/generate/route.tsreplaces bothaspectRatio as anyuses withisAllowedAspectRatioagainst['16:9', '9:16', '1:1', '4:3'].StudioIdeChat.tsxandlib/action-surface.ts(follow-up on PR feat(web): synchronized Step Runner for Studio Deliverables #2441).rg on this branch: each of those four checkout
fetchcalls has onesignal: AbortSignal.timeout(30_000).rg "as any" apps/web/src/app/api/video/generate/route.tsis empty.Verification
Local, head
9ec93e8d1:npm ci --legacy-peer-depsexit 0cd apps/web && npm run lintexit 0cd apps/web && npm run type-checkexit 0npx vitest run src/lib/billing/__tests__/turnstile.test.ts src/app/api/__tests__/video-generate-route.test.ts— 16 passednpm run build:webexit 0ORIGIN_GATE_REDIS_TESTS=1 npm --workspace=apps/web test— 1560 passed, 1 skipped, 2 failed insrc/lib/__tests__/home-sell-surface.test.tsGitHub checks on this PR:
buildpassed (https://github.com/groupthinking/EventRelay/actions/runs/41670542455/job/126037407575)lint-frontend, both Pythontestjobs, security scans, and coverage passedtest-frontendfailed on the same twohome-sell-surface.test.tsassertions already failing onmain(cd7e1998f, run https://github.com/groupthinking/EventRelay/actions/runs/41659258955): the test wantsprepares proposed work and build rails for you to review in Studio, andapp/page.tsxsaysStudio prepares proposed work and build rails for you to review.This diff does not touch that file. Vitest artifact: 1560 passed, 2 failed, same counts asmain.No Python files changed.
Closing keyword check
Risk
Low. A hung checkout request now rejects through the existing catch paths. Invalid aspect ratios still return 400. Rollback is reverting this commit.
Related: #2328
Closes #2580