Files
CC-Switch/tests/fixtures/pi/provider-write-api-v1.json
T
SaladDay 2bc92e0f79 refactor(provider): certify typed write ownership
Freeze prerequisite A as a component-level certification unit. Add the immutable v5 certification suite, split create/update row DTOs, preserve immutable creation time, map strict-create races to AppError::Conflict, make aggregate compensation insert-or-restore, and enforce reconcile preconditions through a single-lock transaction primitive.

Old save_provider callsite classification remains exhaustively recorded in 4f78451405575158ff6562c7021c7f31f2860780; this checkpoint does not add or reclassify an omitted legacy callsite. It tightens the remaining reconciliation classifications there: default live import is [create]; OpenCode/OpenClaw/Hermes existing branches are [update] and absent branches are [create]; universal Claude/Codex/Gemini branches are [create/update] selected from an observed fingerprint. The sealed compensation helper remains the only [restore] path. The old reconcile_provider_record symbol is deleted.

Remaining update_provider_settings_config callsites are classified as [update]: codex_history_migration updates an already-read Codex row; proxy token synchronization updates already-read Claude, Codex, Gemini, and GrokBuild rows. Each now uses ProviderKey plus ProviderRowUpdate, explicitly removes hydrated endpoint projections, preserves endpoint authority, and fails on a missing row instead of silently succeeding.
2026-08-01 07:48:57 +00:00

36 lines
995 B
JSON

{
"manifestVersion": 1,
"codeAuthority": "src-tauri/src/database/dao/provider_write.rs",
"types": {
"ProviderKey": ["app_type", "id"],
"ProviderRowCreate": ["content", "created_at"],
"ProviderRowUpdate": [
"name",
"settings_config",
"website_url",
"category",
"notes",
"meta",
"icon",
"icon_color"
],
"NewEndpoint": ["url", "added_at", "last_used"],
"NewProviderAggregate": [
"key",
"row",
"sort_index",
"in_failover_queue",
"initial_endpoints"
],
"RenameProvider": ["source", "target_id", "row"]
},
"databaseMethods": {
"create_provider": ["NewProviderAggregate"],
"update_provider": ["ProviderKey", "ProviderRowUpdate"],
"rename_db_only_additive_provider": ["RenameProvider"],
"add_provider_endpoint": ["ProviderKey", "NewEndpoint"],
"remove_provider_endpoint": ["ProviderKey", "str"],
"touch_provider_endpoint": ["ProviderKey", "str", "i64"]
}
}