docs(issue139): PLAN49 devbase build <image> の要求仕様と設計 - #143
Merged
Merged
Conversation
devbase build <image> が位置引数を docker へそのまま渡して失敗する不具合 (#139) について、受け入れ条件と設計を確定させる。実装は含めない。 - 依頼文が「確認が要る」としていた 2 点を調査で確定 - containers/ 配下 10 件すべてが devbase-<name> 規約に従う。例外なし - Python 側の単体ビルドは devbase project build <image> から到達可能で、 到達不能なのはトップレベル devbase build からの経路だけ - 単体ビルドの実装は Python へ寄せ、shell は振り分けだけを行うと決定。 逆向きにすると bin/devbase の name 解決を通ってしまい、 devbase project build bi-tools が projects/bi-tools の compose ビルドへ 化けるため - 単体ビルドのタグを devbase-<image>:latest に統一し、shell の build_base_image と同じ docker buildx build --load へ揃える 作業ツリー運用の宣言ファイル (.ndf/worktree.json) と .worktrees/ の .gitignore 登録も併せて追加する。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V9tinzTAbF1LVEYvfUgzKx
takemi-ohama
commented
Sep 2, 2026
takemi-ohama
left a comment
Contributor
Author
There was a problem hiding this comment.
🤖 cross-review | round 1 | codex | APPROVE
修正が必要な指摘はありません。
takemi-ohama
commented
Sep 2, 2026
takemi-ohama
left a comment
Contributor
Author
There was a problem hiding this comment.
🤖 cross-review | round 1 | gemini | APPROVE
PLAN49 の要求仕様と設計を確認しました。現状のコードベースの実態(maybe_cd_project による name 解決の優先ルールや、Python 側の cmd_build が抱えるタグ規約・ビルダの不一致)と完全に整合しており、提案されている解決策や受け入れ条件は妥当です。懸念点はなく、この設計のまま実装へ進んで問題ありません。
This was referenced Sep 2, 2026
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.
概要
devbase build <image>が位置引数をdocker buildx buildへそのまま渡して失敗する不具合 (#139) について、受け入れ条件と設計だけを確定させる PR です。実装は含めません。設計の誤りを実装後に直す費用を避けるため、設計を先にレビューへ通します。関連 Issue
変更点
issues/PLAN49_build-image-argument.mdを追加(要求仕様 + 設計).ndf/worktree.jsonを追加、.gitignoreに.worktrees/を登録(作業ツリー運用の宣言)調査で確定したこと
issue #139 が「確認が要る」としていた 2 点を先に潰しました。
containers/配下がdevbase-<name>規約に従うかcompose.ymlのimage:、他 Dockerfile のFROM devbase-base:latest、snapshot/manager.py:34のSNAPSHOT_IMAGEで確認)cmd_build(image=...)が到達不能かdevbase project build <image>/devbase container build <image>から届く。到達不能なのはトップレベルdevbase buildからの経路だけ主な設計判断
単体ビルドの実装は Python 側へ寄せ、shell (
bin/devbase) は振り分けだけを行う。逆向き(Python が
bash bin/devbase build <image>を呼ぶ)にすると、bin/devbase先頭の name 解決を通ってしまい、devbase project build bi-toolsがprojects/bi-toolsの compose ビルドへ黙って化けます(projects/bi-toolsとcontainers/bi-toolsが両方実在)。現在project buildの位置引数が name 解決の対象外であることで守られている挙動を、実装を寄せただけで壊すことになるため採りません。タグは
devbase-<image>:latestに統一し、docker buildx build --loadへ揃える。devbase project build baseは現状base:latestを作りますが、これはFROM devbase-base:latestから解決できず、ビルドした意味が失われます。リポジトリ内のどこからも参照されていない旧タグのため、移行措置は設けません。動作確認
設計だけの PR のためコード変更はありません。設計の裏付けとして次を実行しています。
docker/compose_with_secretsをスタブ化してbin/devbase build base --no-cacheを実行し、docker buildx build --load -t devbase-base:latest <ROOT>/containers/base base --no-cacheと PATH が 2 つになることを再現devbase build bi-toolsが name 解決に吸われcontainers/bi-toolsを一度もビルドしないことを確認(fix: devbase build <image> が実在プロジェクト名と衝突して黙って別のイメージをビルドする #142 として起票)containers/*/compose.ymlとDockerfileを走査しdevbase-以外のタグ参照が無いことを確認./bin/devbase --helpが正常に動作する(コード変更なしのため未実施)スクリーンショット・ログ(任意)
補足
レビューでは特に次を見ていただきたいです。
devbase project build <image>のタグが<image>:latest→devbase-<image>:latestに変わることを、互換の断絶として扱わなくてよいか