Repository navigation
Description
P1 · Reproduced locally at 44e0dcf254975286c0e9dea443b5cd1ca6b23347.
A name-only edit from an older dialog can silently restore an obsolete endpoint or API format saved by another administrator.
Reproduction:
- Open Edit credential for a custom provider whose Base URL is v1. Keep the dialog open.
- In another session, save the same provider with Base URL v2.
- In the original dialog, change only the credential/provider name and Save.
- Inspect the provider definition.
Expected: An older editor must retain v2 or report a version conflict before overwriting it. A name-only edit must not silently restore v1.
Observed: The UI sends its old Base URL v1 with a hash fetched after v2 was saved. The backend accepts that current hash and persists v1. A direct native save using the originally loaded hash correctly returns HTTP 409.
Cause: The form stores provider facts without their reviewed version; useUpdateProviderCredential reads a fresh definition at line 170 and sends snapshot.hash at line 202 together with stale customProvider fields at lines 186–188.
Frozen observation/control output:
CONTROL native stale-hash PUT=409; concurrent base URL retained before UI save
CONFIRMED editor loaded old base URL; another save changed it; name-only form edit silently restored old base URL using concurrent version hash
Control: The native compare-and-set rejects the originally loaded hash (409) and preserves v2. Only the UI composition replaces that reviewed version with the latest hash before writing its stale fields.
Exact probe command (5/5 tests passed; cwd is the detached source services/platform directory):
/Users/yannick/.npm/_npx/22f2fe8d8bc13000/node_modules/.bin/bun x vitest run --config /Users/yannick/.codex/notes/tale-100-findings/provider-connector-proof/vitest.config.ts /Users/yannick/.codex/notes/tale-100-findings/provider-connector-proof/provider-boundaries.probe.test.tsx --maxWorkers 1 --testTimeout 30000 --reporter verbose --silent=falseProof boundary: Executed the actual CredentialEditDialog, provider credential adapter, mutation hooks, HTTP adapters and native localhost:3076 API. Reads after writes used the real persisted config/DB. Only owned local provider/credential fixtures were used; env references carry no credential secret and catalog source remained none in persisted definitions. No model, external provider or OAuth request ran. The component harness supplies catalog/credential props and a query client; this is not a browser run.
Source:
- services/platform/app/features/settings/providers/hooks/custom-provider-mutations.ts:170
- services/platform/app/features/settings/providers/hooks/custom-provider-mutations.ts:186
- services/platform/app/features/settings/credentials/credential-edit-dialog.tsx:54
Deduplication: Cached all-state provider/credential issue titles and the current findings ledger reviewed. Distinct from partial-save handling: this succeeds fully, but bypasses stale-version protection. Parent performs live all-state dedup.
Independent parent verification: read the complete proof and reran all five tests against the retained owned localhost fixtures. All passed, including the native stale-hash refusal and post-failure persisted readbacks. Live all-state provider/credential/save, provider/stale and provider/manual-model searches found no matching root. Log: provider-connector-proof/parent-provider-boundaries.log.
Activity
[-]bug(platform): bug: stale custom-provider editor overwrites newer settings by reading the latest hash at Save[/-][+]bug(platform): stale custom-provider editor overwrites newer settings by reading the latest hash at Save[/+]