lili
|
984c6db583
|
test(p1r): require coverage evidence test files
|
2026-06-19 02:38:29 -07:00 |
|
lili
|
0cf6a6659e
|
test(p1r): approve remaining api coverage completions
|
2026-06-17 10:49:58 -07:00 |
|
lili
|
4c16235e09
|
docs(p1r): sync account verification debt status
|
2026-06-17 07:59:46 -07:00 |
|
lili
|
26e1dd145f
|
test(p1r): 批14 account 管理端购买记录读真实 PG IT(adminListPurchaseRecords)+ account 验收债清零
P1rAccountAdminPurchaseRecordsCompletedApprovalIT 经真实 /admin-api/muse/account/purchase-records
覆盖 adminListPurchaseRecords:跨模块(base-package=cn.iocoder.muse.module)由单体内 market 的
MarketAccountProjectionProvider 真实判定 purchase 投影可用,读端只读 Account 自有投影表
muse_account_record_projection。断言无 userId→跨用户全量、userId 过滤→owner 限定 +
source_status→admin status 归一 + 资产信息从 title/snapshot 回填、userId+status=completed 命中、
status=refunded 该用户空、非法 status→BAD_REQUEST、API version 守卫、RBAC(muse:account:query)
deny→FORBIDDEN,全程纯读 no-write(member_user + 投影表 row_to_json 快照零变更);Account 投影
写端口用抛错 stub 越界反假绿。真实 PG muse_p1r_account_admin_purchase_test 2/2 绿,独立复跑两次均绿。
至此 account needs_verification 验收债清零(批3 + 批7-14 全部补真实 PG 证据、证据就绪待人工批,
completed 仍由人工批台账)。同步 docs/mvp/进度总账.md §五B(account 1→0)与 member/.agent。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-17 00:35:11 -07:00 |
|
lili
|
77ab684baa
|
test(p1r): 验收债批13 account 安全事件确认真实 PG IT(1 op,2/2 绿)
新增 P1rAccountSecurityEventAckCompletedApprovalIT,经真实 HTTP 入口 + 真实
PostgreSQL(muse_p1r_account_security_ack_test,独立复跑两次 2/2 绿)覆盖
appAcknowledgeSecurityEvent:
- 属主确认:按 owner 校验事件归属,向追加表 muse_account_security_event_ack
追加处理轨迹 + 把基础事件 acknowledged 置真 + 命令 + 成功审计;
- 相同 commandId 幂等回放(不追加第二条轨迹);
- 非法 action→BAD_REQUEST、跨 owner→NOT_FOUND(owner 隔离不泄露)、非数字
eventId→NOT_FOUND、缺用户→ACCOUNT_USER_NOT_EXISTS、API version 守卫,
全程 fail-closed 且 0 写;
- 命令/审计走真实实现,无外部依赖;仅对专属 _test 库缺库自动创建,保留
_test/密码仅 env/凭据 query 守卫。
同步 §五B(剩余 account 2→1)+ muse-module-member/.agent。
证据就绪,completed 待人工批(不自批台账=反假绿)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-17 00:19:45 -07:00 |
|
lili
|
0521ac2602
|
test(p1r): 验收债批12 account 管理端写路收尾真实 PG IT(2 op,3/3 绿)
新增 P1rAccountAdminWritesCompletedApprovalIT,经真实 HTTP 入口 + 真实
PostgreSQL(muse_p1r_account_admin_writes_test,独立复跑两次 3/3 绿)覆盖
adminCreateNewApiBinding / adminCreateCallAttributionJob:
- adminCreateNewApiBinding:单体 New-API facade(UnavailableNewApiAccountFacade)
不可用时正确 fail-closed —— 业务 @Transactional 回滚命令预占(0 残留)+ 不写
binding,失败外部调用经 REQUIRES_NEW 独立落库一条 unavailable,客户端收
ACCOUNT_NEW_API_UNAVAILABLE;目标用户不存在/RBAC(muse:account:new-api:manage)/
API version 守卫全程 0 写;
- adminCreateCallAttributionJob:基于已存在 correlationId 外部调用建立 queued
归因 job + 命令(items 暂空),命令幂等回放(idempotent_hit 不写第二条),
callIds 白名单未命中 BAD_REQUEST、expectedCallRevision 版本冲突
ACCOUNT_VERSION_CONFLICT、缺调用记录 ACCOUNT_INTEGRATION_CALL_NOT_EXISTS、
RBAC(muse:account:attribution:manage)/API version fail-closed,失败路径 0 写;
- 命令走真实实现,归因来源/审计/配额/用量附带依赖用抛错 mock 反假绿越界;
- 仅对专属 _test 库缺库自动创建,保留 _test/密码仅 env/凭据 query 守卫。
同步 §五B(剩余 account 4→2)+ muse-module-member/.agent。
证据就绪,completed 待人工批(不自批台账=反假绿)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-17 00:11:51 -07:00 |
|
lili
|
500860208e
|
test(p1r): 验收债批11 account 管理端只读补全真实 PG IT(2 op,3/3 绿)
新增 P1rAccountAdminReadsCompletedApprovalIT,经真实 HTTP 入口 + 真实
PostgreSQL(muse_p1r_account_admin_reads_test,独立复跑两次 3/3 绿)覆盖
adminListUsageRecords / adminGetCallAttributionJob:
- adminListUsageRecords:以账户用户为分页主表在库内聚合(token 输入 150/
输出 230/合计 380 求和、pending 计数 1/failed 0、attributionStatus=pending),
非法 period→BAD_REQUEST;
- adminGetCallAttributionJob:按 jobId 读 job+items 并归一状态(completed)+
分桶计数(attributed 1/failed 1/pending 0),not-found→
ACCOUNT_INTEGRATION_CALL_NOT_EXISTS;
- 两 op 均 RBAC(muse:account:query)fail-closed、API version 守卫、纯读
no-write(命令/审计/外部调用表保持为空);归因写路外部来源 facade 用抛错
mock 反假绿越界;
- 仅对专属 _test 库缺库自动创建,保留 _test/密码仅 env/凭据 query 守卫。
同步 §五B(剩余 account 6→4)+ muse-module-member/.agent。
证据就绪,completed 待人工批(不自批台账=反假绿)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-17 00:02:30 -07:00 |
|
lili
|
14d7884a1f
|
test(p1r): 验收债批10 account 导出/下载簇真实 PG IT(3 op,4/4 绿)
新增 P1rAccountExportDownloadClusterCompletedApprovalIT,经真实 HTTP 入口 +
真实 PostgreSQL(muse_p1r_account_export_test,独立复跑两次 4/4 绿)覆盖
appCreateExportTask / appGetExportTask / appDownloadExport:
- appCreateExportTask:FileService(UnavailableAccountFileServiceFacade,单体
默认)未接入时,按合同把非敏感导出(profile)落库为 queued 任务 + 命令 +
成功审计,绝不伪造 completed/fileRef/下载凭证,不写安全事件;相同 commandId
幂等回放(idempotent_hit 不写第二条);敏感类型(usage)缺 step-up→BAD_REQUEST
回滚;非法 exportType/缺用户/API version 均 fail-closed;
- appGetExportTask:按 owner 读任务状态归一、跨 owner not found、纯读 no-write;
- appDownloadExport:校验下载凭证(无效→ACCOUNT_DOWNLOAD_CREDENTIAL_INVALID),
凭证可用但 FileService 不可用时正确 fail-closed —— @Transactional 回滚
一次性消费(凭证 consumed_at 仍空可重试)+ 不写下载审计,客户端收
ACCOUNT_FILE_SERVICE_UNAVAILABLE;
- 命令/审计走真实实现,仅对专属 _test 库缺库自动创建,保留 _test/密码仅 env/
凭据 query 守卫。
同步 §五B(剩余 account 9→6)+ muse-module-member/.agent。
证据就绪,completed 待人工批(不自批台账=反假绿)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-16 23:52:51 -07:00 |
|
lili
|
91f223acd8
|
test(p1r): 验收债批9 account New-API 绑定簇真实 PG IT(3 op,4/4 绿)
新增 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>
|
2026-06-16 23:42:09 -07:00 |
|
lili
|
fa9dae84ce
|
test(p1r): 验收债批8 account 用量/外部调用可观测读端真实 PG IT(3 op,4/4 绿)
新增 P1rAccountUsageObservabilityCompletedApprovalIT,经真实 HTTP 入口 +
真实 PostgreSQL(muse_p1r_account_usage_observability_test,独立复跑两次 4/4 绿)
覆盖 getAppUsage / appGetIntegrationCallByCorrelation /
adminGetIntegrationCallByCorrelation 三个只读 operation:
- getAppUsage:按 owner 聚合(token 输入/输出求和、pending/anomaly 计数、
byModel、byAttribution)+ 跨用户隔离(他人用量不计入)+ period 规范化/白名单;
- 外部调用读:app 侧 owner 守卫(越权 ACCOUNT_RESOURCE_FORBIDDEN)、
admin 侧无 owner 限制可跨用户读 + RBAC(muse:account:query),status/
requestType/attributionStatus/retryGroup 归一化;
- 三 op 纯读全程 no-write(member_user/usage_record/integration_call/
command/audit 快照前后一致);fail-closed:缺用户/not-found/API version/
RBAC deny 全部经真实 GlobalExceptionHandler 命中;
- 控制器附带依赖(权益/绑定/配额/归因 service)用抛错 mock 反假绿越界;
- 仅对专属 _test 库缺库自动创建,保留 _test/密码仅 env/凭据 query 守卫。
同步 §五B(剩余 account 15→12)+ muse-module-member/.agent。
证据就绪,completed 待人工批(不自批台账=反假绿)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-16 23:26:24 -07:00 |
|
lili
|
e10a547b04
|
test(p1r): 验收债批7 真实 PG IT(account 配额请求 3 op,5/5 绿)
P1rAccountQuotaRequestCompletedApprovalIT 覆盖 appCreateQuotaRequest/
appGetQuotaRequest/adminCreateQuotaRequest,经真实 /app-api/muse/account/
quota-requests 与 /admin-api/muse/account/users/{userId}/quota-requests
(member 租户行拦截器 + member_user fixture + admin @PreAuthorize method security):
create 入队写 quota_request(queued)+pending_attribution 外部调用占位+completed
command(app:actor=owner=登录用户/amount=0;admin:actor=操作者、owner=目标用户、
amount=targetQuota.limit);命令幂等回放(idempotent_hit 不写第二条);相同 commandId
不同请求 hash→ACCOUNT_COMMAND_ID_CONFLICT 事务回滚;get 按 owner+tenant 隔离归一化
状态、纯读 no-write;fail-closed(类型白名单/API version/缺用户/越权 owner/not-found/
RBAC deny)全程 0 写、0 command 预占;配额请求链路不写 Account 审计(audit/outbox 桩
抛错反假绿)。10 条负路经真实 GlobalExceptionHandler 实测命中(9 serviceException+
1 accessDenied)。真实 PG muse_p1r_account_quota_request_test 5/5 绿(0F/0E,
独立复跑两次)。总账 §五B 记批7 证据就绪待人工批,剩余 account 18→15;member .agent 同步。
agent 不自批台账/coverage gate=反假绿。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-16 23:07:54 -07:00 |
|
lili
|
9f6faacf9c
|
docs(progress): 验收债批2/3/4 证据就绪待批 + market/member .agent 同步
总账 §五B 记入批2/3/4(market发布5 + account记录3 + market申诉3,真实 PG 12/12 绿),
剩余口径更新为 content 26 + market 20 + account 18;market/member .agent 补真实 PG
验收证据指针。三批均「证据就绪,completed 待人工批」——agent 不自批台账=反假绿。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-16 17:32:23 -07:00 |
|
lili
|
e181669197
|
chore(agent-infra): 建立 agent 开发基建、清理历史 churn 并以 BC 违例整改验证
本会话三部分交付,均经 JDK21 真实构建验证(非退出码,读 BUILD SUCCESS + Tests run):
1) Agent 开发基建(机械门禁优先)
- 入口与中枢:AGENTS.md、.agents/{knowledge,rules,skills,workflows}、CLAUDE.md 订正
- 订正 .gitignore:移除对 .agent/.agents 的忽略——它们是版本化 agent 基建,须入库(此前被忽略致克隆即缺)
- 机械门禁:CI 真跑测试(maven.yml JDK21、去 -Dmaven.test.skip)、覆盖台账去硬编码、
BC 边界 ArchUnit 门(BcBoundaryArchTest)、契约先行门(ContractFirstGateTest:Flyway 卫生 + OpenAPI 结构)
- 单一进度源 docs/mvp/进度总账.md + 7 个 BC per-module .agent + mise.toml(锁 JDK21)
- P1 增量:AiSuggestionMergeProjectionFacade(Gap A)、ContentSourceServiceImpl 事务化 outbox 回流(Gap B)
2) 过期历史文档清理(97 份 churn,git 可恢复)
- 删 docs/memorys(34)、agent-specs 审阅/执行版+迁移review(34)、superpowers/plans+specs(25)、
design-docs/临时+memorys(4);保留 superpowers/reports/coverage(门禁依赖)
- 唯一干货蒸馏入 .agents/knowledge/external-deps-and-gotchas.md;订正大纲/映射表/基线悬空引用
3) P1 harness 验证:消除已登记 BC 违例 ContentMuseWorkOwnerFacade
- content-api 新增只读端口 MuseContentWorkOwnerApi + content-server 实现(读自有 DAL);
AI 适配器改消费该端口、移除全部 content.dal 依赖,AI 业务规则与 4 消费者不变
- 删除 ArchUnit 豁免 → 门禁收紧(反向红 31 例 / 正向绿;适配器单测 13/0F、端口实现 7/0F)
注:muse-studio/src(SSE 相关 4 文件)与 muse-module-ai/pom.xml(移除孤儿 contract-server)
为本会话之前已存在的未提交改动,非本次工作,未纳入本提交。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-14 04:38:07 -07:00 |
|