受控交付流水线与发布证据
Agent 辅助工程检查
前置要求
第 80 天通过的评审包;Ticket 24 的 CI 练习运行器。
学习目标
为通过评审的变更运行干净安装与受控部署流水线阶段,捕获机器可验证的发布证据,而非命令截图。
操作指引
1. 打包并验证:python3 scripts/ci_practice_runner.py --stage clean_install --json ——运行器把 projects/text_tools 复制进纯净沙箱、生成输入数据并端到端执行 CLI。
2. 检查证据负载:clean_install 阶段 success=true、returncode==0、输出合法 JSON 统计(total_chars、total_tokens、vocab_size)。
3. 理解交付模型:符号链接切换背后是按版本存放的 release 目录(蓝绿式),回滚只是指针变更而非重新构建。
4. 标注授权边界:该流水线只在本地证明产物;推送到共享远端、真实部署与任何付费基础设施仍需明确单独授权。
自主演练与记录
把阶段输出存入 release_evidence.json 并加注:产物路径、退出码、所用健康检查命令,以及符号链接式版本发布为何让回滚变得廉价。
证据是程序输出的 JSON 与退出码——不是“终端里看着是绿的”。
python3 scripts/ci_practice_runner.py --stage clean_install --json > release_evidence.json
# clean_install 阶段: success=true,打包产物以 returncode 0 执行
# releases/1.0.0 与 releases/1.1.0 位于 'current' 符号链接之后: 回滚 = 重指符号链接 + 健康检查
为已批准的变更产出可重复、机器可验证的发布记录。
权威源资源与权利证明
GitHub Actions Documentation
对应章节 / 时间戳: N/A
验证版本与日期: GitHub Docs continuous publication (Verified: 2026-10-30)
Primary reference for pipeline stages, required status checks, and branch protection mechanics that the local CI practice runner mirrors in a disposable environment.
YAML familiarity, shell commands, and Git hosting vocabulary.
Pipeline stage semantics (lint, test, package, deploy gate) are exercised offline by scripts/ci_practice_runner.py; no GitHub account or push authorization is required for the practice.
对比候选资源与选型分析 (2)
Equivalent pipeline concepts under a different provider; GitHub Actions matches the hosted-workflow conventions used in this project's delivery story.
Self-hosted CI server documentation; GitHub Actions better matches the hosted pipeline model the learner will meet first.
Site Reliability Engineering, Chapter 8: Release Engineering
对应章节 / 时间戳: Continuous Build and Deployment (Building, Branching, Testing, Packaging, Deployment)
验证版本与日期: O'Reilly 2016 free web edition (Verified: 2026-10-30)
Widely used industry reference for hermetic builds, release approval gates, and rollback-ready deployment doctrine that anchor Day 81's controlled delivery and verified rollback exercises.
Build and deployment vocabulary; version control basics.
The controlled delivery and rollback runbook is fully executable offline via the scripts/ci_practice_runner.py deploy stage, which emits recorded evidence payloads.
对比候选资源与选型分析 (2)
Focused single-pattern bliki on blue/green cutover; the SRE chapter covers the wider release-engineering lifecycle including build hermeticity and rollback policy.
Foundational paid text on deployment pipelines; the SRE web edition provides equivalent operational doctrine at zero cost with a stable public URL.