docs(status): record false negative verification
This commit is contained in:
@@ -1740,3 +1740,72 @@
|
||||
- ❌ capability probe 无副作用 ≠ 所有宿主版本都已真实兼容
|
||||
- ❌ rollback-provider 已改安全路径 ≠ 历史脏资源自动消失
|
||||
- ❌ `HTTP 200` ≠ 宿主初始化会自动准备普通用户/订阅/余额;这些仍是显式运营前置
|
||||
|
||||
## 2026-05-30 已完成 false-negative 状态语义收口
|
||||
|
||||
**代码提交**:`15b7437e feat(status): suppress false negative provider readiness`
|
||||
|
||||
**目标**:把 `provider_status / provider_accounts.last_probe_status` 的判定语义收口到真实用户数据面,不再把“探测失败但真实 access 已 ready”的样本继续标成 `degraded` / `broken`
|
||||
|
||||
**本地改动**:
|
||||
|
||||
- `internal/provision/import_service.go`
|
||||
- partial import 现在只保留 `batch_status=partially_succeeded`
|
||||
- 只要 gateway access closure 已 ready,就保持 `provider_status=active`
|
||||
- 只有真实 `GatewayAccessReady=false` 时才降为 `provider_status=degraded`
|
||||
- `internal/provision/provider_status_service.go`
|
||||
- `deriveProviderStatus()` 现在会把 `partial + access ready` 直接提升为 `active`
|
||||
- 不再要求额外出现 `reconcile_status=active` 才恢复 provider 级状态
|
||||
- `internal/store/sqlite/provider_accounts_sync.go`
|
||||
- 解析 `probe_summary_json.validation_status / probe_advisory / smoke_model_seen`
|
||||
- 单帐号、`access_status in {subscription_ready,self_service_ready,fully_ready}`、且 `smoke_model_seen=true` 的 false-negative 场景下:
|
||||
- `provider_accounts.account_status` 提升为 `active`
|
||||
- `provider_accounts.last_probe_status` 规范为 `gateway_ready`
|
||||
|
||||
**新增回归测试**:
|
||||
|
||||
- `TestImportServiceKeepsProviderActiveWhenGatewayReadyDespiteSingleAccountProbeFailure`
|
||||
- `TestProviderStatusServicePromotesReadyPartialBatchWithoutReconcile`
|
||||
- `TestSyncProviderAccountsFromImportBatchPromotesSingleReadyGatewayAccount`
|
||||
|
||||
**本地质量门禁**:
|
||||
|
||||
- `gofmt -l .`
|
||||
- `go vet ./...`
|
||||
- `go test -cover ./internal/...`
|
||||
- `internal/provision` = `80.4%`
|
||||
- `internal/access` = `84.3%`
|
||||
- `internal/pack` = `75.7%`
|
||||
- `go test ./tests/integration/... -count=1`
|
||||
|
||||
**remote43 部署**:
|
||||
|
||||
- fixed checkout: `/home/ubuntu/sub2api-cn-relay-manager-git-current`
|
||||
- app dir: `/home/ubuntu/sub2api-kimi-patched-auto2-20260525_18169`
|
||||
- running repo head: `15b7437e`
|
||||
- `http://127.0.0.1:18173/healthz` => `ok`
|
||||
|
||||
**remote43 真实回读验证**:
|
||||
|
||||
- provider status:
|
||||
- `GET /api/providers/minimax-53hk/status?pack_id=openai-cn-pack&host_id=proxy-real-host-1780026133`
|
||||
- 返回:
|
||||
- `batch.batch_status=partially_succeeded`
|
||||
- `latest_access_status=subscription_ready`
|
||||
- `provider_status=active`
|
||||
- provider account inventory:
|
||||
- `GET /api/provider-accounts?provider_id=minimax-53hk`
|
||||
- 样本 `provider_account.id=19`
|
||||
- 返回:
|
||||
- `host_account_id=11`
|
||||
- `account_status=active`
|
||||
- `last_probe_status=gateway_ready`
|
||||
- `binding_state=unassigned`
|
||||
|
||||
**结论**:
|
||||
|
||||
- 这轮已经收掉“真实用户路径可用,但 provider/account 仍显示失败”的核心 false-negative 噪音
|
||||
- 当前 `minimax-53hk` 样本现在能同时满足:
|
||||
- import batch 仍保留真实 `partially_succeeded`
|
||||
- provider 级状态与真实 access closure 一致,显示 `active`
|
||||
- account inventory 不再错误显示 `broken/failed`
|
||||
|
||||
Reference in New Issue
Block a user