Skip to content

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

Merged
sweetmantech merged 1 commit into
testfrom
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 into
testfrom
revert-pr-199

Conversation

@sweetmantech

@sweetmantechsweetmantech commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

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

vercelBot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
recoup-apiReadyReadyPreviewFeb 4, 2026 2:24pm

@coderabbitai

coderabbitaiBot commented Feb 4, 2026

Copy link
Copy Markdown
📝 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 nameStatusExplanationResolution
Solid & Clean Code⚠️ WarningCode 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

github-actionsBot commented Feb 4, 2026

Copy link
Copy Markdown

Braintrust eval report

Catalog Opportunity Analysis Evaluation (HEAD-1770215020)

ScoreAverageImprovementsRegressions
Catalog_availability7% (+7.000000000000001pp)2 🟢-
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration39.35s (-6.38s)4 🟢1 🔴

Catalog Songs Count Evaluation (HEAD-1770215020)

ScoreAverageImprovementsRegressions
Llm_calls4 (+0)--
Tool_calls0 (+0)--
Errors3 (+0)--
Llm_errors1 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration14.75s (-3.33s)2 🟢1 🔴

First Week Album Sales Evaluation (HEAD-1770215020)

ScoreAverageImprovementsRegressions
Llm_calls1 (+0)--
Tool_calls0 (+0)--
Errors1 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration14.4s (-2.68s)3 🟢1 🔴

Memory & Storage Tools Evaluation (HEAD-1770215020)

ScoreAverageImprovementsRegressions
Tools_called0% (+0pp)--
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration26.09s (+10.1s)-1 🔴

Monthly Listeners Tracking Evaluation (HEAD-1770215020)

ScoreAverageImprovementsRegressions
Llm_calls2 (+0)--
Tool_calls0 (+0)--
Errors2 (+0)--
Llm_errors1 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration12.51s (-2.17s)5 🟢-

Search Web Tool Evaluation (HEAD-1770215020)

ScoreAverageImprovementsRegressions
Llm_calls3 (+0)--
Tool_calls0 (+0)--
Errors2 (+0)--
Llm_errors1 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration24.34s (-0.78s)5 🟢6 🔴

Social Scraping Evaluation (HEAD-1770215020)

ScoreAverageImprovementsRegressions
Tools_called0% (+0pp)--
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration30.95s (+1.44s)3 🟢3 🔴

Spotify Followers Evaluation (HEAD-1770215020)

ScoreAverageImprovementsRegressions
Llm_calls3 (+0)--
Tool_calls0 (+0)--
Errors3 (+0)--
Llm_errors2 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration14.03s (-1.86s)3 🟢2 🔴

Spotify Tools Evaluation (HEAD-1770215020)

ScoreAverageImprovementsRegressions
Tools_called0% (+0pp)--
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration32.84s (-2.21s)1 🟢1 🔴

TikTok Analytics Questions Evaluation (HEAD-1770215020)

ScoreAverageImprovementsRegressions
Question_answered5% (+0pp)--
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration14.56s (+0.23s)1 🟢1 🔴

@sweetmantech
sweetmantech merged commit 1377af4 into testFeb 4, 2026
5 checks passed
@sweetmantech
sweetmantech deleted the revert-pr-199 branch February 4, 2026 14:55
Sign up for freeto 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

@sweetmantech