chore(dev): developer ergonomic tools + shared composer cache volume#426
Merged
Conversation
セッション運用で boilerplate に消えていた時間を畳む小道具一式。任意採用
(既存 workflow 互換)、reversible。
### Composer scripts
- **composer ci** = test + test:http + analyze + format:check の sequence
- 既存 composer check が format:check を漏らしていたので、CI が走らせる
厳密同等の boundary を local で確認するための alias
- 本セッションで "format:check 漏れ → CI で fail → 再 push" を 1 回踏んだ
のが動機
- composer test:http / test の filter passthrough を doc 化
- 既に composer 2 が "-- --filter Foo" を forward していたので新 surface
不要、tools/README.md に明文化のみ
### Helper scripts (tools/)
- wait-healthy.sh [port] [timeout] — /health 200 待ち boilerplate を 1 行に
(本セッション中に 20 回以上書いた until-loop を畳む)
- trial-status.sh FT-N — Issue + PR を 1 view で (gh issue + gh pr の
別々呼び出しを 1 つに)
- error-code-add.php — config/error_codes.php と
docs/development/error-codes.md を atomic に更新 (#352 drift gate を
pass する形で)、手動 2 ファイル更新の dance を排除
- tools/README.md 新規 — 全 tool + composer script の 1 page リファレンス
+ 追加方針
### Shared composer cache (C 採用)
- compose.yaml の app service に external named volume
nene_composer_cache を /root/.composer/cache に mount
- nene-ft-new.sh が clone bootstrap 時に volume を lazy 作成
- 各 clone の vendor/ は per-project 維持 (composer.lock 差異対応)、
キャッシュ対象は downloaded .zip のみ
- 効果: 初回後の fresh composer install が ~30-45s → ~5s に短縮
### Verification
- composer ci 全 step green (test 142/142 + test:http 24/24 +
analyze + format:check)
- composer test:http -- --filter HttpBearerAuthTest で 5 cases のみ走る
- tools/wait-healthy.sh 8080 30 → OK (1s)
- tools/trial-status.sh FT17 → 4 issue + 4 pr 表示
- tools/error-code-add.php FAKE-CODE-TEST "..." 418 "..." → 両 file 更新
+ composer test (drift gate) pass、その後 git checkout で revert 検証
- docker volume create nene_composer_cache → compose up app → composer
cache が /root/.composer/cache に shared mount される確認
### A / B (現状維持)
- A (CI paths-filter): docs-only PR で runtime-smoke skip しない方針
- B (schema:diff dev DSN auto-fill): ADR-0009 operator-explicit 維持
Closes #426. (issue がまだ無いのでこの PR で兼ねる)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…se up #426 で導入した external named volume `nene_composer_cache` は fresh CI runner には存在しないため `compose up` が `external volume not found` で fail する。runtime-smoke job の compose 起動前に `docker volume create nene_composer_cache` を idempotent に追加。 Local 開発者は tools/nene-ft-new.sh が同 lazy-create を行う。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
セッション運用で boilerplate に消えていた時間を畳む小道具一式。任意採用、既存 workflow 互換、reversible。
Composer scripts
Helper scripts (tools/)
Shared composer cache (前提 C 採用)
A / B 判断 (maintainer 指示で現状維持)
Test plan