Skip to content

[CORRUPTED] Synthetic Benchmark PR #1892 - [bench] prefix@724c7289 Patch 6: Extend pricing model update endpoint for CLI sync - #14

Open
amirzaushnizer wants to merge 3 commits into
base_pr_1892_20260621_2687from
corrupted_pr_1892_20260621_2687
Open

[CORRUPTED] Synthetic Benchmark PR #1892 - [bench] prefix@724c7289 Patch 6: Extend pricing model update endpoint for CLI sync#14
amirzaushnizer wants to merge 3 commits into
base_pr_1892_20260621_2687from
corrupted_pr_1892_20260621_2687

Conversation

@amirzaushnizer

Copy link
Copy Markdown
Collaborator

Benchmark PR flowglad#1892

Type: Corrupted (contains bugs)

Original PR Title: [bench] prefix@724c7289 Patch 6: Extend pricing model update endpoint for CLI sync
Original PR Description: Pre-fix reconstruction of flowglad#1892 at parent of 724c728 (bug present).
Original PR URL: flowglad#1892

joeysabs and others added 3 commits February 3, 2026 16:35
…r CLI sync

Adds full structure update capability to the pricing model update endpoint,
enabling the CLI to sync entire pricing model configurations including features,
products, usage meters, and resources. The update procedure now detects whether
structure fields are provided and routes to the appropriate transaction logic:
- Metadata-only updates continue using the simple update path
- Full structure updates use diffing and atomic transactions via adminTransaction

This maintains backward compatibility while enabling the CLI sync workflow for
comprehensive pricing model management.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add authorization pre-check via authenticatedTransaction before adminTransaction
  to prevent users from modifying pricing models outside their organization
- Require all structure fields when any are provided (PUT semantics) to prevent
  accidental data loss from partial updates
- Remove unused fullPricingModel database query
- Fix weak test assertion (toBeGreaterThanOrEqual(0) -> toBe(1))
- Remove unused selectPricingModelById import from test file

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updates openapi.json to reflect the new extended schema for
PUT /pricing-models/:id that includes optional structure fields.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

2 participants