新增迁移静态契约测试与显式 MySQL 集成测试。后者仅在 CHORUS_RUN_MIGRATION_TESTS=1 时运行,并只使用本机 chorus_test 隔离库。
隔离 MySQL 8:up -> legacy MVP-0 fixture -> up -> down 3 -> up 通过,验证凭据回填/恢复、MVP-0 generation 保留、能力、admin 种子和 schema。另一次空库 up -> down -all -> up 通过,最终版本为 4;无终端用户、1 个 Chorus 角色、18 个 Chorus API 种子。
通过:go build ./...、go vet ./...、go test -count=1 ./...、go test -race -count=1 ./migrations、python dev_scripts/harness.py check --strict、python -m unittest discover -s tests -v(42 项)。
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.
基本信息
原始需求
文档影响
交付文档影响
变更控制
依赖与并行
目标与范围
实现 00002_admin_baseline、00003_mvp1_routing、00004_mvp1_admin_seed 的 up/down,覆盖锁定 go-admin 的最小 sys_* 基线、Provider 凭据版本、能力、路由池、熔断 runtime、连通性检查、审计以及 generation/generation_inputs/prompt_templates 增量字段。
不实现路由算法、上游调用、管理 API 或页面逻辑。
已确认方案
严格按 #16 固定顺序 000002→000003→000004 和反向 down;生产禁止 AutoMigrate。00003 先建新表并回填校验,再添加外键/检查约束并清空旧密钥列;down 从活动 credential 恢复旧列。00004.down 只按稳定唯一键删除本项目种子;00002.down 只在无管理员业务数据时允许。
验收标准
验证
实施结果与证据(2026-08-21)
000002_admin_baseline、000003_mvp1_routing、000004_mvp1_admin_seed三对可逆 SQL。生产结构仍只由migrations/演进,未引入 AutoMigrate。000002固化固定 go-admin 提交f06540883b41d03782bb6b2c4150f298f328c6b6所需的身份、权限和 CRUD 元数据基线;不创建管理员账号或任何已知密码。000004仅以角色键、菜单路径和 API handle 写入/删除 Chorus 种子。000003完成 AES-GCM 凭据信封回填与可逆恢复、active credential、模型能力、路由/熔断 runtime、连通性检查、审计、generation 路由快照和图片 note 的数据演进。CHORUS_RUN_MIGRATION_TESTS=1时运行,并只使用本机chorus_test隔离库。up -> legacy MVP-0 fixture -> up -> down 3 -> up通过,验证凭据回填/恢复、MVP-0 generation 保留、能力、admin 种子和 schema。另一次空库up -> down -all -> up通过,最终版本为 4;无终端用户、1 个 Chorus 角色、18 个 Chorus API 种子。go build ./...、go vet ./...、go test -count=1 ./...、go test -race -count=1 ./migrations、python dev_scripts/harness.py check --strict、python -m unittest discover -s tests -v(42 项)。6035ac4d9a4da2f52f5dc05f4e7a9e3791f39b95,已推送至main。ff507c8a540f239f76d8daf33bd0d8321352b7e2;harness.py sync --check通过,未导出docs/task/。验收结论(2026-08-21)
用户明确确认 #20 验收通过。
MySQL 8 迁移、回退、静态契约与全仓验证结果维持有效;未增加任何真实 Provider 调用或敏感数据。
验收镜像提交:0dc73eed76b2bd467e98f598d4d629f423bcc6d,已推送至 main。
ila referenced this issue2026-08-21 16:08:04 +08:00
ila referenced this issue2026-08-21 16:08:06 +08:00