Skip to content

Revert: feat: add account_id param to PATCH /api/sandboxes for Org API keys (#199)#200

Merged
sweetmantech merged 1 commit intotestfrom
revert-pr-199
Feb 4, 2026
Merged

Revert: feat: add account_id param to PATCH /api/sandboxes for Org API keys (#199)#200
sweetmantech merged 1 commit intotestfrom
revert-pr-199

Conversation

@sweetmantech
Copy link
Contributor

@sweetmantech sweetmantech commented Feb 4, 2026

Summary

Reverts PR #199 which was merged before CI tests passed.

The original PR is missing test updates that cause CI to fail.

Next Steps

A new PR with the feature + test fixes will be opened from the updated feature branch.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Optimized authentication validation flow for snapshot patch requests.
    • Restructured data handling to consolidate authentication context with validated request data.
    • Simplified internal validation logic while maintaining consistent error handling across operations.

@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:24pm

@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

The validateSnapshotPatchBody function has been refactored to streamline authentication validation. The account_id field was removed from the schema, and the authentication flow now directly calls validateAuthContext once instead of relying on an accountId override. The return value now merges auth context with body data.

Changes

Cohort / File(s) Summary
Authentication Validation Refactor
lib/sandbox/validateSnapshotPatchBody.ts
Simplified auth flow by removing dual-auth dependency on accountId override; changed SnapshotPatchBody type to extend AuthContext; removed account_id from schema; restructured return to merge auth context with validated body data.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • PR #198: Both PRs directly modify lib/sandbox/validateSnapshotPatchBody.ts and refactor auth/response merging patterns and schema handling.
  • PR #199: Both PRs modify the same file and change how account_id is represented and how validateSnapshotPatchBody handles authentication validation flow.

Poem

🔐 Auth flows now cleaner, one call instead of two,
ContextMerge spreads wide, old accountId bids adieu,
Schema lighter, logic brighter, validation shines through! ✨

🚥 Pre-merge checks | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Solid & Clean Code ⚠️ Warning Code violates DRY and SRP principles with 17+ duplicate validation error handling patterns across the codebase and multiple responsibilities combined in single function. Extract shared error handling into utility function and refactor validator to separate concerns using higher-order functions or middleware pattern for independent testability.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-pr-199

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


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-1770215020)

Score Average Improvements Regressions
Catalog_availability 7% (+7.000000000000001pp) 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 39.35s (-6.38s) 4 🟢 1 🔴

Catalog Songs Count Evaluation (HEAD-1770215020)

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 14.75s (-3.33s) 2 🟢 1 🔴

First Week Album Sales Evaluation (HEAD-1770215020)

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 14.4s (-2.68s) 3 🟢 1 🔴

Memory & Storage Tools Evaluation (HEAD-1770215020)

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 26.09s (+10.1s) - 1 🔴

Monthly Listeners Tracking Evaluation (HEAD-1770215020)

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.51s (-2.17s) 5 🟢 -

Search Web Tool Evaluation (HEAD-1770215020)

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 24.34s (-0.78s) 5 🟢 6 🔴

Social Scraping Evaluation (HEAD-1770215020)

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.95s (+1.44s) 3 🟢 3 🔴

Spotify Followers Evaluation (HEAD-1770215020)

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.03s (-1.86s) 3 🟢 2 🔴

Spotify Tools Evaluation (HEAD-1770215020)

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 32.84s (-2.21s) 1 🟢 1 🔴

TikTok Analytics Questions Evaluation (HEAD-1770215020)

Score Average Improvements Regressions
Question_answered 5% (+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 14.56s (+0.23s) 1 🟢 1 🔴

@sweetmantech sweetmantech merged commit 1377af4 into test Feb 4, 2026
5 checks passed
@sweetmantech sweetmantech deleted the revert-pr-199 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

Comments