Skip to content

Production readiness hardening for MotionCode - #2

Merged
shashank03-dev merged 9 commits into
mainfrom
codex/motioncode-production-readiness
Jun 6, 2026
Merged

shashank03-dev merged 9 commits into
mainfrom
codex/motioncode-production-readiness

Conversation

@shashank03-dev

Copy link
Copy Markdown
Owner

Summary

  • Move Gemini analysis behind a server route with validated request/response schemas, safe public errors, and production durable quota requirements through Upstash Redis REST.
  • Harden media extraction and app UX, including stale-frame clearing for invalid replacement uploads, accessible upload/scorecard interactions, and truthful pricing/landing copy.
  • Add route completeness, security headers, CI, Playwright smoke tests, production docs, dependency cleanup, and Next 16/audit-safe dependency updates.

Verification

  • npm ci
  • npm run typecheck
  • npm run lint
  • npm test (48 tests)
  • npm run test:e2e (4 tests)
  • npm run build
  • npm audit --omit=dev --audit-level=moderate
  • npm audit --audit-level=moderate
  • strict review pass completed; review findings were patched before this PR

Deployment Notes

  • Production analysis now requires GEMINI_API_KEY, UPSTASH_REDIS_REST_URL, and UPSTASH_REDIS_REST_TOKEN.
  • Local development and tests keep the in-memory quota fallback.

@vercel

vercel Bot commented Jun 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
motion-code Ready Ready Preview, Comment Jun 6, 2026 10:02am

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 063ffd99b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/api/analyze/route.ts Outdated
Comment on lines +73 to +75
return NextResponse.json(
{ error: publicErrorMessage(error) },
{ status: 400 },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Return server errors for provider/quota failures

When the durable quota store is unavailable or Gemini fails, those exceptions flow into this catch and are reported as HTTP 400. In production that makes transient server/provider failures look like malformed client requests, so API callers and monitoring that distinguish 4xx from 5xx will not treat a valid upload as retryable or operationally broken; keep 400 for parse/validation errors and return a 5xx for internal dependency failures.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4694ab2: /api/analyze now keeps malformed JSON/schema validation at HTTP 400 and returns HTTP 500 for Gemini/quota/internal dependency failures. Added unit coverage for the status classifier and route regressions.

@shashank03-dev
shashank03-dev merged commit 3e35a19 into main Jun 6, 2026
3 checks passed
@shashank03-dev
shashank03-dev deleted the codex/motioncode-production-readiness branch June 6, 2026 10:03

This branch was successfully deployed

1 active deployment
Preview — 4694ab2f Deployed Jun 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants