Files
junhong_cmp_fiber/docs/verification/context-reset/requirement-evidence.json
2026-08-18 16:30:16 +08:00

1486 lines
45 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[
{
"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. 每个请求必须携带 HeaderX-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(&notification)"
],
"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
}
}
]