wangdl
608129be4e
docs: ADR-003 冻结统一 Job Engine、Registry、Outbox 与状态机
...
Deploy API Server / build-and-unit (push) Successful in 31s
Deploy API Server / current-integration (push) Successful in 28s
Deploy API Server / backward-compat (push) Successful in 0s
Deploy API Server / deploy (push) Successful in 1m3s
冻结 M-AI-03 完整实现契约:
- 状态机:5 状态、6 允许迁移、6 非法迁移、CAS 并发、Heartbeat/Reaper
- Job Definition Registry:TypeScript 接口冻结、注册校验、禁止 switch(jobType)
- 队列:ai-interactive/ai-background/ai-analysis 配置、Payload、Worker 边界
- Outbox:ai.job.enqueue 事件、CAS 先于 queue.add 的领取算法、崩溃窗口分析
- Execution Engine:PREPARE/RESOLVE/EXECUTE/PROJECT/COMPLETE 五阶段管线
- Projector:事务边界、AiJobArtifact 幂等、失败回滚
- API:4 端点、JobStatusResponse 接口、6 公开错误码
- 安全:Credential/Redis/日志/Snapshot/Outbox payload 约束
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-20 17:06:13 +08:00
wangdl
8e5108751c
docs: 补充 AuditLogProcessor 行为分析 + ContentSafetyService 未使用依赖
...
Deploy API Server / build-and-unit (push) Successful in 33s
Deploy API Server / current-integration (push) Successful in 29s
Deploy API Server / backward-compat (push) Successful in 0s
Deploy API Server / deploy (push) Successful in 1m0s
- W4 新增 process() 方法完整代码和行为说明
- 标注因队列无生产者,Processor 从未被触发
- 新增 ContentSafetyService 注入未使用 QueueService 的依赖清理建议
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-20 17:03:28 +08:00
wangdl
64659825ae
docs: 修正审计文档 — 6 项 Non-blocking 问题
...
Deploy API Server / build-and-unit (push) Successful in 31s
Deploy API Server / current-integration (push) Successful in 29s
Deploy API Server / backward-compat (push) Successful in 1s
Deploy API Server / deploy (push) Successful in 1m0s
问题 5:新增 queueName 与实际队列不一致(ai-interactive vs ai-analysis)及风险标注
问题 6:移除 QueueService.add() 独立 Producer 身份,降级为基础设施注释
问题 7:细化孤儿队列描述 — 每个队列的生产者状态、WorkerModule 注册、闲置含义
问题 8:新增 STATUS_TO_LIFECYCLE 映射缺口分析(缺少 cancel_requested / cancelled)
问题 9:补充 RuntimeInternalService.notifyJobComplete() 的直接通知路径
问题 10:新增 Outbox 并发重复投递场景的时序分析
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-20 16:59:34 +08:00
wangdl
ed783967e8
docs: M-AI-03 审计现有 Job 创建、Worker 执行与 Outbox 接入边界
...
Deploy API Server / build-and-unit (push) Successful in 33s
Deploy API Server / current-integration (push) Successful in 29s
Deploy API Server / backward-compat (push) Successful in 0s
Deploy API Server / deploy (push) Successful in 58s
产出 docs/architecture/m-ai-03-current-execution-audit.md。
修正:
- 移除死代码 publishAsync() 的 Producer 身份(零调用方)
- 移除 NotificationsService.send() 的 Producer 身份(仅写 DB,不入队)
- 移除 AdminEventsController 的 Producer 身份(只读+重试,不创建 Job)
- 新增孤儿队列节:notification/domain-events/audit-logs 的 Consumer 存在但无活跃 Producer
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-20 16:56:39 +08:00
wangdl
4c2b8d02d7
docs(M-AI-02-GATE): update ADR-002 lifecycle spec + @map strategy
...
Deploy API Server / build-and-deploy (push) Failing after 24s
- lifecycleStatus enum: created|queued|running|retrying|succeeded|failed|cancel_requested|cancelled
- Legacy mapping: pending→queued, processing→running, completed→succeeded, failed→failed
- @map approach documented for physical column compatibility
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-20 12:40:26 +08:00
wangdl
800ce4a2b2
feat(M-AI-02): schema audit (02-01) + ADR freeze (02-02)
...
M-AI-02-01: Production DB audit of all 5 AI tables (9 rows, 0 orphans, 37 test refs)
M-AI-02-02: Frozen AiJob Expand ADR — 43-column schema, 6 indexes, state mapping
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-20 12:24:16 +08:00
wangdl
56315e454b
docs: fix appendix A line numbers and NotificationWorker dependency chain
...
- AiAnalysisWorker in worker.module.ts: line 62→64
- NotificationWorker: verified complete dependency chain (NotificationsService→NotificationsRepository+EventBusService(@Optional))
- Removed resolved "unconfirmed" item from section 六
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-19 20:31:08 +08:00
wangdl
54bc505f7a
docs: add ADR-001 unified AI architecture decision record
...
Freeze the architecture decision for 8-batch unified AI migration.
Covers current/target topology, API/Worker process boundaries,
5 Processors, Heavy Runtime disposition, phase-1 non-goals,
rollback principles, and cross-batch constraints.
Includes Appendix A: worker dependency closure audit.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-19 20:10:35 +08:00