81 / 90

第81日: 管理されたデリバリー、マージ回復と検証済みロールバック

レビュー済みの変更を CI パイプラインで出荷し、使い捨てリポジトリでマージ競合を解消し、失敗したデプロイを検出して、観測可能な証拠でロールバックする。

Self-Directed Learning & Python 480 分(8時間)
01 120 分

管理されたデリバリーパイプラインとリリース証跡

Agent支援エンジニアリングチェック

前提条件

第80日の承認済みレビューパケット。Ticket 24 の CI 練習ランナー。

学習目標

承認済み変更のクリーンインストールと管理デプロイのパイプラインステージを実行し、コマンドのスクリーンショットではなく機械検証可能なリリース証跡を取得する。

手順

1. パッケージ化と検証:python3 scripts/ci_practice_runner.py --stage clean_install --json — ランナーは projects/text_tools を pristine サンドボックスへ複製し、入力データを生成し、CLI を端から端まで実行します。
2. 証跡ペイロードを検査します:clean_install ステージ success=true、returncode==0、有効な JSON 統計出力(total_chars, total_tokens, vocab_size)。
3. デリバリーモデルを理解します:symlink 切替えの背後にバージョン付きリリースディレクトリ(ブルー/グリーン型)があり、ロールバックは再ビルドではなくポインタ変更です。
4. 承認境界を注記します:このパイプラインは成果物をローカルで証明するもので、共有リモートへの push・本番デプロイ・有償インフラは依然として明示的な個別承認が必要です。

演習と予測記録

ステージ出力を release_evidence.json に保存し注釈してください:成果物パス・終了コード・使用したヘルスチェックコマンド・symlink 型バージョンリリースがロールバックを安くする理由。

独立習得基準

承認済み変更に対し反復可能な機械検証リリース記録を生成できる。

公式ソースリソースと権利証跡

linking CC BY 4.0

GitHub Actions Documentation

著者・提供機関: GitHub, Inc. | オリジナル出所URL ↗

該当セクション・タイムスタンプ: 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)
GitLab CI/CD Documentation ↗ compared_alternative [CC BY-SA 4.0]

Equivalent pipeline concepts under a different provider; GitHub Actions matches the hosted-workflow conventions used in this project's delivery story.

Jenkins User Documentation ↗ compared_alternative [CC BY-SA 4.0]

Self-hosted CI server documentation; GitHub Actions better matches the hosted pipeline model the learner will meet first.

linking CC BY-NC-ND 4.0 noncommercial no-derivatives

Site Reliability Engineering, Chapter 8: Release Engineering

著者・提供機関: Dinah McNutt (ed. Betsy Beyer, Tim Harvey), in Site Reliability Engineering (eds. Betsy Beyer, Chris Jones, Jennifer Petoff, Niall Richard Murphy; Google) | オリジナル出所URL ↗

該当セクション・タイムスタンプ: 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)
Martin Fowler: BlueGreenDeployment ↗ compared_alternative [Copyright Martin Fowler; free public web article]

Focused single-pattern bliki on blue/green cutover; the SRE chapter covers the wider release-engineering lifecycle including build hermeticity and rollback policy.

Continuous Delivery (Humble & Farley) ↗ compared_alternative [All Rights Reserved (paid)]

Foundational paid text on deployment pipelines; the SRE web edition provides equivalent operational doctrine at zero cost with a stable public URL.

02 120 分

使い捨てリポジトリでのマージ競合解消と安全な回復

独立習得チェック(AI 支援なし)

前提条件

第81日 アクティビティ1。

学習目標

使い捨てリポジトリ内で実際のマージ競合を自力で解消し、無関係な協作者の変更を保全し、マージが失敗したときの非破壊的回復を練習する。

手順

1. 競合ステージを実行します:python3 scripts/ci_practice_runner.py --stage conflict --json。ネットワークや push を伴わない(シミュレーションと明示)使い捨てのベア upstream リポジトリと、実際に分岐したブランチを構築します。
2. 競合マーカーが現れたら両側を読みます:HEAD 対 incoming。機能変更と無関係な協作者の編集の両方を残します — どちらかを闇雲に消さないでください。
3. 文章としてではなく意味で検証します:マージ完了前に解決済みツリー内でプロジェクトテストを実行します。
4. 脱出経路を練習します:git merge --abort はマージ前状態へ戻ります。git stash やバックアップブランチは未コミット作業を守ります。再現不能な作業に対して reset --hard や clean -fdx を実行してはいけません。
5. ランナーが conflict_resolved=true と unrelated_changes_preserved=true を報告することを確認します。

演習と予測記録

recovery_log.md を作成してください:競合ファイル・対立する2ハンク・解決の根拠・マージ後テスト出力・検証した abort 経路。

独立習得基準

実際のマージ競合を独立して解消し、合格するテスト実行で検証し、練習済みの非破壊的回復経路を示せる。

公式ソースリソースと権利証跡

linking CC BY-NC-SA 3.0 noncommercial share-alike

Pro Git, Second Edition

著者・提供機関: Scott Chacon and Ben Straub | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Chapter 3 (Git Branching), Section 7.7 (Reset Demystified), Sections 5.2/6.2 (Contributing to a Project)

検証バージョンと日付: Second edition (Apress, 2014) (Verified: 2026-10-30)

選定理由:

Freely licensed reference for branching, merging, conflict resolution, and safe recovery vocabulary used through the delivery workflow.

ソース前提知識:

Basic git status/log/diff vocabulary from earlier study days

安全フォールバック(オフライン回復性):

git help <command> and the Git manual pages ship with Git and cover the same commands offline; every required workflow is stated locally in the lesson.

比較対象候補リソースと選定評価 (2)
GitHub Skills interactive courses ↗ compared_alternative [MIT (varies by course)]

Interactive but requires a GitHub account and an external service; disposable local repositories keep the exercise self-contained.

Atlassian Git Tutorials ↗ compared_alternative [All Rights Reserved]

Vendor-owned prose with no permissive license; Pro Git covers the same ground under CC BY-NC-SA.

linking CC BY-NC-ND 4.0 noncommercial no-derivatives

Site Reliability Engineering, Chapter 8: Release Engineering

著者・提供機関: Dinah McNutt (ed. Betsy Beyer, Tim Harvey), in Site Reliability Engineering (eds. Betsy Beyer, Chris Jones, Jennifer Petoff, Niall Richard Murphy; Google) | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Continuous Build and Deployment: Branching

検証バージョンと日付: 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)
Martin Fowler: BlueGreenDeployment ↗ compared_alternative [Copyright Martin Fowler; free public web article]

Focused single-pattern bliki on blue/green cutover; the SRE chapter covers the wider release-engineering lifecycle including build hermeticity and rollback policy.

Continuous Delivery (Humble & Farley) ↗ compared_alternative [All Rights Reserved (paid)]

Foundational paid text on deployment pipelines; the SRE web edition provides equivalent operational doctrine at zero cost with a stable public URL.

03 120 分

ヘルス障害の検出と検証済みロールバック手順

Agent支援エンジニアリングチェック

前提条件

第81日 アクティビティ2。

学習目標

レビュー済みリリースを使い捨てステージングへデプロイし、観測可能なヘルスチェックで失敗デプロイを検出し、既知の良好バージョンを検証可能に復旧する文書化済みロールバックを実行する。

手順

1. デプロイステージを実行します:python3 scripts/ci_practice_runner.py --stage deploy --json。リリース 1.0.0(HEALTHY)の後、模擬スキーマ障害を持つ 1.1.0 をデプロイします。
2. ヘルスの継ぎ目で失敗を検出します:v1.1.0 の CLI が 'FATAL ERROR: Incompatible database schema version 2' で終了コード2 — v2_health=UNHEALTHY。検出は非ゼロ終了と無効出力であり、人の印象ではありません。
3. ロールバック手順を実行します:'current' symlink を releases/1.0.0 へ張り替え、ヘルスコマンドを再実行し、restored_version=1.0.0 と restored_health=HEALTHY を確認します。
4. release_evidence.json を読みます:history 配列は deploy 1.0.0 HEALTHY → deploy 1.1.0 UNHEALTHY → rollback_restored 1.0.0 HEALTHY を示す必要があります。

演習と予測記録

rollback_log.md を作成してください:失敗したヘルスチェック出力の逐語・各ロールバック手順・ロールバック後のヘルス出力・release_evidence.json の全 history 配列。

独立習得基準

観測可能な復旧後ヘルス証拠で成功が証明されるロールバックを実行できる — 仮定の回復ではなく検証済み復旧。

公式ソースリソースと権利証跡

linking CC BY-NC-ND 4.0 noncommercial no-derivatives

Site Reliability Engineering, Chapter 8: Release Engineering

著者・提供機関: Dinah McNutt (ed. Betsy Beyer, Tim Harvey), in Site Reliability Engineering (eds. Betsy Beyer, Chris Jones, Jennifer Petoff, Niall Richard Murphy; Google) | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Continuous Build and Deployment: 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)
Martin Fowler: BlueGreenDeployment ↗ compared_alternative [Copyright Martin Fowler; free public web article]

Focused single-pattern bliki on blue/green cutover; the SRE chapter covers the wider release-engineering lifecycle including build hermeticity and rollback policy.

Continuous Delivery (Humble & Farley) ↗ compared_alternative [All Rights Reserved (paid)]

Foundational paid text on deployment pipelines; the SRE web edition provides equivalent operational doctrine at zero cost with a stable public URL.

linking All Rights Reserved (martinfowler.com) Article is linked, not copied; pipeline practice uses the repository's own runner

Continuous Integration

著者・提供機関: Martin Fowler | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Practices of Continuous Integration: Make the Build Self-Testing; Fix Broken Builds Immediately

検証バージョンと日付: Second edition web article (May 2006) (Verified: 2026-10-30)

選定理由:

Standard practitioner reference defining the CI contract this block rehearses: every change merges to a mainline verified by an automated build and test run, and failures are fixed before further work proceeds.

ソース前提知識:

Version control basics, automated test suites, and build vocabulary.

安全フォールバック(オフライン回復性):

The CI gate contract (lint, test, package, verdict) is executed locally by scripts/ci_practice_runner.py with no external dependency.

比較対象候補リソースと選定評価 (2)
GitHub Actions Documentation ↗ compared_alternative [CC BY 4.0]

Provider-specific workflow syntax; Fowler's article states the vendor-neutral CI discipline the learner must internalize first, while the docs are kept as the pipeline-mechanics source.

Atlassian Continuous Integration Guide ↗ compared_alternative [All Rights Reserved]

Vendor-oriented tutorial; Fowler's original definition keeps the explanation tool-agnostic and historically important.

04 120 分

評価: デリバリーレポート、結果説明と制限事項

独立習得チェック(AI 支援なし)

前提条件

第81日 アクティビティ1〜3。

学習目標

要件→レビュー→CI→デプロイ→ロールバックを1つの監査可能な叙述に結び付ける完全な工学デリバリーレポートを、明示的な制限と承認境界の記述とともに作成する。

手順

1. パケットを集約します:requirement.md・verdict.md・review_notes.md・review_packet.md・release_evidence.json・recovery_log.md・rollback_log.md。
2. 結果説明を書きます:各受入基準について証明する成果物とコマンドを引用し、遭遇した各失敗について観測出力と検証済み回復を引用します。
3. 証拠分類を誠実に分離します:独立習得(あなたのテスト・判定・競合解消)対エージェント支援成果(生成 diff・ハンク要約)。
4. 制限を記述します:deterministic-v1 アダプタはフィクスチャであり実モデル能力の証拠ではない、デプロイ対象は使い捨て、共有リモートには触れていない。
5. 承認境界を再記述します:共有リモートへの push・本番デプロイ・有償実行・破壊的操作は実施しておらず、個別の承認が必要です。

演習と予測記録

delivery_report.md を作成してください。章立て:Requirement & Acceptance・Verification Table・CI & Delivery Evidence・Rollback Evidence・Independent vs Agent-Assisted Evidence・Limitations & Authorization Boundary。

独立習得基準

すべての主張が再実行可能で、独立技能とエージェント支援成果を誠実に分離した監査可能なエンジニアリングレポートを提出できる。

公式ソースリソースと権利証跡

linking CC BY-NC-ND 4.0 noncommercial no-derivatives

Site Reliability Engineering, Chapter 8: Release Engineering

著者・提供機関: Dinah McNutt (ed. Betsy Beyer, Tim Harvey), in Site Reliability Engineering (eds. Betsy Beyer, Chris Jones, Jennifer Petoff, Niall Richard Murphy; Google) | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Philosophy: Hermetic Builds; Enforcement of Policies and Procedures

検証バージョンと日付: 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)
Martin Fowler: BlueGreenDeployment ↗ compared_alternative [Copyright Martin Fowler; free public web article]

Focused single-pattern bliki on blue/green cutover; the SRE chapter covers the wider release-engineering lifecycle including build hermeticity and rollback policy.

Continuous Delivery (Humble & Farley) ↗ compared_alternative [All Rights Reserved (paid)]

Foundational paid text on deployment pipelines; the SRE web edition provides equivalent operational doctrine at zero cost with a stable public URL.

linking CC BY 4.0

GitHub Actions Documentation

著者・提供機関: GitHub, Inc. | オリジナル出所URL ↗

該当セクション・タイムスタンプ: 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)
GitLab CI/CD Documentation ↗ compared_alternative [CC BY-SA 4.0]

Equivalent pipeline concepts under a different provider; GitHub Actions matches the hosted-workflow conventions used in this project's delivery story.

Jenkins User Documentation ↗ compared_alternative [CC BY-SA 4.0]

Self-hosted CI server documentation; GitHub Actions better matches the hosted pipeline model the learner will meet first.