Skip to content

feat!: discover stack environments and expand attributes - #334

Merged
panicboat merged 1 commit into
mainfrom
feat/stack-placeholders
Oct 9, 2026
Merged

panicboat merged 1 commit into
mainfrom
feat/stack-placeholders

Conversation

@panicboat

@panicboat panicboat commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Why

環境属性が不要な stack でも、ディレクトリにある環境ごとに対象を生成できるようにするためです。環境共通の対象は attributes の指定で識別し、省略の意味を一意にします。repository や IAM role の属性値をパスの抽出値で組み立て、サービス・チーム・環境名の重複記載を減らします。

Behavior

  • environments を指定した stack は定義環境とその属性を使います。
  • attributes を指定した stack は環境共通で、ディレクトリごとに一度だけ environment: null を生成します。属性が不要な場合も attributes: {} が必要です。
  • 両方を省略した stack は各パスの {environment} から環境名を取得します。すべてのパスに {environment} が必要で、追加属性は空です。
  • 環境選択・matrix・環境一覧・サービス診断は定義環境と探索した環境の和集合を使います。変更検出は削除済みパスからも環境を取得します。
  • 共通属性・環境属性の文字列値を再帰的に展開します。参照できる値はサービス名、環境別の対象の環境名、および当該パスの任意 placeholder です。解決できない参照は設定エラーです。
  • README の英語版・日本語版、設計文書、設定例を現在の動作に揃えます。

Verification

VERIFIED:

  • bundle exec rspec --format progress: 370 examples, 0 failures
  • GITHUB_ACTIONS=true GITHUB_TOKEN=test_token GITHUB_REPOSITORY=test/repo bundle exec rspec --format progress: 370 examples, 0 failures
  • bundle exec ruby config-manager/bin/config-manager validate: Configuration is valid; stacks: 3 configured; environments: 3 configured
  • git diff --check: exit 0
  • gh pr checks 334: RSpec、設定検証、PR タイトル、SHA 固定、DCO はすべて pass。GitHub 上の RSpec も 370 examples, 0 failures。

Placeholder Coverage

REASONED(実装の読解による未対応箇所の確認):

  • exclude の条件値はリテラルの完全一致です。抽出値を含む条件文字列の展開は未対応です。
  • 属性値から別の属性を参照する形式は未対応です。
  • 属性値から stack、stack_id、working_directory を参照する形式は未対応です。

Resolve attribute-free environment targets from repository paths and derive attribute values from the same captures used for target identity.

BREAKING CHANGE: stacks without attributes or environments require {environment} in every path. Environment-shared stacks must explicitly specify attributes, including an empty map.

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

coderabbitai Bot commented Oct 9, 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: 7ce90bd0-b7bb-453b-83fb-50cc7b76499f

  • Autofix · 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.

@panicboat
panicboat marked this pull request as ready for review October 9, 2026 17:01
@panicboat
panicboat merged commit 9c87a02 into main Oct 9, 2026
7 checks passed
@panicboat
panicboat deleted the feat/stack-placeholders branch October 9, 2026 17:01
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