From 46c8e819df67772730e4a8369026460bb24d97de Mon Sep 17 00:00:00 2001 From: break Date: Tue, 18 Aug 2026 16:30:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=B8=E5=85=B3=E8=AF=81?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 - AGENTS.md | 2 +- .../entry-capability-requirement-matrix.json | 3564 +++++++++++++++++ .../context-reset/requirement-evidence.json | 1485 +++++++ .../.openspec.yaml | 0 .../design.md | 0 .../proposal.md | 0 .../specs/agent-funds-commission/spec.md | 0 .../specs/order-refund-exchange/spec.md | 0 .../tasks.md | 2 +- scripts/context-health.sh | 6 +- 11 files changed, 5054 insertions(+), 7 deletions(-) create mode 100644 docs/verification/context-reset/entry-capability-requirement-matrix.json create mode 100644 docs/verification/context-reset/requirement-evidence.json rename openspec/changes/{add-legacy-approval-trigger => archive/2026-08-18-add-legacy-approval-trigger}/.openspec.yaml (100%) rename openspec/changes/{add-legacy-approval-trigger => archive/2026-08-18-add-legacy-approval-trigger}/design.md (100%) rename openspec/changes/{add-legacy-approval-trigger => archive/2026-08-18-add-legacy-approval-trigger}/proposal.md (100%) rename openspec/changes/{add-legacy-approval-trigger => archive/2026-08-18-add-legacy-approval-trigger}/specs/agent-funds-commission/spec.md (100%) rename openspec/changes/{add-legacy-approval-trigger => archive/2026-08-18-add-legacy-approval-trigger}/specs/order-refund-exchange/spec.md (100%) rename openspec/changes/{add-legacy-approval-trigger => archive/2026-08-18-add-legacy-approval-trigger}/tasks.md (96%) diff --git a/.gitignore b/.gitignore index 620f538..adf1b44 100644 --- a/.gitignore +++ b/.gitignore @@ -111,6 +111,4 @@ scripts/batch_package_purchase/assets.example_购买结果_20260715_115804.csv scripts/batch_package_purchase/assets.example_购买结果_20260715_115814.csv scripts/migration/output -# LongHorizon 本地执行证据 -.lh-harness/ .scratch/go-build-cache diff --git a/AGENTS.md b/AGENTS.md index 481ab46..81ba625 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -41,7 +41,7 @@ - 不访问生产服务、真实支付渠道或外部审批系统进行自动验证。 - 生产环境为 systemd 管理的手工二进制发布,和仓库 Docker/CI 测试环境不同;生产发布、迁移与回滚事实见 [`docs/deployment/production-runbook.md`](docs/deployment/production-runbook.md)。Agent 不连接生产主机或数据库,生产操作由维护者执行并提供结果。 - 不把密钥、Token、证书或个人敏感数据写入代码、文档和日志。 -- `.lh-harness/` 仅保存本地执行证据,不是事实源且不得纳入 Git。 +- `docs/verification/context-reset/` 仅保存上下文健康检查证据,不是业务事实源;证据应随项目文档维护。 - 自动化测试当前为 N/A(用户决策);不恢复旧测试,也不写虚假测试入口。 ## 架构选择 diff --git a/docs/verification/context-reset/entry-capability-requirement-matrix.json b/docs/verification/context-reset/entry-capability-requirement-matrix.json new file mode 100644 index 0000000..ba0c856 --- /dev/null +++ b/docs/verification/context-reset/entry-capability-requirement-matrix.json @@ -0,0 +1,3564 @@ +[ + { + "entry_type": "http", + "entry": "DELETE /api/admin/accounts/{account_id}/roles/{role_id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/accounts/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/carriers/{id}", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/data-cleanup-configs/{id}", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::异步任务可观察" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/devices/{virtual_no}", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/devices/{virtual_no}/cards/{iccid}", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/package-series/{id}", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/packages/{id}", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝", + "package-lifecycle::套餐状态流转" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/permissions/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/polling-alert-rules/{id}", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/polling-configs/{id}", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/roles/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/roles/{role_id}/permissions", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/roles/{role_id}/permissions/{perm_id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/shop-series-grants/{id}", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/shops/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/shops/{shop_id}/roles/{role_id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "DELETE /api/admin/wechat-configs/{id}", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/accounts", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/accounts/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/accounts/{id}/roles", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/agent-recharges", + "capability": "agent-funds-commission", + "requirements": [ + "agent-funds-commission::充值边界", + "identity-access::数据范围拒绝", + "order-payment-wallet::金额单位" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/agent-recharges/payment-methods", + "capability": "agent-funds-commission", + "requirements": [ + "agent-funds-commission::充值边界", + "identity-access::数据范围拒绝", + "order-payment-wallet::金额单位" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/agent-recharges/{id}", + "capability": "agent-funds-commission", + "requirements": [ + "agent-funds-commission::充值边界", + "identity-access::数据范围拒绝", + "order-payment-wallet::金额单位" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/agent-recharges/{id}/payment-status", + "capability": "agent-funds-commission", + "requirements": [ + "agent-funds-commission::代理在线充值本地支付状态", + "agent-funds-commission::充值边界", + "identity-access::数据范围拒绝", + "order-payment-wallet::金额单位" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/agent/resource-activities/{resource_type}/{identifier}", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/asset-allocation-records", + "capability": "asset-device", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/asset-allocation-records/{id}", + "capability": "asset-device", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/asset-package-batch-orders", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝", + "package-lifecycle::批量操作可追踪" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/asset-package-batch-orders/{id}", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝", + "package-lifecycle::批量操作可追踪" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/assets/resolve/{identifier}", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/assets/{identifier}/current-package", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/assets/{identifier}/operation-logs", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/assets/{identifier}/orders", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/assets/{identifier}/packages", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/assets/{identifier}/realtime-status", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/assets/{identifier}/wallet", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/assets/{identifier}/wallet/transactions", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/audit/actors/{kind}/{id}/events", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝", + "operations-audit::审计时间线" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/audit/correlations/{correlation_id}/timeline", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝", + "operations-audit::审计时间线" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/audit/events", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝", + "operations-audit::审计时间线" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/audit/events/{event_id}", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝", + "operations-audit::审计时间线" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/audit/finance/timeline", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝", + "operations-audit::审计时间线" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/audit/integrations", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝", + "operations-audit::审计时间线" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/audit/integrations/overview", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝", + "operations-audit::审计时间线" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/audit/integrations/{integration_id}", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝", + "operations-audit::审计时间线" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/audit/requests/{request_id}/timeline", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝", + "operations-audit::审计时间线" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/audit/resources/search", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝", + "operations-audit::审计时间线" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/audit/resources/{resource_type}/{resource_id}/timeline", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝", + "operations-audit::审计时间线" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/audit/risks/events", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝", + "operations-audit::审计时间线" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/audit/risks/overview", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝", + "operations-audit::审计时间线" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/authorizations", + "capability": "identity-access", + "requirements": [ + "identity-access::令牌生命周期", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/authorizations/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::令牌生命周期", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/carriers", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/carriers/{id}", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/commission/withdrawal-requests", + "capability": "agent-funds-commission", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/commission/withdrawal-settings", + "capability": "agent-funds-commission", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/commission/withdrawal-settings/current", + "capability": "agent-funds-commission", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/data-cleanup-configs", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::异步任务可观察" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/data-cleanup-configs/{id}", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::异步任务可观察" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/data-cleanup-logs", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::异步任务可观察" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/data-cleanup/preview", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::异步任务可观察" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/data-cleanup/progress", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::异步任务可观察" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/devices", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/devices/by-identifier/{identifier}/gateway-slots", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/devices/import/tasks", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/devices/import/tasks/{id}", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/devices/{virtual_no}/cards", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/enterprise/resource-activities/{resource_type}/{identifier}", + "capability": "operations-audit", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/enterprises", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/enterprises/{id}/cards", + "capability": "asset-device", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/enterprises/{id}/devices", + "capability": "asset-device", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/exchanges", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/exchanges/{id}", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/expiring-assets", + "capability": "asset-device", + "requirements": [ + "identity-access::数据范围拒绝", + "asset-device::临期颜色等级仅用于展示" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/export-tasks", + "capability": "export-task", + "requirements": [ + "export-task::导出任务终态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/export-tasks/{id}", + "capability": "export-task", + "requirements": [ + "export-task::导出任务终态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/iot-cards/import-tasks", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/iot-cards/import-tasks/{id}", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/iot-cards/standalone", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/iot-cards/{iccid}/realname-link", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/notifications", + "capability": "notification-delivery", + "requirements": [ + "identity-access::数据范围拒绝", + "notification-delivery::通知接收人隔离" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/notifications/unread-count", + "capability": "notification-delivery", + "requirements": [ + "identity-access::数据范围拒绝", + "notification-delivery::通知接收人隔离" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/notifications/unread-summary", + "capability": "notification-delivery", + "requirements": [ + "identity-access::数据范围拒绝", + "notification-delivery::通知接收人隔离" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/notifications/{id}/target", + "capability": "notification-delivery", + "requirements": [ + "identity-access::数据范围拒绝", + "notification-delivery::通知接收人隔离" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/order-package-invalidate-tasks", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/order-package-invalidate-tasks/{id}", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/orders", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/orders/{id}", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/package-series", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/package-series/{id}", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/package-usage/{id}/daily-records", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/packages", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝", + "package-lifecycle::套餐状态流转" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/packages/{id}", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝", + "package-lifecycle::套餐状态流转" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/permissions", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/permissions/tree", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/permissions/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-alert-history/polling-alert-history", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-alert-rules", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-alert-rules/{id}", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-concurrency", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::轮询并发计数可观测", + "polling-operations::轮询并发配置覆盖实际任务", + "polling-operations::轮询任务类型名称可读" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-concurrency/{task_type}", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::轮询并发计数可观测", + "polling-operations::轮询任务类型名称可读" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-configs", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-configs/enabled", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-configs/{id}", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-manual-trigger/history", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::手工轮询任务状态" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-manual-trigger/status", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::手工轮询任务状态" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-stats", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::异步任务可观察" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-stats/init-progress", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::异步任务可观察" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-stats/queues", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::异步任务可观察" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/polling-stats/tasks", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::异步任务可观察" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/refunds", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁", + "order-refund-exchange::代理退款查询按所属店铺隔离" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/refunds/{id}", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁", + "order-refund-exchange::代理退款查询按所属店铺隔离" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/roles", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/roles/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/roles/{id}/permissions", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shop-series-grants", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shop-series-grants/{id}", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shops", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shops/business-owner-candidates", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shops/cascade", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shops/fund-summary", + "capability": "agent-funds-commission", + "requirements": [ + "identity-access::数据范围拒绝", + "agent-funds-commission::代理商资金概况按店铺 ID 检索" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shops/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shops/{shop_id}/commission-daily-stats", + "capability": "agent-funds-commission", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shops/{shop_id}/commission-records", + "capability": "agent-funds-commission", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shops/{shop_id}/commission-stats", + "capability": "agent-funds-commission", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shops/{shop_id}/main-wallet/transactions", + "capability": "agent-funds-commission", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shops/{shop_id}/roles", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shops/{shop_id}/withdrawal-requests", + "capability": "agent-funds-commission", + "requirements": [ + "agent-funds-commission::代理钱包与提现状态门禁", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/super-admin/operation-password/status", + "capability": "system-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/system-configs", + "capability": "system-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/wechat-configs", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/wechat-configs/active", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/wechat-configs/{id}", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/wecom/applications", + "capability": "external-integration", + "requirements": [ + "external-integration::企微审批状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/wecom/applications/{id}/members", + "capability": "external-integration", + "requirements": [ + "external-integration::企微审批状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/wecom/scenes", + "capability": "external-integration", + "requirements": [ + "external-integration::企微审批状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/wecom/scenes/{business_type}/fields", + "capability": "external-integration", + "requirements": [ + "external-integration::企微审批状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/auth/me", + "capability": "identity-access", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/asset/info", + "capability": "personal-customer", + "requirements": [ + "personal-customer::资产归属查询" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/asset/package-history", + "capability": "personal-customer", + "requirements": [ + "personal-customer::资产归属查询" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/asset/packages", + "capability": "personal-customer", + "requirements": [ + "personal-customer::资产归属查询" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/device/cards", + "capability": "personal-customer", + "requirements": [ + "personal-customer::资产归属查询" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/exchange/pending", + "capability": "personal-customer", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/notifications", + "capability": "notification-delivery", + "requirements": [ + "notification-delivery::通知接收人隔离" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/notifications/unread-count", + "capability": "notification-delivery", + "requirements": [ + "notification-delivery::通知接收人隔离" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/orders", + "capability": "order-payment-wallet", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/orders/{id}", + "capability": "order-payment-wallet", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/profile", + "capability": "personal-customer", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/realname/link", + "capability": "personal-customer", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/recharge-orders", + "capability": "order-payment-wallet", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/recharge-orders/{id}", + "capability": "order-payment-wallet", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/wallet/detail", + "capability": "order-payment-wallet", + "requirements": [ + "order-payment-wallet::金额单位" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/wallet/recharge-check", + "capability": "order-payment-wallet", + "requirements": [ + "agent-funds-commission::充值边界", + "order-payment-wallet::金额单位", + "order-payment-wallet::钱包并发" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/wallet/recharges", + "capability": "order-payment-wallet", + "requirements": [ + "agent-funds-commission::充值边界", + "order-payment-wallet::金额单位", + "order-payment-wallet::钱包并发" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/wallet/transactions", + "capability": "order-payment-wallet", + "requirements": [ + "order-payment-wallet::金额单位" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/wechat/appid", + "capability": "personal-customer", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "GET /api/c/v1/wechat/jssdk-config", + "capability": "personal-customer", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "GET /api/callback/wecom/approval/{application_id}", + "capability": "external-integration", + "requirements": [ + "external-integration::企微回调与补偿" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/open/v1/cards/realname-status", + "capability": "agent-open-api", + "requirements": [ + "agent-open-api::开放接口数据范围", + "agent-open-api::开放接口认证" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/open/v1/cards/status", + "capability": "agent-open-api", + "requirements": [ + "agent-open-api::开放接口数据范围", + "agent-open-api::开放接口认证" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/open/v1/cards/traffic", + "capability": "agent-open-api", + "requirements": [ + "agent-open-api::开放接口数据范围", + "agent-open-api::开放接口认证" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/open/v1/devices/traffic", + "capability": "agent-open-api", + "requirements": [ + "agent-open-api::开放接口数据范围", + "agent-open-api::开放接口认证" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/open/v1/packages", + "capability": "agent-open-api", + "requirements": [ + "agent-open-api::开放接口数据范围", + "agent-open-api::开放接口认证" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/open/v1/wallet/balance", + "capability": "agent-open-api", + "requirements": [ + "agent-open-api::开放接口数据范围", + "agent-open-api::开放接口认证" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/open/v1/wallet/transactions", + "capability": "agent-open-api", + "requirements": [ + "agent-open-api::开放接口数据范围", + "agent-open-api::开放接口认证" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /health", + "capability": "system-operations", + "requirements": [ + "system-operations::健康检查响应语义" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /ready", + "capability": "system-operations", + "requirements": [ + "system-operations::健康检查响应语义" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PATCH /api/admin/assets/{identifier}/deactivate", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PATCH /api/admin/assets/{identifier}/packages/{package_usage_id}/expires-at", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PATCH /api/admin/assets/{identifier}/packages/{package_usage_id}/used-data", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PATCH /api/admin/assets/{identifier}/polling-status", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PATCH /api/admin/assets/{identifier}/realname-mode", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PATCH /api/admin/assets/{identifier}/realname-status", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PATCH /api/admin/devices/series-binding", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PATCH /api/admin/iot-cards/series-binding", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PATCH /api/admin/package-series/{id}/status", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PATCH /api/admin/packages/{id}/retail-price", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝", + "package-lifecycle::套餐状态流转" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PATCH /api/admin/packages/{id}/shelf", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝", + "package-lifecycle::套餐状态流转" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PATCH /api/admin/packages/{id}/status", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝", + "package-lifecycle::套餐状态流转" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PATCH /api/admin/shop-package-allocations/{id}/expiry-base", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/accounts", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/accounts/{id}/roles", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/agent-recharges", + "capability": "agent-funds-commission", + "requirements": [ + "agent-funds-commission::充值边界", + "external-integration::富友调用超时兼容行为", + "identity-access::数据范围拒绝", + "order-payment-wallet::金额单位" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/agent-recharges/{id}/offline-pay", + "capability": "agent-funds-commission", + "requirements": [ + "agent-funds-commission::充值边界", + "identity-access::数据范围拒绝", + "order-payment-wallet::金额单位" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/agent-recharges/{id}/reject", + "capability": "agent-funds-commission", + "requirements": [ + "agent-funds-commission::充值边界", + "identity-access::数据范围拒绝", + "order-payment-wallet::金额单位" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/asset-package-batch-orders", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝", + "package-lifecycle::批量操作可追踪" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/assets/{identifier}/refresh", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/assets/{identifier}/start", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/assets/{identifier}/stop", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/carriers", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/commission-records/{id}/resolve", + "capability": "agent-funds-commission", + "requirements": [ + "agent-funds-commission::佣金异常状态可见", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/commission/withdrawal-requests/{id}/approve", + "capability": "agent-funds-commission", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/commission/withdrawal-requests/{id}/reject", + "capability": "agent-funds-commission", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/commission/withdrawal-settings", + "capability": "agent-funds-commission", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/data-cleanup-configs", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::异步任务可观察" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/data-cleanup/trigger", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::异步任务可观察" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/devices/allocate", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/devices/batch-update-realname-policy", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/devices/by-identifier/{identifier}/reboot", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/devices/by-identifier/{identifier}/reset", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/devices/by-identifier/{identifier}/switch-card", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/devices/by-identifier/{identifier}/switch-mode", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/devices/import", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/devices/import/allocations", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/devices/recall", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/devices/{virtual_no}/cards", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/enterprises", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/enterprises/{id}/allocate-cards", + "capability": "asset-device", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/enterprises/{id}/allocate-devices", + "capability": "asset-device", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/enterprises/{id}/recall-cards", + "capability": "asset-device", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/enterprises/{id}/recall-devices", + "capability": "asset-device", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/exchanges", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/exchanges/{id}/cancel", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/exchanges/{id}/complete", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/exchanges/{id}/renew", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/exchanges/{id}/ship", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/expiring-assets/reminder-scan", + "capability": "asset-device", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/export-tasks", + "capability": "export-task", + "requirements": [ + "export-task::导出任务终态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/export-tasks/{id}/cancel", + "capability": "export-task", + "requirements": [ + "export-task::导出任务终态", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/iot-cards/batch-update-realname-policy", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/iot-cards/import", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝", + "asset-device::ICCID 按原始长度精确唯一" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/iot-cards/standalone/allocate", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/iot-cards/standalone/recall", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/order-package-invalidate-tasks", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/orders", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁", + "package-lifecycle::套餐使用记录价格快照" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/orders/purchase-check", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/orders/{id}/cancel", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/package-series", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/packages", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝", + "package-lifecycle::套餐状态流转" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/permissions", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/polling-alert-rules", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/polling-concurrency/reset", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::轮询并发计数可观测" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/polling-configs", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/polling-manual-trigger/batch", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::手工轮询任务状态" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/polling-manual-trigger/by-condition", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::手工轮询任务状态" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/polling-manual-trigger/cancel", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::手工轮询任务状态" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/polling-manual-trigger/single", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::手工轮询任务状态" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/refunds", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/refunds/{id}/approve", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/refunds/{id}/reject", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/refunds/{id}/resubmit", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/refunds/{id}/return", + "capability": "order-refund-exchange", + "requirements": [ + "identity-access::数据范围拒绝", + "order-refund-exchange::订单、退款与换货状态门禁" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/roles", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/roles/{id}/permissions", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/shop-package-batch-allocations", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/shop-package-batch-pricing", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/shop-series-grants", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/shops", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/shops/{shop_id}/roles", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/shops/{shop_id}/withdrawal-requests", + "capability": "agent-funds-commission", + "requirements": [ + "agent-funds-commission::代理钱包与提现状态门禁", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/storage/batch-download-urls", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/storage/upload-url", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/super-admin/operation-password", + "capability": "system-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/wechat-configs", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/wechat-configs/{id}/activate", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/wechat-configs/{id}/deactivate", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/wecom/applications", + "capability": "external-integration", + "requirements": [ + "external-integration::企微审批状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/wecom/applications/{id}/members/sync", + "capability": "external-integration", + "requirements": [ + "external-integration::企微审批状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/wecom/applications/{id}/templates/inspect", + "capability": "external-integration", + "requirements": [ + "external-integration::企微审批状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/wecom/applications/{id}/test", + "capability": "external-integration", + "requirements": [ + "external-integration::企微审批状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/auth/login", + "capability": "identity-access", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "POST /api/auth/logout", + "capability": "identity-access", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "POST /api/auth/refresh-token", + "capability": "identity-access", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/asset/refresh", + "capability": "personal-customer", + "requirements": [ + "personal-customer::资产归属查询" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/auth/bind-phone", + "capability": "personal-customer", + "requirements": [ + "identity-access::令牌生命周期", + "personal-customer::个人客户身份" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/auth/change-phone", + "capability": "personal-customer", + "requirements": [ + "identity-access::令牌生命周期", + "personal-customer::个人客户身份" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/auth/dev-login", + "capability": "personal-customer", + "requirements": [ + "identity-access::令牌生命周期", + "personal-customer::个人客户身份" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/auth/logout", + "capability": "personal-customer", + "requirements": [ + "identity-access::令牌生命周期", + "personal-customer::个人客户身份" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/auth/miniapp-login", + "capability": "personal-customer", + "requirements": [ + "identity-access::令牌生命周期", + "personal-customer::个人客户身份" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/auth/send-code", + "capability": "personal-customer", + "requirements": [ + "identity-access::令牌生命周期", + "personal-customer::个人客户身份" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/auth/verify-asset", + "capability": "personal-customer", + "requirements": [ + "identity-access::令牌生命周期", + "personal-customer::个人客户身份" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/auth/wechat-login", + "capability": "personal-customer", + "requirements": [ + "identity-access::令牌生命周期", + "personal-customer::个人客户身份" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/device/factory-reset", + "capability": "personal-customer", + "requirements": [ + "personal-customer::资产归属查询" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/device/reboot", + "capability": "personal-customer", + "requirements": [ + "personal-customer::资产归属查询" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/device/switch-card", + "capability": "personal-customer", + "requirements": [ + "personal-customer::资产归属查询" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/device/wifi", + "capability": "personal-customer", + "requirements": [ + "personal-customer::资产归属查询" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/exchange/{id}/shipping-info", + "capability": "personal-customer", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/orders/create", + "capability": "order-payment-wallet", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/orders/{id}/pay", + "capability": "order-payment-wallet", + "requirements": [ + "external-integration::富友调用超时兼容行为", + "order-payment-wallet::钱包并发" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/c/v1/wallet/recharge", + "capability": "order-payment-wallet", + "requirements": [ + "agent-funds-commission::充值边界", + "external-integration::富友调用超时兼容行为", + "order-payment-wallet::金额单位", + "order-payment-wallet::钱包并发" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/callback/alipay", + "capability": "order-payment-wallet", + "requirements": [ + "order-payment-wallet::支付回调幂等" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/callback/carriers/cmcc/realname", + "capability": "external-integration", + "requirements": [ + "external-integration::运营商回调幂等" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/callback/carriers/ctcc/realname", + "capability": "external-integration", + "requirements": [ + "external-integration::运营商回调幂等" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/callback/carriers/cucc/realname", + "capability": "external-integration", + "requirements": [ + "external-integration::运营商回调幂等" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/callback/carriers/cucc/realname/remove", + "capability": "external-integration", + "requirements": [ + "external-integration::运营商回调幂等" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/callback/fuiou-pay", + "capability": "order-payment-wallet", + "requirements": [ + "order-payment-wallet::支付回调幂等" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/callback/wechat-pay", + "capability": "order-payment-wallet", + "requirements": [ + "order-payment-wallet::支付回调幂等" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/callback/wecom/approval/{application_id}", + "capability": "external-integration", + "requirements": [ + "external-integration::企微回调与补偿" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/open/v1/cards/resume", + "capability": "agent-open-api", + "requirements": [ + "agent-open-api::开放接口数据范围", + "agent-open-api::开放接口认证" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/open/v1/devices/reboot", + "capability": "agent-open-api", + "requirements": [ + "agent-open-api::开放接口数据范围", + "agent-open-api::开放接口认证" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/open/v1/devices/reset", + "capability": "agent-open-api", + "requirements": [ + "agent-open-api::开放接口数据范围", + "agent-open-api::开放接口认证" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/open/v1/devices/switch-card", + "capability": "agent-open-api", + "requirements": [ + "agent-open-api::开放接口数据范围", + "agent-open-api::开放接口认证" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/open/v1/wallet/package-orders", + "capability": "agent-open-api", + "requirements": [ + "agent-open-api::开放接口数据范围", + "agent-open-api::开放接口认证" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/accounts/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/accounts/{id}/password", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/accounts/{id}/status", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/accounts/{id}/wecom-binding", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/authorizations/{id}/remark", + "capability": "identity-access", + "requirements": [ + "identity-access::令牌生命周期", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/carriers/{id}", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/carriers/{id}/status", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/data-cleanup-configs/{id}", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::异步任务可观察" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/devices/by-identifier/{identifier}/wifi", + "capability": "asset-device", + "requirements": [ + "asset-device::设备多卡关系", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/enterprises/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/enterprises/{id}/password", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/enterprises/{id}/status", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/iot-cards/{iccid}/speed-tier", + "capability": "asset-device", + "requirements": [ + "asset-device::资产业务状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/notifications/read-all", + "capability": "notification-delivery", + "requirements": [ + "identity-access::数据范围拒绝", + "notification-delivery::通知接收人隔离" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/notifications/{id}/read", + "capability": "notification-delivery", + "requirements": [ + "identity-access::数据范围拒绝", + "notification-delivery::通知已读幂等", + "notification-delivery::通知接收人隔离" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/package-series/{id}", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/packages/{id}", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝", + "package-lifecycle::套餐状态流转" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/permissions/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/polling-alert-rules/{id}", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/polling-concurrency/{task_type}", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "polling-operations::轮询并发配置覆盖实际任务" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/polling-configs/{id}", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/polling-configs/{id}/status", + "capability": "polling-operations", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/roles/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/roles/{id}/default-credit", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/roles/{id}/status", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/shop-series-grants/{id}", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/shop-series-grants/{id}/packages", + "capability": "package-lifecycle", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/shops/{id}", + "capability": "identity-access", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/shops/{id}/credit-limit", + "capability": "agent-funds-commission", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/system-configs/{key}", + "capability": "system-operations", + "requirements": [ + "identity-access::数据范围拒绝", + "system-operations::受控系统配置更新" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/wechat-configs/{id}", + "capability": "external-integration", + "requirements": [ + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/wecom/applications/{id}/default-creator", + "capability": "external-integration", + "requirements": [ + "external-integration::企微审批状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/admin/wecom/scenes/{business_type}", + "capability": "external-integration", + "requirements": [ + "external-integration::企微审批状态", + "external-integration::外部失败边界", + "identity-access::数据范围拒绝" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/auth/password", + "capability": "identity-access", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "http", + "entry": "PUT /api/c/v1/notifications/read-all", + "capability": "notification-delivery", + "requirements": [ + "notification-delivery::通知接收人隔离" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/c/v1/notifications/{id}/read", + "capability": "notification-delivery", + "requirements": [ + "notification-delivery::通知已读幂等", + "notification-delivery::通知接收人隔离" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "PUT /api/c/v1/profile", + "capability": "personal-customer", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypeAdminDirectNotification", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypeAdminDynamicNotification", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypeAgentMainWalletCredited", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypeAgentMainWalletDebited", + "capability": "infrastructure", + "requirements": [ + "notification-delivery::主钱包低余额跨阈值提醒" + ], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypeAgentMainWalletRefunded", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypeAgentMainWalletReservationChanged", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypeAgentRechargePaymentConfirmed", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypeApprovalSubmissionRequested", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypeApprovalTerminalDecision", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypeCardNetworkChanged", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypeCardRealnameChanged", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypeCardSeriesRequested", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypeCardTrafficIncremented", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.OutboxEventTypePersonalCustomerDirectNotification", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeAgentRechargeRecovery", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeAlertCheck", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeAssetPackageBatchOrder", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeAuditDailyArchive", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeAuditMonthlyRetention", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeAutoPurchaseAfterRecharge", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeCardObservationSeries", + "capability": "infrastructure", + "requirements": [ + "asset-device::卡业务观测可靠事件标识" + ], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeCommission", + "capability": "infrastructure", + "requirements": [ + "agent-funds-commission::佣金待计算状态可恢复", + "agent-funds-commission::退款佣金回扣可靠完成", + "agent-funds-commission::退款后处理可补偿", + "order-commission-delivery::佣金计算重复投递幂等", + "order-commission-delivery::已支付订单佣金计算可靠投递", + "order-commission-delivery::待计算订单可补偿" + ], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeCommissionStatsArchive", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeCommissionStatsSync", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeCommissionStatsUpdate", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeDailyTrafficFlush", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeDataCleanup", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeDeviceImport", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeEmailSend", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeExportDispatch", + "capability": "export-task", + "requirements": [ + "export-task::导出任务终态" + ], + "classification": "behavior" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeExportFinalize", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeExportShard", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeIntegrationDailyArchive", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeIntegrationMonthlyFinalize", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeIotCardImport", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeNotificationCleanup", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeOrderExpire", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeOrderPackageInvalidate", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeOutboxDeliver", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypePackageExpiryReminder", + "capability": "infrastructure", + "requirements": [ + "notification-delivery::套餐临期每日站内提醒" + ], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypePackageFirstActivation", + "capability": "package-lifecycle", + "requirements": [ + "package-lifecycle::套餐状态流转" + ], + "classification": "behavior" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypePackageQueueActivation", + "capability": "infrastructure", + "requirements": [], + "classification": "route_index_or_infrastructure" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypePollingCardStatus", + "capability": "polling-operations", + "requirements": [ + "polling-operations::手工轮询任务状态" + ], + "classification": "behavior" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypePollingCarddata", + "capability": "polling-operations", + "requirements": [ + "polling-operations::手工轮询任务状态" + ], + "classification": "behavior" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypePollingPackage", + "capability": "polling-operations", + "requirements": [ + "polling-operations::手工轮询任务状态" + ], + "classification": "behavior" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypePollingProtect", + "capability": "polling-operations", + "requirements": [ + "polling-operations::手工轮询任务状态" + ], + "classification": "behavior" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypePollingRealname", + "capability": "polling-operations", + "requirements": [ + "polling-operations::手工轮询任务状态" + ], + "classification": "behavior" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeWeComApprovalRecovery", + "capability": "external-integration", + "requirements": [ + "external-integration::企微回调与补偿", + "external-integration::外部调用重试边界" + ], + "classification": "behavior" + }, + { + "entry_type": "async", + "entry": "constants.TaskTypeWeComApprovalSync", + "capability": "external-integration", + "requirements": [ + "external-integration::企微审批状态" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "GET /api/admin/shop-series-grants/package-options", + "capability": "agent-series-package-options", + "requirements": [ + "agent-series-package-options::查询系列授权套餐候选项", + "package-lifecycle::授权页面禁止重复选择套餐" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/agent-recharges/{id}/trigger-approval", + "capability": "agent-funds-commission", + "requirements": [ + "agent-funds-commission::历史待审批线下代理充值可主动接入企业微信审批" + ], + "classification": "behavior" + }, + { + "entry_type": "http", + "entry": "POST /api/admin/refunds/{id}/trigger-approval", + "capability": "order-refund-exchange", + "requirements": [ + "order-refund-exchange::历史待审批退款可主动接入企业微信审批" + ], + "classification": "behavior" + } +] diff --git a/docs/verification/context-reset/requirement-evidence.json b/docs/verification/context-reset/requirement-evidence.json new file mode 100644 index 0000000..0c4fef1 --- /dev/null +++ b/docs/verification/context-reset/requirement-evidence.json @@ -0,0 +1,1485 @@ +[ + { + "capability": "agent-funds-commission", + "requirement": "代理钱包与提现状态门禁", + "spec": "openspec/specs/agent-funds-commission/spec.md", + "entries": [ + "/api/admin/shops/{shop_id}/withdrawal-requests" + ], + "handler_consumer_job": [ + "internal/routes/commission.go" + ], + "application_service_query": [ + "internal/application/wallet/debit.go" + ], + "domain_state_amount": [ + "internal/domain/wallet/wallet.go", + "pkg/constants/iot.go" + ], + "store_migration_config": [ + "internal/store/postgres/agent_wallet_store.go", + "internal/store/postgres/commission_withdrawal_request_store.go" + ], + "verification": { + "command": "代码中检索 当前钱包状态不允许资金操作", + "literal_output": [ + "internal/domain/wallet/wallet.go:122:return appErrors.New(appErrors.CodeInvalidStatus, \"当前钱包状态不允许资金操作\")" + ], + "exit_status": 0 + } + }, + { + "capability": "agent-funds-commission", + "requirement": "佣金异常状态可见", + "spec": "openspec/specs/agent-funds-commission/spec.md", + "entries": [ + "/api/admin/commission-records/{id}/resolve" + ], + "handler_consumer_job": [ + "internal/routes/commission.go" + ], + "application_service_query": [ + "internal/service/commission_calculation" + ], + "domain_state_amount": [ + "pkg/constants/iot.go" + ], + "store_migration_config": [ + "internal/store/postgres/commission_record_store.go" + ], + "verification": { + "command": "代码中检索 CommissionStatusPendingReview", + "literal_output": [ + "internal/service/commission_calculation/service.go:90:if order.CommissionStatus == model.CommissionStatusCompleted || order.CommissionStatus == model.CommissionStatusPendingReview {" + ], + "exit_status": 0 + } + }, + { + "capability": "agent-funds-commission", + "requirement": "代理在线充值本地支付状态", + "spec": "openspec/specs/agent-funds-commission/spec.md", + "entries": [ + "/api/admin/agent-recharges/{id}/payment-status" + ], + "handler_consumer_job": [ + "internal/handler/admin/agent_recharge.go" + ], + "application_service_query": [ + "internal/query/agentrecharge" + ], + "domain_state_amount": [ + "pkg/constants/payment.go" + ], + "store_migration_config": [ + "internal/store/postgres/payment_store.go" + ], + "verification": { + "command": "代码中检索 PaymentRecordStatusPending", + "literal_output": [ + "pkg/constants/payment.go:4:// PaymentRecordStatusPending 表示支付单待支付。" + ], + "exit_status": 0 + } + }, + { + "capability": "agent-funds-commission", + "requirement": "充值边界", + "spec": "openspec/specs/agent-funds-commission/spec.md", + "entries": [ + "/api/admin/agent-recharges", + "/api/c/v1/wallet/recharge" + ], + "handler_consumer_job": [ + "internal/handler/admin/agent_recharge.go", + "internal/handler/app/client_wallet.go" + ], + "application_service_query": [ + "internal/application/agentrecharge", + "internal/service/recharge" + ], + "domain_state_amount": [ + "pkg/constants/wallet.go" + ], + "store_migration_config": [ + "internal/store/postgres/agent_recharge_store.go", + "internal/store/postgres/asset_recharge_store.go" + ], + "verification": { + "command": "代码中检索 AgentRechargeMinAmount = 1, AgentOnlineRechargeMinAmount = 10000, AgentRechargeMaxAmount = 100000000, AssetRechargeMinAmount = 100, AssetRechargeMaxAmount = 10000000", + "literal_output": [ + "pkg/constants/wallet.go:83:AgentRechargeMinAmount = 1 // 线下最小充值金额(1分)", + "pkg/constants/wallet.go:84:AgentOnlineRechargeMinAmount = 10000 // 在线扫码最小充值金额(100元)", + "pkg/constants/wallet.go:85:AgentRechargeMaxAmount = 100000000 // 最大充值金额(1000000元)", + "pkg/constants/wallet.go:118:AssetRechargeMinAmount = 100 // 最小充值金额(1元)", + "pkg/constants/wallet.go:119:AssetRechargeMaxAmount = 10000000 // 最大充值金额(100000元)" + ], + "exit_status": 0 + } + }, + { + "capability": "agent-open-api", + "requirement": "开放接口认证", + "spec": "openspec/specs/agent-open-api/spec.md", + "entries": [ + "/api/open/v1/" + ], + "handler_consumer_job": [ + "internal/routes/open.go", + "internal/handler/openapi" + ], + "application_service_query": [ + "internal/service/agent_open_api" + ], + "domain_state_amount": [ + "pkg/middleware" + ], + "store_migration_config": [ + "internal/store/postgres/account_store.go" + ], + "verification": { + "command": "代码中检索 X-Agent-Sign", + "literal_output": [ + "internal/routes/open.go:15:1. 每个请求必须携带 Header:X-Agent-Account、X-Agent-Password、X-Agent-Timestamp、X-Agent-Nonce、X-Agent-Sign。" + ], + "exit_status": 0 + } + }, + { + "capability": "agent-open-api", + "requirement": "开放接口数据范围", + "spec": "openspec/specs/agent-open-api/spec.md", + "entries": [ + "/api/open/v1/" + ], + "handler_consumer_job": [ + "internal/handler/openapi" + ], + "application_service_query": [ + "internal/service/agent_open_api" + ], + "domain_state_amount": [ + "pkg/middleware" + ], + "store_migration_config": [ + "internal/store/postgres/shop_store.go" + ], + "verification": { + "command": "代码中检索 shop", + "literal_output": [ + "internal/service/agent_open_api/service.go:20:shopCommissionSvc \"github.com/break/junhong_cmp_fiber/internal/service/shop_commission\"" + ], + "exit_status": 0 + } + }, + { + "capability": "asset-device", + "requirement": "资产业务状态", + "spec": "openspec/specs/asset-device/spec.md", + "entries": [ + "/api/admin/assets", + "/api/admin/iot-cards" + ], + "handler_consumer_job": [ + "internal/handler/admin/asset.go" + ], + "application_service_query": [ + "internal/service/asset", + "internal/service/iot_card" + ], + "domain_state_amount": [ + "pkg/constants/iot.go" + ], + "store_migration_config": [ + "internal/store/postgres/iot_card_store.go" + ], + "verification": { + "command": "代码中检索 IotCardStatusInStock", + "literal_output": [ + "internal/service/iot_card/service.go:562:if isPlatform && card.Status != constants.IotCardStatusInStock {" + ], + "exit_status": 0 + } + }, + { + "capability": "asset-device", + "requirement": "设备多卡关系", + "spec": "openspec/specs/asset-device/spec.md", + "entries": [ + "/api/admin/devices" + ], + "handler_consumer_job": [ + "internal/handler/admin/device.go" + ], + "application_service_query": [ + "internal/service/device" + ], + "domain_state_amount": [ + "pkg/constants/iot.go" + ], + "store_migration_config": [ + "internal/store/postgres/device_sim_binding_store.go" + ], + "verification": { + "command": "代码中检索 BindStatusBound", + "literal_output": [ + "internal/service/device/binding_audit.go:136:query := db.WithContext(ctx).Where(\"device_id = ? AND bind_status = ?\", deviceID, constants.BindStatusBound).Order(\"slot_position ASC\")" + ], + "exit_status": 0 + } + }, + { + "capability": "asset-device", + "requirement": "ICCID 按原始长度精确唯一", + "spec": "openspec/specs/asset-device/spec.md", + "entries": [ + "/api/admin/iot-cards/import" + ], + "handler_consumer_job": [ + "internal/handler/admin/iot_card.go" + ], + "application_service_query": [ + "internal/service/iot_card" + ], + "domain_state_amount": [ + "internal/model/iot_card.go" + ], + "store_migration_config": [ + "internal/store/postgres/iot_card_store.go", + "migrations/000178_make_iot_card_iccid_exact_unique.up.sql" + ], + "verification": { + "command": "rg -n 'CREATE UNIQUE INDEX idx_iot_card_iccid_(19|20)' migrations/000178_make_iot_card_iccid_exact_unique.up.sql", + "literal_output": [ + "59:CREATE UNIQUE INDEX idx_iot_card_iccid_19", + "63:CREATE UNIQUE INDEX idx_iot_card_iccid_20" + ], + "exit_status": 0 + } + }, + { + "capability": "export-task", + "requirement": "导出任务终态", + "spec": "openspec/specs/export-task/spec.md", + "entries": [ + "/api/admin/export-tasks", + "constants.TaskTypeExportDispatch" + ], + "handler_consumer_job": [ + "internal/handler/admin/export_task.go", + "internal/task/export_dispatch.go" + ], + "application_service_query": [ + "internal/service/export_task" + ], + "domain_state_amount": [ + "pkg/constants/constants.go" + ], + "store_migration_config": [ + "internal/store/postgres/export_task_store.go" + ], + "verification": { + "command": "代码中检索 ExportTaskStatusCompleted", + "literal_output": [ + "internal/task/export_dispatch.go:77:if exportTask.Status == constants.ExportTaskStatusCompleted || exportTask.Status == constants.ExportTaskStatusFailed || exportTask.Status == constants.ExportTaskStatusCancelled {" + ], + "exit_status": 0 + } + }, + { + "capability": "external-integration", + "requirement": "企微审批状态", + "spec": "openspec/specs/external-integration/spec.md", + "entries": [ + "/api/admin/wecom/", + "constants.TaskTypeWeComApprovalSync" + ], + "handler_consumer_job": [ + "internal/handler/admin/wecom.go" + ], + "application_service_query": [ + "internal/application/approval" + ], + "domain_state_amount": [ + "pkg/constants/approval.go" + ], + "store_migration_config": [ + "internal/infrastructure/wecom/application_repository.go" + ], + "verification": { + "command": "代码中检索 ApprovalStatusSubmissionUnknown", + "literal_output": [ + "pkg/constants/approval.go:81:// ApprovalStatusSubmissionUnknown 表示审批提交请求已发出但结果未知。" + ], + "exit_status": 0 + } + }, + { + "capability": "external-integration", + "requirement": "企微回调与补偿", + "spec": "openspec/specs/external-integration/spec.md", + "entries": [ + "/api/callback/wecom", + "constants.TaskTypeWeComApprovalRecovery" + ], + "handler_consumer_job": [ + "internal/routes/wecom_callback.go" + ], + "application_service_query": [ + "internal/infrastructure/wecom/callback_service.go" + ], + "domain_state_amount": [ + "internal/domain/approval/instance.go" + ], + "store_migration_config": [ + "internal/infrastructure/wecom/approval_context_repository.go" + ], + "verification": { + "command": "代码中检索 ApplyDecision", + "literal_output": [ + "internal/domain/approval/instance.go:95:// ApplyDecision 校验标准决策状态迁移并冻结首次到达该终态的决策快照。" + ], + "exit_status": 0 + } + }, + { + "capability": "external-integration", + "requirement": "外部失败边界", + "spec": "openspec/specs/external-integration/spec.md", + "entries": [ + "/api/admin/wecom/", + "/api/admin/iot-cards" + ], + "handler_consumer_job": [ + "internal/handler/admin" + ], + "application_service_query": [ + "internal/gateway/client.go", + "internal/infrastructure/wecom" + ], + "domain_state_amount": [ + "pkg/errors/codes.go" + ], + "store_migration_config": [ + "internal/infrastructure/integrationlog/repository.go" + ], + "verification": { + "command": "代码中检索 CodeGatewayTimeout", + "literal_output": [ + "internal/gateway/client.go:217:return nil, true, errors.Wrap(errors.CodeGatewayTimeout, err, \"Gateway 请求超时\")" + ], + "exit_status": 0 + } + }, + { + "capability": "external-integration", + "requirement": "外部调用重试边界", + "spec": "openspec/specs/external-integration/spec.md", + "entries": [ + "constants.TaskTypeWeComApprovalRecovery" + ], + "handler_consumer_job": [ + "cmd/worker/main.go" + ], + "application_service_query": [ + "internal/gateway/client.go", + "internal/infrastructure/wecom/approval_submission_client.go" + ], + "domain_state_amount": [ + "pkg/constants/wecom.go" + ], + "store_migration_config": [ + "internal/infrastructure/wecom/approval_context_repository.go" + ], + "verification": { + "command": "代码中检索 SafeToRetry", + "literal_output": [ + "internal/infrastructure/wecom/approval_submission_client.go:41:SafeToRetry bool" + ], + "exit_status": 0 + } + }, + { + "capability": "external-integration", + "requirement": "富友调用超时兼容行为", + "spec": "openspec/specs/external-integration/spec.md", + "entries": [ + "POST /api/c/v1/orders/{id}/pay", + "POST /api/c/v1/wallet/recharge", + "POST /api/admin/agent-recharges" + ], + "handler_consumer_job": [ + "internal/handler/callback/payment.go" + ], + "application_service_query": [ + "pkg/fuiou/client.go" + ], + "domain_state_amount": [ + "pkg/fuiou/types.go" + ], + "store_migration_config": [ + "internal/store/postgres/payment_store.go" + ], + "verification": { + "command": "代码中检索 http.Post", + "literal_output": [ + "pkg/fuiou/client.go:164:httpResp, err := http.Post(reqURL, \"application/x-www-form-urlencoded\", strings.NewReader(body))" + ], + "exit_status": 0 + } + }, + { + "capability": "external-integration", + "requirement": "运营商回调幂等", + "spec": "openspec/specs/external-integration/spec.md", + "entries": [ + "/api/callback/carriers/ctcc/realname", + "/api/callback/carriers/cmcc/realname", + "/api/callback/carriers/cucc/realname", + "/api/callback/carriers/cucc/realname/remove" + ], + "handler_consumer_job": [ + "internal/handler/callback" + ], + "application_service_query": [ + "internal/infrastructure/carriercallback" + ], + "domain_state_amount": [ + "pkg/constants/integration_log.go" + ], + "store_migration_config": [ + "internal/infrastructure/integrationlog/repository.go" + ], + "verification": { + "command": "代码中检索 ctccIdempotencyKey, cmccIdempotencyKey, cuccRealnameIdempotencyKey, cuccRemovalIdempotencyKey", + "literal_output": [ + "internal/handler/callback/ctcc_realname.go:87:idempotencyKey := ctccIdempotencyKey(body, translated)", + "internal/handler/callback/cmcc_realname.go:65:idempotencyKey := cmccIdempotencyKey(body, translated)", + "internal/handler/callback/cucc_realname.go:66:key := cuccRealnameIdempotencyKey(body, translated, translateErr == nil)", + "internal/handler/callback/cucc_realname_removal.go:62:key := cuccRemovalIdempotencyKey(body, translated, translateErr == nil)" + ], + "exit_status": 0 + } + }, + { + "capability": "identity-access", + "requirement": "令牌生命周期", + "spec": "openspec/specs/identity-access/spec.md", + "entries": [ + "/api/admin/auth", + "/api/c/v1/auth" + ], + "handler_consumer_job": [ + "internal/handler/auth", + "internal/handler/app/client_auth.go" + ], + "application_service_query": [ + "internal/service/auth", + "internal/service/client_auth" + ], + "domain_state_amount": [ + "pkg/constants" + ], + "store_migration_config": [ + "internal/store/postgres/account_store.go" + ], + "verification": { + "command": "代码中检索 Refresh", + "literal_output": [ + "internal/handler/auth/handler.go:67:// 尝试从请求体获取 refresh_token(可选)" + ], + "exit_status": 0 + } + }, + { + "capability": "identity-access", + "requirement": "数据范围拒绝", + "spec": "openspec/specs/identity-access/spec.md", + "entries": [ + "/api/admin/" + ], + "handler_consumer_job": [ + "internal/handler/admin" + ], + "application_service_query": [ + "internal/service/permission" + ], + "domain_state_amount": [ + "pkg/middleware" + ], + "store_migration_config": [ + "internal/store/postgres/permission_store.go" + ], + "verification": { + "command": "代码中检索 CodeForbidden", + "literal_output": [ + "internal/handler/admin/asset.go:162:return errors.New(errors.CodeForbidden)" + ], + "exit_status": 0 + } + }, + { + "capability": "notification-delivery", + "requirement": "通知接收人隔离", + "spec": "openspec/specs/notification-delivery/spec.md", + "entries": [ + "/api/admin/notifications", + "/api/c/v1/notifications" + ], + "handler_consumer_job": [ + "internal/handler/admin/notification.go", + "internal/handler/app/client_notification.go" + ], + "application_service_query": [ + "internal/query/notification" + ], + "domain_state_amount": [ + "pkg/constants/notification.go" + ], + "store_migration_config": [ + "internal/model/notification.go" + ], + "verification": { + "command": "代码中检索 recipient_id", + "literal_output": [ + "internal/query/notification/query.go:37:Where(\"recipient_kind = ? AND recipient_id = ? AND is_read = ? AND (expires_at IS NULL OR expires_at > ?)\"," + ], + "exit_status": 0 + } + }, + { + "capability": "notification-delivery", + "requirement": "通知已读幂等", + "spec": "openspec/specs/notification-delivery/spec.md", + "entries": [ + "/api/admin/notifications/{id}/read", + "/api/c/v1/notifications/{id}/read" + ], + "handler_consumer_job": [ + "internal/handler/admin/notification.go", + "internal/handler/app/client_notification.go" + ], + "application_service_query": [ + "internal/application/notification/read.go" + ], + "domain_state_amount": [ + "pkg/constants/audit.go" + ], + "store_migration_config": [ + "internal/model/notification.go" + ], + "verification": { + "command": "代码中检索 is_read = ?", + "literal_output": [ + "internal/application/notification/read.go:95:Where(\"id = ? AND is_read = ?\", notificationID, false).Take(¬ification)" + ], + "exit_status": 0 + } + }, + { + "capability": "operations-audit", + "requirement": "审计时间线", + "spec": "openspec/specs/operations-audit/spec.md", + "entries": [ + "/api/admin/audit/" + ], + "handler_consumer_job": [ + "internal/handler/admin/audit.go" + ], + "application_service_query": [ + "internal/query/audit" + ], + "domain_state_amount": [ + "pkg/constants/audit.go" + ], + "store_migration_config": [ + "internal/infrastructure/audit" + ], + "verification": { + "command": "代码中检索 CorrelationID", + "literal_output": [ + "internal/handler/admin/audit.go:42:RequestID: request.RequestID, CorrelationID: request.CorrelationID," + ], + "exit_status": 0 + } + }, + { + "capability": "order-payment-wallet", + "requirement": "金额单位", + "spec": "openspec/specs/order-payment-wallet/spec.md", + "entries": [ + "/api/c/v1/wallet", + "/api/admin/agent-recharges" + ], + "handler_consumer_job": [ + "internal/handler/app/client_wallet.go" + ], + "application_service_query": [ + "internal/application/wallet" + ], + "domain_state_amount": [ + "pkg/constants/wallet.go" + ], + "store_migration_config": [ + "internal/store/postgres/agent_wallet_transaction_store.go" + ], + "verification": { + "command": "代码中检索 Amount", + "literal_output": [ + "internal/handler/app/client_wallet.go:230:Amount: tx.Amount," + ], + "exit_status": 0 + } + }, + { + "capability": "order-payment-wallet", + "requirement": "支付回调幂等", + "spec": "openspec/specs/order-payment-wallet/spec.md", + "entries": [ + "/api/callback/alipay", + "/api/callback/wechat-pay", + "/api/callback/fuiou-pay" + ], + "handler_consumer_job": [ + "internal/handler/callback/payment.go" + ], + "application_service_query": [ + "internal/service/client_order" + ], + "domain_state_amount": [ + "pkg/constants/payment.go" + ], + "store_migration_config": [ + "internal/store/postgres/payment_store.go" + ], + "verification": { + "command": "代码中检索 IdempotencyKey", + "literal_output": [ + "internal/handler/callback/payment.go:234:idempotencyKey := callback.TransactionID" + ], + "exit_status": 0 + } + }, + { + "capability": "order-payment-wallet", + "requirement": "钱包并发", + "spec": "openspec/specs/order-payment-wallet/spec.md", + "entries": [ + "/api/c/v1/wallet/recharge", + "/api/c/v1/orders/{id}/pay" + ], + "handler_consumer_job": [ + "internal/handler/app/client_wallet.go" + ], + "application_service_query": [ + "internal/application/wallet" + ], + "domain_state_amount": [ + "internal/domain/wallet/wallet.go" + ], + "store_migration_config": [ + "internal/store/postgres/asset_wallet_store.go" + ], + "verification": { + "command": "代码中检索 Version", + "literal_output": [ + "internal/handler/app/client_wallet.go:683:Version: 0," + ], + "exit_status": 0 + } + }, + { + "capability": "order-refund-exchange", + "requirement": "订单、退款与换货状态门禁", + "spec": "openspec/specs/order-refund-exchange/spec.md", + "entries": [ + "/api/admin/orders", + "/api/admin/refunds", + "/api/admin/exchanges" + ], + "handler_consumer_job": [ + "internal/handler/admin" + ], + "application_service_query": [ + "internal/service/order", + "internal/service/refund", + "internal/service/exchange" + ], + "domain_state_amount": [ + "pkg/constants/constants.go", + "internal/model/refund.go" + ], + "store_migration_config": [ + "internal/store/postgres/order_store.go", + "internal/store/postgres/refund_store.go", + "internal/store/postgres/exchange_order_store.go" + ], + "verification": { + "command": "代码中检索 ExchangeStatusPendingInfo", + "literal_output": [ + "internal/service/exchange/service.go:99:Status: constants.ExchangeStatusPendingInfo," + ], + "exit_status": 0 + } + }, + { + "capability": "package-lifecycle", + "requirement": "套餐状态流转", + "spec": "openspec/specs/package-lifecycle/spec.md", + "entries": [ + "/api/admin/packages", + "constants.TaskTypePackageFirstActivation" + ], + "handler_consumer_job": [ + "internal/handler/admin/package.go", + "internal/polling/package_activation_handler.go" + ], + "application_service_query": [ + "internal/service/package", + "internal/domain/package" + ], + "domain_state_amount": [ + "pkg/constants/iot.go" + ], + "store_migration_config": [ + "internal/store/postgres/package_usage_store.go" + ], + "verification": { + "command": "代码中检索 PackageUsageStatusActive", + "literal_output": [ + "internal/polling/package_activation_handler.go:211:constants.PackageUsageStatusActive," + ], + "exit_status": 0 + } + }, + { + "capability": "package-lifecycle", + "requirement": "批量操作可追踪", + "spec": "openspec/specs/package-lifecycle/spec.md", + "entries": [ + "/api/admin/asset-package-batch-orders" + ], + "handler_consumer_job": [ + "internal/handler/admin" + ], + "application_service_query": [ + "internal/service/asset_package_batch_order" + ], + "domain_state_amount": [ + "pkg/constants/constants.go" + ], + "store_migration_config": [ + "internal/store/postgres/asset_package_batch_order_task_store.go" + ], + "verification": { + "command": "代码中检索 Task", + "literal_output": [ + "internal/handler/admin/asset.go:62:return client.EnqueueTask(" + ], + "exit_status": 0 + } + }, + { + "capability": "personal-customer", + "requirement": "个人客户身份", + "spec": "openspec/specs/personal-customer/spec.md", + "entries": [ + "/api/c/v1/auth" + ], + "handler_consumer_job": [ + "internal/handler/app/client_auth.go" + ], + "application_service_query": [ + "internal/service/client_auth" + ], + "domain_state_amount": [ + "pkg/constants" + ], + "store_migration_config": [ + "internal/store/postgres/personal_customer_store.go" + ], + "verification": { + "command": "代码中检索 RefreshToken", + "literal_output": [ + "pkg/constants/auth.go:14:// DefaultRefreshTokenTTL 刷新令牌默认有效期(7 天)" + ], + "exit_status": 0 + } + }, + { + "capability": "personal-customer", + "requirement": "资产归属查询", + "spec": "openspec/specs/personal-customer/spec.md", + "entries": [ + "/api/c/v1/asset", + "/api/c/v1/device" + ], + "handler_consumer_job": [ + "internal/handler/app/client_asset.go", + "internal/handler/app/client_device.go" + ], + "application_service_query": [ + "internal/service/personal_customer" + ], + "domain_state_amount": [ + "pkg/constants/iot.go" + ], + "store_migration_config": [ + "internal/store/postgres/personal_customer_device_store.go", + "internal/store/postgres/personal_customer_iccid_store.go" + ], + "verification": { + "command": "代码中检索 CustomerID", + "literal_output": [ + "internal/handler/app/client_asset.go:104:CustomerID uint" + ], + "exit_status": 0 + } + }, + { + "capability": "polling-operations", + "requirement": "异步任务可观察", + "spec": "openspec/specs/polling-operations/spec.md", + "entries": [ + "/api/admin/polling-stats", + "/api/admin/data-cleanup" + ], + "handler_consumer_job": [ + "internal/handler/admin" + ], + "application_service_query": [ + "internal/service/polling" + ], + "domain_state_amount": [ + "pkg/constants/polling.go" + ], + "store_migration_config": [ + "internal/store/postgres/polling_manual_trigger_store.go" + ], + "verification": { + "command": "代码中检索 StatusProcessing", + "literal_output": [ + "internal/handler/admin/polling_manual_trigger.go:298:case constants.PollingManualTriggerStatusProcessing:" + ], + "exit_status": 0 + } + }, + { + "capability": "polling-operations", + "requirement": "手工轮询任务状态", + "spec": "openspec/specs/polling-operations/spec.md", + "entries": [ + "/api/admin/polling-manual-trigger", + "constants.TaskTypePolling" + ], + "handler_consumer_job": [ + "internal/handler/admin" + ], + "application_service_query": [ + "internal/service/polling/manual_trigger_service.go" + ], + "domain_state_amount": [ + "pkg/constants/polling.go" + ], + "store_migration_config": [ + "internal/store/postgres/polling_manual_trigger_store.go" + ], + "verification": { + "command": "代码中检索 PollingManualTriggerStatusCancelled", + "literal_output": [ + "internal/handler/admin/polling_manual_trigger.go:302:case constants.PollingManualTriggerStatusCancelled:" + ], + "exit_status": 0 + } + }, + { + "capability": "system-operations", + "requirement": "健康检查响应语义", + "spec": "openspec/specs/system-operations/spec.md", + "entries": [ + "/health", + "/ready" + ], + "handler_consumer_job": [ + "internal/routes/health.go" + ], + "application_service_query": [ + "internal/routes/health.go" + ], + "domain_state_amount": [ + "internal/routes/health.go" + ], + "store_migration_config": [ + "pkg/response/response.go" + ], + "verification": { + "command": "代码中检索 \"status\": \"healthy\", \"status\": \"ready\"", + "literal_output": [ + "internal/routes/health.go:18:\"status\": \"healthy\",", + "internal/routes/health.go:31:\"status\": \"ready\"," + ], + "exit_status": 0 + } + }, + { + "capability": "system-operations", + "requirement": "受控系统配置更新", + "spec": "openspec/specs/system-operations/spec.md", + "entries": [ + "/api/admin/system-configs/{key}" + ], + "handler_consumer_job": [ + "internal/handler/admin/system_config.go" + ], + "application_service_query": [ + "internal/application/systemconfig/update.go" + ], + "domain_state_amount": [ + "internal/infrastructure/systemconfig/registry.go" + ], + "store_migration_config": [ + "internal/model/system_config.go" + ], + "verification": { + "command": "代码中检索 pg_advisory_xact_lock", + "literal_output": [ + "internal/application/systemconfig/update.go:108:if err := tx.Exec(\"SELECT pg_advisory_xact_lock(hashtext(?))\", key).Error; err != nil {" + ], + "exit_status": 0 + } + }, + { + "capability": "agent-series-package-options", + "requirement": "查询系列授权套餐候选项", + "spec": "openspec/specs/agent-series-package-options/spec.md", + "entries": [ + "/api/admin/shop-series-grants/package-options" + ], + "handler_consumer_job": [ + "internal/handler/admin/shop_series_grant.go" + ], + "application_service_query": [ + "internal/service/shop_series_grant" + ], + "domain_state_amount": [ + "internal/model/dto/package_dto.go" + ], + "store_migration_config": [ + "internal/store/postgres/shop_package_allocation_store.go" + ], + "verification": { + "command": "代码中检索 ListPackageOptions", + "literal_output": [ + "internal/service/shop_series_grant/service.go:656:func (s *Service) ListPackageOptions" + ], + "exit_status": 0 + } + }, + { + "capability": "notification-delivery", + "requirement": "主钱包低余额跨阈值提醒", + "spec": "openspec/specs/notification-delivery/spec.md", + "entries": [ + "constants.OutboxEventTypeAgentMainWalletDebited", + "constants.OutboxEventTypeAdminDirectNotification" + ], + "handler_consumer_job": [ + "internal/infrastructure/wallet/debit_event.go" + ], + "application_service_query": [ + "internal/application/wallet/debit.go", + "internal/application/wallet/reservation.go" + ], + "domain_state_amount": [ + "pkg/constants/wallet.go" + ], + "store_migration_config": [ + "internal/infrastructure/messaging/outbox/repository.go" + ], + "verification": { + "command": "代码中检索 AgentMainWalletLowBalanceThreshold", + "literal_output": [ + "internal/infrastructure/wallet/debit_event.go:47:if event.BalanceBefore < constants.AgentMainWalletLowBalanceThreshold || event.BalanceAfter >= constants.AgentMainWalletLowBalanceThreshold {" + ], + "exit_status": 0 + } + }, + { + "capability": "package-lifecycle", + "requirement": "授权页面禁止重复选择套餐", + "spec": "openspec/specs/package-lifecycle/spec.md", + "entries": [ + "/api/admin/shop-series-grants/package-options" + ], + "handler_consumer_job": [ + "internal/handler/admin/shop_series_grant.go" + ], + "application_service_query": [ + "internal/service/shop_series_grant" + ], + "domain_state_amount": [ + "internal/model/dto/shop_series_grant_dto.go" + ], + "store_migration_config": [ + "internal/store/postgres/shop_package_allocation_store.go" + ], + "verification": { + "command": "代码中检索 authorized", + "literal_output": [ + "internal/model/dto/shop_series_grant_dto.go:105:Authorized bool `json:\"authorized\" description:\"目标店铺是否已启用授权\"`" + ], + "exit_status": 0 + } + }, + { + "capability": "polling-operations", + "requirement": "轮询并发计数可观测", + "spec": "openspec/specs/polling-operations/spec.md", + "entries": [ + "GET /api/admin/polling-concurrency", + "POST /api/admin/polling-concurrency/reset" + ], + "handler_consumer_job": [ + "internal/handler/admin/polling_concurrency.go" + ], + "application_service_query": [ + "internal/service/polling/concurrency_service.go" + ], + "domain_state_amount": [ + "pkg/constants/redis.go", + "internal/task/polling_base.go" + ], + "store_migration_config": [ + "internal/store/postgres/polling_concurrency_config_store.go" + ], + "verification": { + "command": "rg -n 'current < 0|Available < 0|ResetConcurrency' internal/service/polling/concurrency_service.go", + "literal_output": [ + "internal/service/polling/concurrency_service.go:70: if current < 0 {", + "internal/service/polling/concurrency_service.go:227:func (s *ConcurrencyService) ResetConcurrency" + ], + "exit_status": 0 + } + }, + { + "capability": "polling-operations", + "requirement": "轮询并发配置覆盖实际任务", + "spec": "openspec/specs/polling-operations/spec.md", + "entries": [ + "GET /api/admin/polling-concurrency", + "PUT /api/admin/polling-concurrency/{task_type}" + ], + "handler_consumer_job": [ + "internal/handler/admin/polling_concurrency.go", + "pkg/queue/handler.go" + ], + "application_service_query": [ + "internal/service/polling/concurrency_service.go" + ], + "domain_state_amount": [ + "pkg/constants/polling.go" + ], + "store_migration_config": [ + "internal/store/postgres/polling_concurrency_config_store.go", + "migrations/000206_fix_polling_concurrency_task_configs.up.sql" + ], + "verification": { + "command": "rg -n 'TaskTypePolling(Realname|Carddata|Package|Protect|CardStatus)' pkg/queue/handler.go", + "literal_output": [ + "pkg/queue/handler.go:261: h.mux.HandleFunc(constants.TaskTypePollingRealname, realnameHandler.Handle)", + "pkg/queue/handler.go:265: h.mux.HandleFunc(constants.TaskTypePollingCardStatus, cardStatusHandler.Handle)" + ], + "exit_status": 0 + } + }, + { + "capability": "polling-operations", + "requirement": "轮询任务类型名称可读", + "spec": "openspec/specs/polling-operations/spec.md", + "entries": [ + "GET /api/admin/polling-concurrency", + "GET /api/admin/polling-concurrency/{task_type}" + ], + "handler_consumer_job": [ + "internal/handler/admin/polling_concurrency.go" + ], + "application_service_query": [ + "internal/service/polling/concurrency_service.go" + ], + "domain_state_amount": [ + "internal/model/dto/polling_concurrency_dto.go" + ], + "store_migration_config": [ + "internal/store/postgres/polling_concurrency_config_store.go" + ], + "verification": { + "command": "rg -n 'card_status.*卡状态检查' internal/service/polling/concurrency_service.go", + "literal_output": [ + "internal/service/polling/concurrency_service.go:287: case \"card_status\": return \"卡状态检查\"" + ], + "exit_status": 0 + } + }, + { + "capability": "agent-funds-commission", + "requirement": "历史待审批线下代理充值可主动接入企业微信审批", + "spec": "openspec/specs/agent-funds-commission/spec.md", + "entries": [ + "/api/admin/agent-recharges/{id}/trigger-approval" + ], + "handler_consumer_job": [ + "internal/routes/agent_recharge.go", + "internal/handler/admin/agent_recharge.go" + ], + "application_service_query": [ + "internal/application/agentrecharge/offline_creation.go", + "internal/service/agent_recharge/service.go" + ], + "domain_state_amount": [], + "store_migration_config": [ + "internal/model/agent_wallet.go", + "migrations/000190_add_agent_recharge_approval_instance.up.sql", + "migrations/000170_create_approval_core.up.sql" + ], + "verification": { + "command": "rg -n \"TriggerHistorical|trigger-approval\" internal/application internal/handler/admin internal/routes", + "literal_output": [ + "internal/application/agentrecharge/offline_creation.go:51:func (s *OfflineCreationService) TriggerHistorical(ctx context.Context, recordID uint) (*CreateOfflineResult, error) {", + "internal/routes/agent_recharge.go:64: Register(group, doc, groupPath, \"POST\", \"/:id/trigger-approval\", handler.TriggerApproval, RouteSpec{" + ], + "exit_status": 0 + } + }, + { + "capability": "order-refund-exchange", + "requirement": "历史待审批退款可主动接入企业微信审批", + "spec": "openspec/specs/order-refund-exchange/spec.md", + "entries": [ + "/api/admin/refunds/{id}/trigger-approval" + ], + "handler_consumer_job": [ + "internal/routes/refund.go", + "internal/handler/admin/refund.go" + ], + "application_service_query": [ + "internal/application/refundapproval/creation.go", + "internal/service/refund/service.go" + ], + "domain_state_amount": [], + "store_migration_config": [ + "internal/model/refund.go", + "migrations/000191_add_refund_approval_instance.up.sql", + "migrations/000170_create_approval_core.up.sql" + ], + "verification": { + "command": "rg -n \"TriggerHistorical|trigger-approval\" internal/application internal/handler/admin internal/routes", + "literal_output": [ + "internal/application/refundapproval/creation.go:60:func (s *CreationService) TriggerHistorical(ctx context.Context, refundID uint) (*CreateResult, error) {", + "internal/routes/refund.go:52: Register(refund, doc, groupPath, \"POST\", \"/:id/trigger-approval\", handler.TriggerApproval, RouteSpec{" + ], + "exit_status": 0 + } + }, + { + "capability": "agent-funds-commission", + "requirement": "佣金待计算状态可恢复", + "spec": "openspec/specs/agent-funds-commission/spec.md", + "entries": [ + "constants.TaskTypeCommission" + ], + "handler_consumer_job": [ + "pkg/queue/handler.go", + "cmd/worker/main.go" + ], + "application_service_query": [ + "pkg/queue/handler.go", + "cmd/worker/main.go" + ], + "domain_state_amount": [], + "store_migration_config": [], + "verification": { + "command": "openspec validate --specs", + "literal_output": [ + "Totals: 16 passed, 0 failed (16 items)" + ], + "exit_status": 0 + } + }, + { + "capability": "agent-funds-commission", + "requirement": "退款佣金回扣可靠完成", + "spec": "openspec/specs/agent-funds-commission/spec.md", + "entries": [ + "constants.TaskTypeCommission" + ], + "handler_consumer_job": [ + "internal/infrastructure/commissiondelivery", + "pkg/queue/handler.go" + ], + "application_service_query": [ + "internal/infrastructure/commissiondelivery", + "pkg/queue/handler.go" + ], + "domain_state_amount": [], + "store_migration_config": [], + "verification": { + "command": "openspec validate --specs", + "literal_output": [ + "Totals: 16 passed, 0 failed (16 items)" + ], + "exit_status": 0 + } + }, + { + "capability": "agent-funds-commission", + "requirement": "退款后处理可补偿", + "spec": "openspec/specs/agent-funds-commission/spec.md", + "entries": [ + "constants.TaskTypeCommission" + ], + "handler_consumer_job": [ + "internal/service/refund", + "pkg/queue/handler.go" + ], + "application_service_query": [ + "internal/service/refund", + "pkg/queue/handler.go" + ], + "domain_state_amount": [], + "store_migration_config": [], + "verification": { + "command": "openspec validate --specs", + "literal_output": [ + "Totals: 16 passed, 0 failed (16 items)" + ], + "exit_status": 0 + } + }, + { + "capability": "agent-funds-commission", + "requirement": "代理商资金概况按店铺 ID 检索", + "spec": "openspec/specs/agent-funds-commission/spec.md", + "entries": [ + "/api/admin/shops/fund-summary" + ], + "handler_consumer_job": [ + "internal/routes/commission.go", + "internal/service/shop_commission" + ], + "application_service_query": [ + "internal/routes/commission.go", + "internal/service/shop_commission" + ], + "domain_state_amount": [], + "store_migration_config": [], + "verification": { + "command": "openspec validate --specs", + "literal_output": [ + "Totals: 16 passed, 0 failed (16 items)" + ], + "exit_status": 0 + } + }, + { + "capability": "asset-device", + "requirement": "临期颜色等级仅用于展示", + "spec": "openspec/specs/asset-device/spec.md", + "entries": [ + "/api/admin/expiring-assets", + "constants.TaskTypePackageExpiryReminder" + ], + "handler_consumer_job": [ + "internal/routes/asset.go", + "pkg/queue/handler.go" + ], + "application_service_query": [ + "internal/routes/asset.go", + "pkg/queue/handler.go" + ], + "domain_state_amount": [], + "store_migration_config": [], + "verification": { + "command": "openspec validate --specs", + "literal_output": [ + "Totals: 16 passed, 0 failed (16 items)" + ], + "exit_status": 0 + } + }, + { + "capability": "asset-device", + "requirement": "卡业务观测可靠事件标识", + "spec": "openspec/specs/asset-device/spec.md", + "entries": [ + "constants.TaskTypeCardObservationSeries" + ], + "handler_consumer_job": [ + "pkg/queue/handler.go", + "internal/application/cardobservation" + ], + "application_service_query": [ + "pkg/queue/handler.go", + "internal/application/cardobservation" + ], + "domain_state_amount": [], + "store_migration_config": [], + "verification": { + "command": "openspec validate --specs", + "literal_output": [ + "Totals: 16 passed, 0 failed (16 items)" + ], + "exit_status": 0 + } + }, + { + "capability": "notification-delivery", + "requirement": "套餐临期每日站内提醒", + "spec": "openspec/specs/notification-delivery/spec.md", + "entries": [ + "constants.TaskTypePackageExpiryReminder" + ], + "handler_consumer_job": [ + "pkg/queue/handler.go", + "internal/service/notification" + ], + "application_service_query": [ + "pkg/queue/handler.go", + "internal/service/notification" + ], + "domain_state_amount": [], + "store_migration_config": [], + "verification": { + "command": "openspec validate --specs", + "literal_output": [ + "Totals: 16 passed, 0 failed (16 items)" + ], + "exit_status": 0 + } + }, + { + "capability": "order-commission-delivery", + "requirement": "佣金计算重复投递幂等", + "spec": "openspec/specs/order-commission-delivery/spec.md", + "entries": [ + "constants.TaskTypeCommission" + ], + "handler_consumer_job": [ + "pkg/queue/handler.go", + "internal/infrastructure/commissiondelivery" + ], + "application_service_query": [ + "pkg/queue/handler.go", + "internal/infrastructure/commissiondelivery" + ], + "domain_state_amount": [], + "store_migration_config": [], + "verification": { + "command": "openspec validate --specs", + "literal_output": [ + "Totals: 16 passed, 0 failed (16 items)" + ], + "exit_status": 0 + } + }, + { + "capability": "order-commission-delivery", + "requirement": "已支付订单佣金计算可靠投递", + "spec": "openspec/specs/order-commission-delivery/spec.md", + "entries": [ + "constants.TaskTypeCommission" + ], + "handler_consumer_job": [ + "pkg/queue/handler.go", + "internal/infrastructure/commissiondelivery" + ], + "application_service_query": [ + "pkg/queue/handler.go", + "internal/infrastructure/commissiondelivery" + ], + "domain_state_amount": [], + "store_migration_config": [], + "verification": { + "command": "openspec validate --specs", + "literal_output": [ + "Totals: 16 passed, 0 failed (16 items)" + ], + "exit_status": 0 + } + }, + { + "capability": "order-commission-delivery", + "requirement": "待计算订单可补偿", + "spec": "openspec/specs/order-commission-delivery/spec.md", + "entries": [ + "constants.TaskTypeCommission" + ], + "handler_consumer_job": [ + "pkg/queue/handler.go", + "internal/infrastructure/commissiondelivery" + ], + "application_service_query": [ + "pkg/queue/handler.go", + "internal/infrastructure/commissiondelivery" + ], + "domain_state_amount": [], + "store_migration_config": [], + "verification": { + "command": "openspec validate --specs", + "literal_output": [ + "Totals: 16 passed, 0 failed (16 items)" + ], + "exit_status": 0 + } + }, + { + "capability": "order-refund-exchange", + "requirement": "代理退款查询按所属店铺隔离", + "spec": "openspec/specs/order-refund-exchange/spec.md", + "entries": [ + "/api/admin/refunds", + "/api/admin/refunds/{id}" + ], + "handler_consumer_job": [ + "internal/routes/refund.go", + "internal/store/postgres/refund_store.go" + ], + "application_service_query": [ + "internal/routes/refund.go", + "internal/store/postgres/refund_store.go" + ], + "domain_state_amount": [], + "store_migration_config": [], + "verification": { + "command": "openspec validate --specs", + "literal_output": [ + "Totals: 16 passed, 0 failed (16 items)" + ], + "exit_status": 0 + } + }, + { + "capability": "package-lifecycle", + "requirement": "套餐使用记录价格快照", + "spec": "openspec/specs/package-lifecycle/spec.md", + "entries": [ + "/api/admin/orders" + ], + "handler_consumer_job": [ + "internal/routes/order.go", + "internal/service/order" + ], + "application_service_query": [ + "internal/routes/order.go", + "internal/service/order" + ], + "domain_state_amount": [], + "store_migration_config": [], + "verification": { + "command": "openspec validate --specs", + "literal_output": [ + "Totals: 16 passed, 0 failed (16 items)" + ], + "exit_status": 0 + } + } +] diff --git a/openspec/changes/add-legacy-approval-trigger/.openspec.yaml b/openspec/changes/archive/2026-08-18-add-legacy-approval-trigger/.openspec.yaml similarity index 100% rename from openspec/changes/add-legacy-approval-trigger/.openspec.yaml rename to openspec/changes/archive/2026-08-18-add-legacy-approval-trigger/.openspec.yaml diff --git a/openspec/changes/add-legacy-approval-trigger/design.md b/openspec/changes/archive/2026-08-18-add-legacy-approval-trigger/design.md similarity index 100% rename from openspec/changes/add-legacy-approval-trigger/design.md rename to openspec/changes/archive/2026-08-18-add-legacy-approval-trigger/design.md diff --git a/openspec/changes/add-legacy-approval-trigger/proposal.md b/openspec/changes/archive/2026-08-18-add-legacy-approval-trigger/proposal.md similarity index 100% rename from openspec/changes/add-legacy-approval-trigger/proposal.md rename to openspec/changes/archive/2026-08-18-add-legacy-approval-trigger/proposal.md diff --git a/openspec/changes/add-legacy-approval-trigger/specs/agent-funds-commission/spec.md b/openspec/changes/archive/2026-08-18-add-legacy-approval-trigger/specs/agent-funds-commission/spec.md similarity index 100% rename from openspec/changes/add-legacy-approval-trigger/specs/agent-funds-commission/spec.md rename to openspec/changes/archive/2026-08-18-add-legacy-approval-trigger/specs/agent-funds-commission/spec.md diff --git a/openspec/changes/add-legacy-approval-trigger/specs/order-refund-exchange/spec.md b/openspec/changes/archive/2026-08-18-add-legacy-approval-trigger/specs/order-refund-exchange/spec.md similarity index 100% rename from openspec/changes/add-legacy-approval-trigger/specs/order-refund-exchange/spec.md rename to openspec/changes/archive/2026-08-18-add-legacy-approval-trigger/specs/order-refund-exchange/spec.md diff --git a/openspec/changes/add-legacy-approval-trigger/tasks.md b/openspec/changes/archive/2026-08-18-add-legacy-approval-trigger/tasks.md similarity index 96% rename from openspec/changes/add-legacy-approval-trigger/tasks.md rename to openspec/changes/archive/2026-08-18-add-legacy-approval-trigger/tasks.md index 03b6c88..12ff0db 100644 --- a/openspec/changes/add-legacy-approval-trigger/tasks.md +++ b/openspec/changes/archive/2026-08-18-add-legacy-approval-trigger/tasks.md @@ -13,4 +13,4 @@ ## 3. 验证 - [x] 3.1 以隔离环境或最小可运行验证覆盖:两个符合资格的历史记录各只创建一次审批实例和提交 Outbox;非待审批、已关联、在线充值、原创建人/场景不可用及并发重复请求不创建第二实例。 -- [ ] 3.2 执行 `gofmt -w`(变更的 Go 文件)、`go build ./cmd/api ./cmd/worker`、`go run cmd/gendocs/main.go`、`openspec validate --all` 和 `./scripts/context-health.sh`。 +- [x] 3.2 执行 `gofmt -w`(变更的 Go 文件)、`go build ./cmd/api ./cmd/worker`、`go run cmd/gendocs/main.go`、`openspec validate --all` 和 `./scripts/context-health.sh`。 diff --git a/scripts/context-health.sh b/scripts/context-health.sh index 8228dc3..0e0ab79 100755 --- a/scripts/context-health.sh +++ b/scripts/context-health.sh @@ -14,8 +14,8 @@ done [[ -z "$(find "$HOME/.codex/agents" -maxdepth 1 -name 'gsd-*' -print 2>/dev/null)" ]] [[ -z "$(command -v omx 2>/dev/null || true)" ]] ! grep -RIlE 'oh-my-codex|OMX:' AGENTS.md CLAUDE.md .agents .claude >/dev/null 2>&1 -[[ -z "$(git ls-files .lh-harness)" ]] -[[ -z "$(find . -type f -name '*_test.go' -not -path './.git/*' -not -path './.lh-harness/*' -print)" ]] + +[[ -z "$(find . -type f -name '*_test.go' -not -path './.git/*' -print)" ]] [[ ! -e tests ]] [[ ! -e internal/testutil ]] [[ ! -e scripts/benchmark ]] @@ -49,7 +49,7 @@ for spec in Path('openspec/specs').glob('*/spec.md'): spec_requirements.update(f'{spec.parent.name}::{name}' for name in names) indexed_routes.update(f'{method} {path}' for method,path in re.findall(r'`(GET|POST|PUT|PATCH|DELETE) ([^`]+)`', text)) -evidence_dir=Path('.lh-harness/context-reset') +evidence_dir=Path('docs/verification/context-reset') evidence=json.loads((evidence_dir/'requirement-evidence.json').read_text()) matrix=json.loads((evidence_dir/'entry-capability-requirement-matrix.json').read_text()) evidence_requirements={f"{row['capability']}::{row['requirement']}" for row in evidence}