feat(up): DEVBASE_WORKSPACE で VS Code ワークスペースを開く + 共有ディレクトリ (share/.kiro) 追加#77
Merged
Merged
Conversation
devbase up のエディタ自動オープンと AI 設定 symlink に 2 機能を追加。
1. DEVBASE_WORKSPACE 対応 (opener)
- コンテナ内の *.code-workspace 絶対パスを env で指定すると、フォルダ
(--folder-uri) ではなくワークスペースファイル (--file-uri) を開く。
- 未指定時は従来どおり /work/$GIT_REPO フォルダを開く。
- env 名は汎用 WORKSPACE (CI が設定し得る) との衝突回避と DEVBASE_EDITOR*
系との命名統一のため DEVBASE_WORKSPACE とする。
2. AI 設定 symlink に share / .kiro を追加 (entrypoint.sh)
- /home/ubuntu/share -> /persistent/ai/share (全コンテナ共有の置き場)。
/persistent/ai は全インスタンス共通 volume (devbase_home_ubuntu) のため
どのコンテナからも同一実体を参照する。
- /home/ubuntu/.kiro -> /persistent/ai/.kiro。
テスト: resolve_workspace と open_editor の file-uri 経路を追加 (139 passed)。
ドキュメント: docs/user/environment-variables.md に DEVBASE_WORKSPACE を追記。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
takemi-ohama
commented
Jun 27, 2026
takemi-ohama
left a comment
Contributor
Author
There was a problem hiding this comment.
🤖 cross-review | round 1 | gemini | APPROVE
実装およびテスト、ドキュメントの更新に問題はありません。
takemi-ohama
commented
Jun 27, 2026
takemi-ohama
left a comment
Contributor
Author
There was a problem hiding this comment.
🤖 cross-review | round 1 | codex | APPROVE
修正必須の指摘はありません。
takemi-ohama
added a commit
that referenced
this pull request
Jun 27, 2026
ドキュメントが実装と乖離していた点を是正する。
## 修正内容
1. マウント先の誤り訂正 (/home/ubuntu → /persistent/ai)
- devbase_home_ubuntu ボリュームは /persistent/ai にマウントされる
(lib/devbase/volume/compose.py:13-14 で /home/ubuntu は _DEPRECATED_TARGET
として除去、/persistent/ai にマップ)。
- /home/ubuntu 直下はコンテナ層(揮発)で、永続化されるのは entrypoint が
/persistent/ai 配下へ symlink する設定のみ。「シェル履歴等も永続」という
記述は誤りだったため訂正。
- 対象: container-operations.md / compose-yml-guidelines.md /
quickstart.md / snapshot-guide.md / troubleshooting.md / README.md
2. AI 設定の永続化を明文化 (container-operations.md に新セクション)
- symlink 機構と対象一覧 (.claude / .codex / .gemini / .serena / .ssh /
.kiro / share) を記載。PR #77 で追加した .kiro / share を反映。
- share が全コンテナ共有のファイル置き場であること、DEVBASE_WORKSPACE との
関連を追記。
3. rebuild / --no-cache の説明訂正 (README.md)
- 「devbase rebuild で docker compose build --no-cache 相当」は誤り。
rebuild は build --expires=7 で齢ゲート付き。無条件 no-cache は
devbase build --no-cache であることを明記。
4. entrypoint/Dockerfile 変更時の再ビルド注記 (cli-reference.md)
- devbase up はイメージ齢 7 日未満だと再ビルドをスキップするため、
entrypoint 変更は build --no-cache が必要な旨を追記。
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 up周りに 2 つの機能を追加する。1.
DEVBASE_WORKSPACEで VS Code ワークスペースを開くdevbase up後のエディタ自動オープンで、フォルダの代わりに*.code-workspaceを開けるようにする。DEVBASE_WORKSPACEenv にコンテナ内の絶対パス(例/home/ubuntu/share/work/uttarov2-doc.workspace)を指定すると、--folder-uriではなく--file-uriでワークスペースファイルを開く。VS Code は.code-workspace拡張子を multi-root ワークスペースとして開く。/work/$GIT_REPOフォルダを開く(後方互換)。WORKSPACEからDEVBASE_WORKSPACEに変更。理由は (a) CI ツール(Jenkins 等)が設定する汎用WORKSPACEとの衝突回避、(b)DEVBASE_EDITOR*/DEVBASE_OPEN_EDITORとの命名統一。2. AI 設定 symlink に
share/.kiroを追加containers/base/entrypoint.shの symlink 対象 (AI_SETTINGS) に追加。~/share -> /persistent/ai/share: 全コンテナ共有のファイル置き場。/persistent/aiは全 dev インスタンス共通の external volume (devbase_home_ubuntu) にマップされるため、どのコンテナからも同一実体を参照する。~/.kiro -> /persistent/ai/.kiro。使い方
プロジェクトの
envに:```
DEVBASE_WORKSPACE=/home/ubuntu/share/work/uttarov2-doc.workspace
```
共有マウント
/home/ubuntu/share配下に.workspaceを置けば全コンテナで共用できる。テスト
resolve_workspaceの解決(未設定 / 空白 / パス)とopen_editorの--file-uri経路(launch / print_command)を追加。tests/editor/ tests/env/test_collector_editor.py tests/cli/test_project_dispatch.pyで 139 passed。反映タイミング
share/.kirosymlink は entrypoint 再実行(コンテナ再生成 /devbase up等)で反映。既存稼働中コンテナには遡及しない。🤖 Generated with Claude Code