You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(accounts): editing one service-override field clears the override's other fields #1775
Editing one field of an account service override clears the override's other fields.
Frontend. The inline editors in Settings send ONE field per PUT /api/accounts/{id}/service-overrides/{provider}/{service}: payment only (frontend/src/settings.ts:828), term only (:953), coverage only (:1046), enabled only (:1123).
Backend.buildServiceOverride (internal/api/handler_accounts.go ~:1218) builds a FRESH row. existing supplies only ID and CreatedAt, and only the request's fields are applied.
Store. The upsert (internal/config/store_postgres_config_audit.go ~:172) then overwrites every column: enabled, term, payment, coverage, ramp_schedule and all include/exclude filters.
So changing an account's Term override sets its payment, coverage and enabled to NULL (inherit) and clears every include/exclude filter. The response is 200 and the toast says it succeeded.
Why it matters
The overrides scope what gets purchased for that account. A cleared exclude_regions / exclude_types / exclude_engines widens what can be bought, with no warning.
Fix
Merge the request over the existing row, presence-aware: a key that is absent keeps the stored value, an explicit null clears it to inherit, and a value replaces it. That's the same pattern as mergeServiceConfig (internal/api/handler_config.go ~:351) for PUT /api/config/service/.... The request struct is already all pointers with omitempty, and applyServiceOverrideFields is documented as "copies sparse request fields".
Tests:
a single-field PUT over a fully populated override keeps every other field;
a null clears just that field;
the commitment-option combo check runs on the merged result.
Claiming: claude-ui-fix-1 (fleet). Fix: a presence-aware merge over the existing row, as mergeServiceConfig does, plus a per-field round-trip test for AccountServiceOverrideRequest.
Claimed by claude-ui-fix-1: fix in progress (presence-aware merge plus per-field survival tests), TDD on fix/1775-override-sparse-merge. Opening as soon as it's verified, per the coordinator, even over the slot cap.
Activity
cristim commentedon Nov 5, 2026
Claiming: claude-ui-fix-1 (fleet). Fix: a presence-aware merge over the existing row, as
mergeServiceConfigdoes, plus a per-field round-trip test for AccountServiceOverrideRequest.cristim commentedon Nov 5, 2026
Claimed by claude-ui-fix-1: fix in progress (presence-aware merge plus per-field survival tests), TDD on fix/1775-override-sparse-merge. Opening as soon as it's verified, per the coordinator, even over the slot cap.
cristim commentedon Nov 5, 2026
Claimed by claude-ui-fix-1: PR #1788 open at 8068716, with reviewers qa-ui-4 and darling.
fix(api): merge a service override PUT inside the locked write
fix(accounts): keep a service override's other fields when one field …