Skip to content

Comments

feat: add account_id param to PATCH /api/sandboxes for Org API keys#201

Merged
sweetmantech merged 1 commit intotestfrom
sweetmantech/myc-4132-api-filetree-patch-apisandboxessnapshot-accept-account_id
Feb 4, 2026
Merged

feat: add account_id param to PATCH /api/sandboxes for Org API keys#201
sweetmantech merged 1 commit intotestfrom
sweetmantech/myc-4132-api-filetree-patch-apisandboxessnapshot-accept-account_id

Conversation

@sweetmantech
Copy link
Contributor

Summary

  • Added optional account_id parameter to PATCH /api/sandboxes endpoint
  • Organization API keys can now update snapshots for any account within their organization
  • Personal API keys cannot use this parameter (returns 403 if attempted)

Changes

  • Updated validateSnapshotPatchBody.ts:
    • Added account_id (UUID) to request body schema
    • Pass account_id to validateAuthContext for authorization
  • Updated tests to match new behavior

Reference

Test plan

  • Unit tests pass
  • Org API key can update snapshot for member account using account_id
  • Personal API key updating own account (no account_id) works
  • Personal API key using account_id returns 403
  • Org API key using account_id for non-member account returns 403

🤖 Generated with Claude Code

Add optional account_id parameter to UpdateSnapshotRequest, allowing
organization API keys to update snapshots for any account within their
organization. Personal API keys cannot use this parameter.

Changes:
- Added account_id (UUID) to request body schema
- Pass account_id to validateAuthContext for authorization
- Updated tests to match new behavior

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@vercel
Copy link
Contributor

vercel bot commented Feb 4, 2026

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

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

@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

Warning

Rate limit exceeded

@sweetmantech has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 20 minutes and 56 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ 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-4132-api-filetree-patch-apisandboxessnapshot-accept-account_id

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
Copy link

github-actions bot commented Feb 4, 2026

Braintrust eval report

Catalog Opportunity Analysis Evaluation (HEAD-1770215374)

Score Average Improvements Regressions
Catalog_availability 20% (+13pp) 1 🟢 2 🔴
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 43.15s (+3.8s) 2 🟢 3 🔴

Catalog Songs Count Evaluation (HEAD-1770215374)

Score Average Improvements Regressions
Llm_calls 4 (+0) - -
Tool_calls 0 (+0) - -
Errors 3 (+0) - -
Llm_errors 1 (+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 11.14s (-3.61s) 3 🟢 -

First Week Album Sales Evaluation (HEAD-1770215374)

Score Average Improvements Regressions
Llm_calls 1 (+0) - -
Tool_calls 0 (+0) - -
Errors 1 (+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 13.18s (-1.21s) 3 🟢 1 🔴

Memory & Storage Tools Evaluation (HEAD-1770215374)

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 18.33s (-7.76s) 1 🟢 -

Monthly Listeners Tracking Evaluation (HEAD-1770215374)

Score Average Improvements Regressions
Llm_calls 2 (+0) - -
Tool_calls 0 (+0) - -
Errors 2 (+0) - -
Llm_errors 1 (+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 12.48s (-0.03s) 3 🟢 2 🔴

Search Web Tool Evaluation (HEAD-1770215374)

Score Average Improvements Regressions
Llm_calls 3 (+0) - -
Tool_calls 0 (+0) - -
Errors 2 (+0) - -
Llm_errors 1 (+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 27s (+2.66s) 2 🟢 9 🔴

Social Scraping Evaluation (HEAD-1770215374)

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 23.99s (-6.96s) 5 🟢 1 🔴

Spotify Followers Evaluation (HEAD-1770215374)

Score Average Improvements Regressions
Llm_calls 3 (+0) - -
Tool_calls 0 (+0) - -
Errors 3 (+0) - -
Llm_errors 2 (+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 14.62s (+0.59s) 3 🟢 2 🔴

Spotify Tools Evaluation (HEAD-1770215374)

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 32s (-0.84s) 2 🟢 -

TikTok Analytics Questions Evaluation (HEAD-1770215374)

Score Average Improvements Regressions
Question_answered 0% (-5pp) - 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 13.48s (-1.08s) 2 🟢 -

@sweetmantech sweetmantech merged commit bd98e82 into test Feb 4, 2026
5 checks passed
@sweetmantech sweetmantech mentioned this pull request Feb 4, 2026
@sweetmantech sweetmantech deleted the sweetmantech/myc-4132-api-filetree-patch-apisandboxessnapshot-accept-account_id branch February 4, 2026 14:55
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