Uh oh!
There was an error while loading. Please reload this page.
docs: PLAN36 VS Code Server の永続化プランを追加する - #114
Open
takemi-ohama wants to merge 2 commits into
Open
Conversation
コンテナを作り直すたびに VS Code Server (215MB / 約 55 秒) が再ダウンロード される。~/.vscode-server はコンテナの書き込みレイヤ上にあり、永続化されて いるのは AI 設定と share だけであるため。 コンテナごとの named volume をマウントする案を採用し、共有ボリューム案は 不採用とした (接続トークンや marker を複数コンテナが同時に書くため)。 実測サイズの内訳と、ディスク使用量・孤児ボリュームの扱いも記載している。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
devbase の up は docker compose down でコンテナを削除してから作り直すため、 Compose の匿名ボリューム引き継ぎ (再作成時のみ有効) が働かない。一時 プロジェクトで実測し、up の前後でボリューム ID が変わり旧ボリュームが 孤児として残ることを確認した。 あわせて、空ボリュームのマウント先が root 所有になる点も実測として前提に 加えた (Task 3 の chown が必須である裏付け)。 Co-Authored-By: Claude Opus 5 (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 freeto 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.
Summary
issues/PLAN36_vscode-server-persistence.mdを追加します。実装はまだ行いません(プランのみ)。解決したい問題
コンテナを作り直すたびに VS Code Server が再ダウンロードされています。
~/.vscode-serverはコンテナの書き込みレイヤ上にあり、永続化されているのは entrypoint のAI_SETTINGS(.claude/.codex/.gemini/.serena/.ssh/.kiro)とshareだけです。実測(
carmo-ai-dev-1/ VS Code 1.134.0 / arm64)bin/<commit>data/agent-hostextensionsextensionsCacheコストを払っているのは実際に attach したコンテナだけで、現在 14 コンテナ中 3 つです。
採用した設計
コンテナごとの named volume(
devbase_vscode_<project>_<index>)を~/.vscode-serverへマウントします。共有ボリューム案(
devbase_home_ubuntuと同じ扱い)は不採用にしました。VS Code Server はdata/Machine/.connection-token-<commit>や各種 marker、ログを「1 マシン 1 セット」の前提で書くため、複数コンテナが同時に書くと競合します。ベースイメージへ焼き込む案も、commit ハッシュがクライアント更新で変わるため不採用です。プランには受け入れ条件(scale > 1 の独立性、プロジェクト間の独立性、空ボリュームの権限、既存プロジェクトの非破壊)、タスク分解、ディスク使用量と孤児ボリュームの扱い、切り戻し手順を含めています。
Test plan
du -sh ~/.vscode-server/*)AI_SETTINGSとshare)の記述がcontainers/base/entrypoint.shと一致することdevbase_work_<index>の共有、devbase_home_ubuntu)の記述がlib/devbase/volume/manager.pyと一致すること