Skip to content

Payments Fix#1

Open
michaelzwang13 wants to merge 4 commits into
mainfrom
frontend-integration
Open

Payments Fix#1
michaelzwang13 wants to merge 4 commits into
mainfrom
frontend-integration

Conversation

@michaelzwang13
Copy link
Copy Markdown
Owner

Description

This PR introduces retry logic with exponential backoff for failed Stripe payment requests in order to improve reliability during transient failures.

Motivation

We observed intermittent Stripe timeouts causing failed transactions. This change aims to:
• automatically retry failed requests
• reduce impact of transient network issues
• improve overall payment success rate

Changes
• Added retry wrapper to chargeCustomer function
• Implemented exponential backoff strategy:
• initial delay: 200ms
• max retries: 5
• backoff multiplier: 2x
• Added logging for retry attempts and failures
• Updated environment config for retry toggling

michaelzwang13 and others added 4 commits April 12, 2026 13:38
- Next.js app with dashboard, agent detail views, talent directory, and chat
- Slack OAuth flow with cookie fallback when backend is unavailable
- Backend client proxies credential storage and Slack reads through FastAPI
- Streaming Claude chat per agent and cross-agent global query
- Terminology updated throughout (AI employees, talent directory, hire/let go)
- CORS, allowedDevOrigins, and ngrok support configured
- Backend: auth router, Slack/Gmail OAuth routes, gateway read endpoints
- Migration: expand credentials allowlist to include github and hubspot

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Keep our Slack OAuth, gateway integration, and frontend components
- Take teammate's landing page, backend task dispatch, agent runtime, and tests
- Combine both auth + tasks routers with CORS in backend/main.py
- Accept AGENT_SYSTEM_PROMPT.md rename (case collision fix)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Owner Author

@michaelzwang13 michaelzwang13 left a comment

Choose a reason for hiding this comment

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

Review Summary

Issue: PR description does not match the actual changes

The PR description mentions:

  • Stripe payment retry logic with exponential backoff
  • chargeCustomer function changes
  • Payment reliability improvements

However, the actual code changes are for frontend integration:

  • OAuth callback handlers for GitHub, Gmail, and Slack
  • Chat API route with Anthropic Claude integration
  • Employee management API routes
  • GitHub activity API route
  • .gitignore update

Recommendations

  1. Update PR title and description to accurately reflect the frontend integration work being done. The current description is misleading and could cause confusion during review and future code archaeology.

  2. Security considerations for the OAuth handlers:

    • The GitHub/Gmail callback routes set cookies with sameSite: "none" — ensure this is necessary for your cross-domain setup
    • Consider adding CSRF protection (state parameter) to the OAuth flows
    • The non-null assertions (!) on environment variables could cause runtime errors if env vars are missing — consider validation
  3. Model version: The chat route uses claude-sonnet-4-6 — verify this is the intended model version as Anthropic model names change over time.

Please update the PR description to match the actual changes before merging.

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.

1 participant