新增 P1rAccountNewApiBindingClusterCompletedApprovalIT,经真实 HTTP 入口 + 真实 PostgreSQL(muse_p1r_account_newapi_binding_test,独立复跑两次 4/4 绿) 覆盖 getAppNewApiBinding / adminListNewApiBindings / appRecheckNewApiBinding: - getAppNewApiBinding:按 owner 读绑定摘要 + 存储态归一(active→bound、 无绑定→unbound 且不可重验),纯读 no-write; - adminListNewApiBindings:以账户用户为分页主表(无筛选按 id 倒序返 bound/unbound/sync_failed 三态 + syncErrorMessage)、bindingStatus 走 EXISTS/NOT EXISTS 筛选、非法状态 BAD_REQUEST、RBAC(muse:account:query) fail-closed,纯读 no-write; - appRecheckNewApiBinding:单体 New-API facade(UnavailableNewApiAccountFacade) 不可用时正确 fail-closed —— 业务 @Transactional 回滚命令预占(0 残留), 失败外部调用经 REQUIRES_NEW 独立落库一条 unavailable(error_code 可排障), binding 不被改写,客户端收 ACCOUNT_NEW_API_UNAVAILABLE;binding 不存在/ 缺用户/API version 三守卫全程 0 写; - 控制器/服务附带依赖(quota/usage/audit service)用抛错 mock 反假绿越界; - 仅对专属 _test 库缺库自动创建,保留 _test/密码仅 env/凭据 query 守卫。 同步 §五B(剩余 account 12→9)+ muse-module-member/.agent。 证据就绪,completed 待人工批(不自批台账=反假绿)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
10 lines
3.1 KiB
Plaintext
10 lines
3.1 KiB
Plaintext
# .agent — muse-module-member(账户/个人中心 · Account BC 物理承载)
|
|
|
|
> 模块跨会话记忆。真实现状权威见 [现状基线 §四/§五](../../docs/agent-specs/2026-06-13-项目目标与模块现状基线.md);进度见 [总账](../../docs/mvp/进度总账.md)。本文件只记目标/边界/out-of-scope/现状指针/TODO,过时即更。
|
|
|
|
- **目标(owner 职责)**:Account/Usage/Audit BC——Profile / Entitlement-Quota / Usage Record / Personal Center Summary / 记录总览 / Security Event / New-API Binding / Audit Log / Download Credential。**member = Account BC 物理承载,不新增 account 模块**。
|
|
- **边界(不可违反)**:是用户可见权益的聚合**读模型**与跳转入口,**不是消费账本事实源,不能反写**作品/知识/智能体/市场事实;高危审计 append-only + WORM/哈希链;Entitlement/Quota/Usage/Security/Binding 唯一写入 authority;守 BC 边界不碰他域 `.dal`([bc-boundaries](../../.agents/rules/bc-boundaries.md))。
|
|
- **out-of-scope**:他域事实写入。
|
|
- **现状**:只读评估 68%。**2026-06-15 活体订正**:单体内 `MarketAccountProjectionFacade` 由 market 的 `MarketAccountProjectionProvider` 真实提供,purchases/licenses/publish-records 三端可读投影,不是 `*_UNAVAILABLE` 缺口。**2026-06-16 补真实 PG 验收证据**:`P1rAccountMarketRecordsCompletedApprovalIT` 覆盖 appListPurchases/appListLicenses/appListPublishRecords,真实 PG 3/3 绿;`P1rAccountQuotaRequestCompletedApprovalIT` 覆盖 appCreateQuotaRequest/appGetQuotaRequest/adminCreateQuotaRequest(命令幂等+commandId 冲突回滚+owner/tenant 隔离+RBAC+类型白名单),真实 PG 5/5 绿(独立复跑);`P1rAccountUsageObservabilityCompletedApprovalIT` 覆盖 getAppUsage/appGetIntegrationCallByCorrelation/adminGetIntegrationCallByCorrelation(用量按 owner 聚合 token/pending/anomaly/byModel+跨用户隔离+period 白名单、外部调用 app owner 守卫/admin 无 owner 限制+RBAC、三 op 纯读 no-write、缺用户/not-found/API version/RBAC fail-closed),真实 PG 4/4 绿(独立复跑);`P1rAccountNewApiBindingClusterCompletedApprovalIT` 覆盖 getAppNewApiBinding/adminListNewApiBindings/appRecheckNewApiBinding(绑定摘要 owner 读 + active→bound 归一、admin 列表以账户用户为分页主表 + EXISTS/NOT EXISTS 状态筛选 + RBAC、两读 no-write、recheck 单体 New-API 不可用正确 fail-closed:命令预占回滚但失败调用 REQUIRES_NEW 独立落库),真实 PG 4/4 绿(独立复跑);证据就绪,completed 仍待人工批准。
|
|
- **关键风险 / TODO**:剩余 account 验收债 9 op(quota-request 3 op 批7 + usage/integration-call 3 op 批8 + new-api 绑定簇 3 op 批9 已补证,recheck 已证正确 fail-closed):exports/downloads(appCreateExportTask/appGetExportTask/appDownloadExport)属对象存储 FileService 未配置的正确 fail-closed、adminCreateNewApiBinding/call-attribution-job 属 New-API 外部依赖;adminListUsageRecords/adminListPurchaseRecords/adminGetCallAttributionJob/appAcknowledgeSecurityEvent 等内部读写需按批补真实 PG 证据。前端仍有深页未全覆盖真实后端。
|