Skip to content

feat: allow_call_patterns 全レイヤー開放 + multi-file main fixture#78

Merged
makinzm merged 3 commits intomainfrom
feat/pr78-allow-call-patterns-all-layers-and-multifile-main
Mar 25, 2026
Merged

feat: allow_call_patterns 全レイヤー開放 + multi-file main fixture#78
makinzm merged 3 commits intomainfrom
feat/pr78-allow-call-patterns-all-layers-and-multifile-main

Conversation

@makinzm
Copy link
Copy Markdown
Owner

@makinzm makinzm commented Mar 25, 2026

Summary

  • allow_call_patterns の main レイヤー限定制約を撤廃し、全レイヤーで定義可能に
  • tests/fixtures/rust_multifile_main/ を新設 — src/main.rs(薄いラッパー)+ src/runner.rs(実質エントリ)を同一 main レイヤーに含むパターン
  • 正常系・失敗系(dependency violation / call pattern violation)の CLI レベル E2E テスト 8 件追加
  • CI dogfooding に rust_multifile_main fixture を追加

背景

  1. allow_call_patterns: spec/docs では「main レイヤーのみ」と記載されていたが、コード上は制約なし(既に usecase 等でも動作)。ドキュメントを実態に合わせた
  2. multi-file main: 現実のプロジェクトでは main.rs が 1 行の薄いラッパーで、隣の runner.rsapp.rs に実質的なロジックがあるパターンが多い。既存 fixture は全て main/** ディレクトリ or 単一ファイルのみだった

Test plan

  • cargo test --test e2e_multifile_main — 8 テスト全通過
  • cargo test — 全テスト通過(既存テストへの影響なし)
  • CI dogfooding (rust_multifile_main fixture) が GitHub Actions で通過すること

🤖 Generated with Claude Code

makinzm and others added 3 commits March 25, 2026 08:39
…because of 現実のプロジェクトパターン不足

- rust_multifile_main fixture: src/main.rs + src/runner.rs を main レイヤーに含む
- 正常系: 両ファイルが main レイヤーとして認識される
- 失敗系: runner.rs の dependency violation 検出
- 失敗系: runner.rs への allow_call_patterns 適用
- 失敗系: usecase レイヤーでの allow_call_patterns 違反検出

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…se of main限定の制約が不要

- spec.md: main限定の記述を削除、全レイヤーで定義可能と明記
- website docs (ja/en): Aside caution を削除、全レイヤー対応の説明に変更
- AGENTS.md: 同上
- README.md: allow_call_patterns の説明を更新
- docs/TODO.md: 実装状況サマリー更新
- ci.yml: rust_multifile_main fixture の dogfooding ステップ追加

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@makinzm makinzm merged commit d1ba099 into main Mar 25, 2026
8 checks passed
@makinzm makinzm deleted the feat/pr78-allow-call-patterns-all-layers-and-multifile-main branch March 25, 2026 00:07
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