Skip to content

feat: define stack paths, environments, and exclusions - #328

Merged
panicboat merged 13 commits into
mainfrom
docs/stack-configuration
Oct 9, 2026
Merged

panicboat merged 13 commits into
mainfrom
docs/stack-configuration

Conversation

@panicboat

@panicboat panicboat commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Why

同じ stack のパスと環境属性を一か所で管理し、プロダクト間の共有と独立を同じ構成で表現する。サービス・環境・任意 placeholder の条件で個々の対象を除外できるようにする。

各言語の読者が設定と動作をその言語だけで理解できるよう、英語版と日本語版に同じ範囲の説明を持たせる。

ConsolePresenter は実行環境にかかわらず String#colorize に依存するため、既存の colorize 依存を常に読み込む。CI の presenter 選択と依存の読み込みを混同すると、CI 環境で console 出力を検証したときに失敗する。

Changes

  • 設定を stacks に統合し、各定義に name、id、paths、environments または attributes、exclude を配置。
  • 環境名は各 stack の定義キーから取得。共通対象、環境名を含まないパス、複数の実在ディレクトリに対応。
  • 変更検出、matrix、サービス診断で同じモデルと除外判定を使用。サービスの事前登録を削除。
  • 旧形式・互換アクセサー・必須属性宣言・サービス全体の除外メタデータ・root 由来の matrix 出力を削除。
  • CLI、テンプレート、sample を stack 定義に更新。
  • ルートと3 component の README 計8ファイルを英語・日本語で完結させ、見出し・参照先・実行例を揃える。
  • colorize を環境によらず読み込み、別 Ruby プロセスの GITHUB_ACTIONS=true 条件で console 表示を検証する回帰テストを追加。

Design

Validation

VERIFIED: action-scripts で Ruby 4.0.7 / Bundler 2.6.7 を使用。依存・lockfile・バージョン指定ファイルの変更なし。

/opt/homebrew/bin/rbenv exec bundle _2.6.7_ exec rspec
/opt/homebrew/bin/rbenv exec bundle _2.6.7_ exec ruby config-manager/bin/config-manager validate
/opt/homebrew/bin/rbenv exec bundle _2.6.7_ exec ruby config-manager/bin/config-manager show
  • RSpec: CI 条件(seed 5848)と通常環境(seed 32605)の両方で 340 examples, 0 failures。
  • console 回帰テストは修正前に NoMethodError: colorize で失敗し、依存の読み込み後に成功。親プロセスで読み込まれた gem の状態に依存しない。
  • validate: exit 0、Configuration is valid、stack・環境数のサマリー。
  • show: exit 0、全 stack のパス・属性・除外条件を表示。
  • README: 4組の構成と35サンプルの一致、英語版への日本語混入がないこと、28件の相対リンクと anchor・参照言語を確認。
  • README: YAML/JSON 18件を解析し、設定例2件を WorkflowConfig で検証。Action の使用例14件で必須入力、CLI 26箇所で実装済みコマンドと shell 構文を確認。
  • README 確認コマンド: python3 /tmp/check_readme_locales.py、/opt/homebrew/bin/rbenv exec ruby /tmp/check_readme_examples.rb はともに exit 0、全項目 PASS。
  • 旧語彙検索は旧入力・旧出力を拒否するアサーションのみ。diff の空白と追加コメントを確認。

CI Environment Verification

GITHUB_ACTIONS=true /opt/homebrew/bin/rbenv exec bundle _2.6.7_ exec rspec --seed 5848 --format progress
env -u GITHUB_ACTIONS /opt/homebrew/bin/rbenv exec bundle _2.6.7_ exec rspec --format progress

両コマンドは exit 0。

Review

別 context の reviewer に全体をレビュー依頼し、重要な2件を実 filesystem の RED→GREEN テストで修正した。読み取り権限エラー時は部分 matrix を成功として返さず、許可されたドット始まりの環境・任意 placeholder を列挙する。service のドット始まりは探索時に対象外にする。保留した minor 指摘はない。

Rulings

  • 既存の ignored .claude/worktrees/stack-configuration を使用し、tracked .gitignore の追加変更を避けた。誤った checkout の編集を避けるため workdir を固定。
  • 各タスクは対象テストで完了判定し、依存側の置き換え後に全体を検証。途中の退行を見落とさないよう各段階でも全体の失敗を監査。
  • Dir.children と File.stat によるパス要素ごとの列挙を採用。実権限エラーの伝播とドット要素の一致を保証し、prefix と既知値で探索を制限。大きなディレクトリでは列挙コストが増える。
  • ラベルの既存文法と all の予約を維持。文法外のサービス名には別途ラベル契約の変更が必要。
  • config-manager validate の不正設定時の終了コードを維持。このコマンドだけで CI を停止したい場合の終了コード変更は対象外。
  • 無効な SOURCE_REPO_PATH から enclosing checkout を探索する既存方針を維持。誤設定時に別 checkout を探索する可能性が残る。
  • YAML 重複キーの拒否と既存 Git diff の引用・エラー処理は対象外。既存の解析・Git 処理の問題はこのレビューでは解消されない。

Signed-off-by: panicboat <panicboat@gmail.com>
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6983f506-3fb1-4a01-884f-8eefe88d18b5
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Service registration would preserve a second source for target membership after stack configuration is consolidated.

Signed-off-by: panicboat <panicboat@gmail.com>
Rule keys derived from stack paths allow teams and products to define exclusion boundaries without extending the schema.

Signed-off-by: panicboat <panicboat@gmail.com>
All consumers depend on the same schema and exclusion matcher, so the replacement needs an ordered implementation plan without compatibility adapters.

Signed-off-by: panicboat <panicboat@gmail.com>
Signed-off-by: panicboat <panicboat@gmail.com>
Signed-off-by: panicboat <panicboat@gmail.com>
Signed-off-by: panicboat <panicboat@gmail.com>
Signed-off-by: panicboat <panicboat@gmail.com>
Signed-off-by: panicboat <panicboat@gmail.com>
Signed-off-by: panicboat <panicboat@gmail.com>
@panicboat panicboat changed the title docs: define stack configuration model feat: define stack paths, environments, and exclusions Oct 9, 2026
Signed-off-by: panicboat <panicboat@gmail.com>
Readers need the configuration and component behavior in their chosen language. Keep explanations, headings, and references within each locale while sharing executable examples.

Signed-off-by: panicboat <panicboat@gmail.com>
ConsolePresenter requires String#colorize even when instantiated under GITHUB_ACTIONS. Load the existing dependency regardless of presenter selection and cover rendering in a fresh CI process so local preload state cannot hide missing dependencies.

Signed-off-by: panicboat <panicboat@gmail.com>
@panicboat
panicboat marked this pull request as ready for review October 9, 2026 02:47
@panicboat
panicboat merged commit 32a515a into main Oct 9, 2026
7 checks passed
@panicboat
panicboat deleted the docs/stack-configuration branch October 9, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant