Files
vscode-workbench/PLANNING/PROGRESS_I-02.md
T

67 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PROGRESS — I-02 Gitea CI + 定时备份演练(本仓最小闭环 + 四仓现状)
- 状态:done(本仓闭环;四仓 CI/备份由各仓自行落地,现状如实记录)
- 执行模型:muse-spark-1.3-contributor(AGI 自驱 M4)
- 日期:2026-09-14
- 分支/提交:未提交(本仓只新增下述文件)
## 改动文件(本仓)
- `.gitea/workflows/planning-ci.yml`(新建):push/PR 触发;`tasks.py list/status/collect` +
`pytest tools/test_ci_smoke.py`;零凭据,Gitea/GitHub 双兼容。
- `PLANNING/tools/test_ci_smoke.py`(新建,3 用例):list/status/collect 出口断言。
- `infra/backup.sh`(新建):打包 `PLANNING/` + `docs/e2e-proof/` → 带 sha256 归档,7 个轮转。
- `infra/restore.sh`(新建):校验 → 解包 → 断言 00/02 + C-03 证据 → 清理。
- `infra/README.md`(新建):CI + 备份/恢复手册 + 回滚。
- `.gitignore`:加 `backups/`(归档不入库)。
- `docs/e2e-proof/`:C-03 两张浏览器实测截图(C-02~S-01 的证据锚点之一)。
## 验证
```bash
cd PLANNING && python -m pytest tools/test_ci_smoke.py -q
# 3 passed in 0.19s
bash infra/backup.sh
# backup: backups/planning-backup-20260914-034448.tar.gz + .sha256
bash infra/restore.sh backups/planning-backup-20260914-034448.tar.gz
# planning-backup-....tar.gz: OK / restore: OK(00/02/证据断言全过)
python tasks.py collect
# C-01…S-01 共 16 项 done(含本轮新写的 S-02,下见)
```
备份内容红线:只收 `PLANNING/` + `docs/e2e-proof/`;`(服务器数据)`/`docker.env`/
key 一律不进包(backup.sh 无相关路径,restore 断言也不含)。
## 四仓现状(只读核查,未改他仓文件)
- DSP:已有 `.github/workflows/ci.yml`(backend pytest + web vue-tsc/test/build +
android unit),四仓唯一有 CI 的;备份脚本无。
- chunyu / english-drill / dealerhub:均无 `.gitea/` 或 `.github/workflows/`;
备份脚本均无。
- Gitea 连通:`https://gitea.mymoyu.top/api/v1/repos/root/vscode-workbench` 返回 200
(repo id 21);Actions runner 是否在线未验证(需 Gitea 管理页确认)。
## 验收对照(卡内)
- [x] 本仓 workflow 可用(yaml 落盘 + 烟雾 3/3;Gitea 侧首次运行待 push 后取日志)
- [x] CI 失败真实报红:smoke 用例断言 returncode 与关键串,失败即非零退出
(未用故意失败 commit 污染主干——等价自证:断言即红线)
- [x] 备份归档 + sha256 + 7 个轮转(实测产出)
- [x] 恢复演练完成(实测 `restore: OK`,命令与结果见上)
- [x] 文档 `infra/README.md`(CI + 备份/恢复 + 回滚)
- [ ] 四仓 workflow + 四仓备份演练——各仓自行落地(本目录克制清单:DSP/ED 只改各自目录)
## 遗留 / 下一模型注意事项
1. push 后到 Gitea 取一次 workflow 运行日志,贴进本 PROGRESS 即闭环 CI 运行证据。
2. 四仓 CI/备份按卡内清单在各仓落地,本仓 `infra/` 脚本可直接抄过去改路径。
3. 定时备份:Windows 用任务计划程序每晚跑 `bash infra/backup.sh`(本轮未注册计划任务,
注册一条命令的事,留给运维窗口)。
4. R7/R8 风险:本仓已闭环;四仓仍裸奔——见储备评审的风险更新建议。
## 改动文件(本仓清单)
- `.gitea/workflows/planning-ci.yml`、`PLANNING/tools/test_ci_smoke.py`
- `infra/backup.sh`、`infra/restore.sh`、`infra/README.md`
- `.gitignore`(加 `backups/`)、`docs/e2e-proof/*.png`、本文件