[M-AI-04-08-GATE] Active Recall 统一 Job Engine 迁移验收与切换 #303
Closed
opened 2026-06-21 12:48:14 +08:00 by wangdl
·
2 comments
Labels
Clear labels
adr
Area: adr
architecture
Area: architecture
area:activity
活动/统计
area:admin
管理后台
area:admin-api
area:ai
AI/RAG
area:ai-runtime
AI Runtime / AI 分析体系相关
area:analytics
area:api
API 接口
area:auth
认证与授权
area:cos
对象存储
area:database
数据库/Migration
area:import
文件导入/解析
area:knowledge
知识库/知识点
area:learning-info
area:learning-session
area:quiz
测验/自测
area:reading-event
area:reading-progress
area:review
复习系统
area:security
安全相关
audit
Area: audit
audit:api-admin-info
audit:api-info
audit:planned
已完成宏观规划,尚未代码审查
audit:reviewed
backend
Area: backend
billing
Area: billing
blocked-by:api-info-aggregation
blocked-by:api-info-core
blocked-by:api-info-ops
blocked-by:api-info-schema
blocked-by:processor
blocked-by:schema
compatibility
Area: compatibility
gate
Area: gate
infrastructure
Area: infrastructure
priority:p0
最高优先级,阻塞发布
priority:p1
高优先级,里程碑必需
priority:p2
中优先级,后续版本
prisma
Area: prisma
release
Area: release
repo:api
API 仓库 Issue
status:blocked
被阻塞
status:done
已完成
status:partial
status:todo
type:aggregation
type:bug
缺陷修复
type:design
设计
type:docs
文档
type:feature
新功能
type:migration
type:refactor
重构
type:test
work:admin-api
work:aggregation
work:api
work:artifact
题目/卡片产物
work:audit
work:circuit-breaker
熔断
work:contract
work:design
架构/协议设计工作
work:docs
work:export
work:extend-existing
work:internal-api
Runtime 内部接口
work:job
Job 调度相关
work:new-module
work:new-table
work:ops
work:query
work:quota
额度/限流
work:schema
Prisma Schema 设计
work:security
work:service
Service 层实现
work:snapshot
Snapshot 构建
work:test
No Label
Milestone
No items
No Milestone
M-AI-04 Active Recall 端到端迁移
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: wangdl/api-server#303
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
类型 / 标签
风险等级
P0
依赖
背景
汇总 M-AI-04 所有验收项,独立审核迁移是否达到生产标准,并决定是否停止旧链路接收新 Active Recall 请求。
目标
审核范围
迁移契约
Definition
Executor
Projector
入口
真实运行
必须看到真实链路:HTTP → MySQL → Outbox → Redis/BullMQ → Worker → Engine → Projector → Active Recall Result
CI
回归
继续通过:M-AI-01 Worker Integration / M-AI-01 HTTP E2E / M-AI-02 backward compatibility / M-AI-03 单元与架构测试 / Active Recall Legacy E2E / Active Recall Unified E2E
切换策略
分阶段:
不得在没有运行证据时直接全量切换。
问题分级
最终结论
只能选择:PASS / CONDITIONAL PASS / FAIL
PASS 后进入
M-AI-05:Feynman 与复习产物迁移
完成证据
必须提供:Commit 范围、迁移契约、Definition、Snapshot 示例、Redis Payload、HTTP 请求响应、Outbox 记录、BullMQ Job、Worker 日志、Projector 事务、Artifact、幂等结果、Feature Flag 切换、回滚记录、CI Run、最终 Gate 报告
验收标准
建议执行顺序
第 8 个执行(M-AI-04 最终门禁)
GATE 审核完成
结论: CONDITIONAL PASS
审核范围
P0/P1 追踪
条件
Gate 报告
docs/architecture/m-ai-04-gate-audit.mdCommit 范围
b7cafbb..4447569(26 files, +3535/-37)BATCH-02 完成报告
结论: BATCH-02 PASS
1. 变更范围
src/worker.module.tssrc/modules/ai-job/ai-job-execution-engine.tstest/m-ai-04-active-recall.e2e-spec.ts2. 观测接入点
3. E2E Fail-Closed 修复
4. Unified Job 状态证据
P1-01 修复后,Worker 可通过 AiJobModule 解析 AI_JOB_EXECUTION_ENGINE:
WorkerModule.imports包含AiJobModuleAiJobModule提供AI_JOB_EXECUTION_ENGINEtokenAiInteractiveJobWorker的@Optional() @Inject(AI_JOB_EXECUTION_ENGINE)解析成功:43-49不再触发)5. Legacy 回归
AiAnalysisWorker未修改AiAnalysisService.analyze()未修改active-recall.service.tsLegacy 分支未修改6. 测试结果
7. 结论
BATCH-02 PASS