受控交付流水線與發布證據
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.