Skip to content

feat: save sandbox info to account_sandboxes table - #182

Merged
sweetmantech merged 3 commits into
testfrom
sweetmantech/myc-4091-api-apisandboxes-save-sandbox-info-to-account_sandboxes
Feb 2, 2026
Merged

sweetmantech merged 3 commits into
testfrom
sweetmantech/myc-4091-api-apisandboxes-save-sandbox-info-to-account_sandboxes

Conversation

@sweetmantech

Copy link
Copy Markdown
Contributor

Summary

  • Added insertAccountSandbox function to save sandbox records to the account_sandboxes table
  • Updated createSandboxPostHandler to persist sandbox info after sandbox creation
  • Updated database types to include the account_sandboxes table schema

Test plan

  • Verify POST /api/sandboxes creates a sandbox successfully
  • Verify sandbox record is saved to account_sandboxes table with correct account_id and sandbox_id
  • Verify authentication is required (401 without auth)

🤖 Generated with Claude Code

- Add insertAccountSandbox function in lib/supabase/account_sandboxes
- Update createSandboxPostHandler to save sandbox to database after creation
- Update database types to include account_sandboxes table

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jan 30, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
recoup-api Ready Ready Preview Feb 2, 2026 1:04pm

@coderabbitai

coderabbitai Bot commented Jan 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sweetmantech/myc-4091-api-apisandboxes-save-sandbox-info-to-account_sandboxes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jan 30, 2026 •

Copy link
Copy Markdown

Braintrust eval report

Catalog Opportunity Analysis Evaluation (HEAD-1770037407)

Score Average Improvements Regressions
Catalog_availability 28.5% (+25pp) 3 🟢 1 🔴
Llm_calls 0 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 38.99s (+0.15s) 3 🟢 2 🔴

Catalog Songs Count Evaluation (HEAD-1770037407)

Score Average Improvements Regressions
AnswerCorrectness 19.2% (0pp) 1 🟢 2 🔴
Factuality 66.7% (+0pp) - -
Llm_calls 4 (+1.33) 1 🟢 -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (-499.33tok) 1 🟢 -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (-124.67tok) 1 🟢 -
Completion_reasoning_tokens 0tok (+0tok) - -
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 0tok (-624tok) 1 🟢 -
Duration 17.01s (-1.09s) 2 🟢 1 🔴

First Week Album Sales Evaluation (HEAD-1770037407)

Score Average Improvements Regressions
Factuality 80% (+25pp) 1 🟢 -
Llm_calls 1 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 23.48s (+4.49s) 1 🟢 3 🔴

Memory & Storage Tools Evaluation (HEAD-1770037407)

Score Average Improvements Regressions
Tools_called 0% (+0pp) - -
Llm_calls 0 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 30.39s (+8.14s) - 1 🔴

Monthly Listeners Tracking Evaluation (HEAD-1770037407)

Score Average Improvements Regressions
AnswerSimilarity 78% (-1pp) 3 🟢 2 🔴
Llm_calls 2 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 16.53s (-0.43s) 3 🟢 2 🔴

Search Web Tool Evaluation (HEAD-1770037407)

Score Average Improvements Regressions
AnswerCorrectness 27% (-2pp) 5 🟢 6 🔴
Llm_calls 3 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 29.18s (-2.04s) 6 🟢 5 🔴

Social Scraping Evaluation (HEAD-1770037407)

Score Average Improvements Regressions
Tools_called 0% (+0pp) - -
Llm_calls 0 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 24.74s (-5.77s) 4 🟢 2 🔴

Spotify Followers Evaluation (HEAD-1770037407)

Score Average Improvements Regressions
AnswerCorrectness 20.1% (-1pp) 1 🟢 4 🔴
Llm_calls 3 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 18.76s (+2.35s) 1 🟢 4 🔴

Spotify Tools Evaluation (HEAD-1770037407)

Score Average Improvements Regressions
Tools_called 0% (+0pp) - -
Llm_calls 0 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 36.94s (-3.47s) 2 🟢 -

TikTok Analytics Questions Evaluation (HEAD-1770037407)

Score Average Improvements Regressions
Question_answered 0% (+0pp) - -
Llm_calls 0 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 16.07s (-7.72s) 2 🟢 -

- Add tests for insertAccountSandbox function (success, error, FK constraint)
- Update createSandboxPostHandler tests to mock insertAccountSandbox
- Add test verifying insertAccountSandbox is called with correct params
- Add test for error handling when DB insert fails

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use TablesInsert<"account_sandboxes"> instead of verbose Database path (KISS)
- Add explicit InsertAccountSandboxResult return type for type safety

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@sweetmantech
sweetmantech merged commit e513fd7 into test Feb 2, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — ace4ee3a Deployed Feb 2, 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.

1 participant