归档
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled

This commit is contained in:
2026-09-20 10:46:34 +08:00
parent 1964c12ffa
commit 863607639f
9 changed files with 362 additions and 1 deletions

View File

@@ -5653,4 +5653,93 @@
"exit_status": 0
}
}
,
{
"capability": "asset-device",
"requirement": "单槽单卡设备绑定时初始化当前卡标识",
"spec": "openspec/specs/asset-device/spec.md",
"entries": [
"/api/admin/devices/{virtual_no}/cards",
"/api/admin/devices/import"
],
"handler_consumer_job": [
"internal/handler/admin/device.go",
"internal/task/device_import.go"
],
"application_service_query": [
"internal/service/device/binding.go",
"internal/task/device_import.go"
],
"domain_state_amount": [
"internal/model/device_sim_binding.go"
],
"store_migration_config": [
"internal/store/postgres/device_sim_binding_store.go"
],
"verification": {
"command": "python3 -c 'from pathlib import Path; checks=[(\"internal/service/device/binding.go\", \"if device.MaxSimSlots == 1\"), (\"internal/service/device/binding.go\", \"if activeCount == 1\"), (\"internal/service/device/binding.go\", \"Update(\\\"is_current\\\", true)\"), (\"internal/task/device_import.go\", \"initializeCurrentCard := device.MaxSimSlots == 1 && len(validCards) == 1\"), (\"internal/task/device_import.go\", \"IsCurrent: initializeCurrentCard\")]; missing=[f\"{p} :: {t}\" for p,t in checks if t not in Path(p).read_text()]; assert not missing, missing; print(\"OK: asset-device::单槽单卡设备绑定时初始化当前卡标识\")'",
"literal_output": [
"OK: asset-device::单槽单卡设备绑定时初始化当前卡标识"
],
"exit_status": 0
}
},
{
"capability": "asset-device",
"requirement": "存量当前卡标识的核对与受控修复",
"spec": "openspec/specs/asset-device/spec.md",
"entries": [
"docs/deployment/production-runbook.md"
],
"handler_consumer_job": [
"docs/deployment/production-runbook.md:单槽单卡当前卡标识核对与受控修复"
],
"application_service_query": [
"docs/deployment/production-runbook.md:只读候选核对与事务内条件复核"
],
"domain_state_amount": [
"internal/model/device_sim_binding.go:DeviceSimBinding.IsCurrent"
],
"store_migration_config": [
"tb_device_sim_binding",
"tb_device"
],
"verification": {
"command": "python3 -c 'from pathlib import Path; text=Path(\"docs/deployment/production-runbook.md\").read_text(); checks=[\"### 单槽单卡当前卡标识核对与受控修复\", \"d.max_sim_slots = 1\", \"current_binding.is_current\", \"count(*)\", \"WITH approved(binding_id) AS\", \"FOR UPDATE OF b\", \"RETURNING target.id AS binding_id\", \"受影响行数与批准清单不一致时必须回滚\"]; missing=[t for t in checks if t not in text]; assert not missing, missing; print(\"OK: asset-device::存量当前卡标识的核对与受控修复\")'",
"literal_output": [
"OK: asset-device::存量当前卡标识的核对与受控修复"
],
"exit_status": 0
}
},
{
"capability": "personal-customer",
"requirement": "缺少当前使用卡时的设备实名判定",
"spec": "openspec/specs/personal-customer/spec.md",
"entries": [
"/api/c/v1/asset/info"
],
"handler_consumer_job": [
"internal/routes/personal.go",
"internal/handler/app/client_asset.go"
],
"application_service_query": [
"internal/service/asset/service.go"
],
"domain_state_amount": [
"internal/model/device_sim_binding.go:DeviceSimBinding.IsCurrent",
"pkg/constants:RealNameStatusVerified"
],
"store_migration_config": [
"internal/store/postgres/device_sim_binding_store.go",
"internal/store/postgres/iot_card_store.go"
],
"verification": {
"command": "python3 -c 'from pathlib import Path; text=Path(\"internal/service/asset/service.go\").read_text(); checks=[\"hasCurrentCard := false\", \"if isCurrentMap[c.ID]\", \"if !hasCurrentCard\", \"if c.RealNameStatus == constants.RealNameStatusVerified\", \"resp.RealNameStatus = constants.RealNameStatusVerified\"]; missing=[t for t in checks if t not in text]; assert not missing, missing; print(\"OK: personal-customer::缺少当前使用卡时的设备实名判定\")'",
"literal_output": [
"OK: personal-customer::缺少当前使用卡时的设备实名判定"
],
"exit_status": 0
}
}
]