Repository navigation
docs: 複数プロファイルの同時利用での競合を実機で確かめた記録を足す - #53
Merged
AliceSaikawa merged 1 commit intoNov 1, 2026
Merged
AliceSaikawa merged 1 commit into
AliceSaikawa merged 1 commit into
Conversation
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.
This is by an automated agent, not a human.
Issue #9 の「再現の確認」を、同じ
$DSH_HOMEを使う 2 プロファイルの同時起動で行い、結果をdocs/multi-profile-check.mdに記録しました。コードの変更はありません(state.jsonのプロファイル別分離は #44 で入っています)。Closes #9
結果
aba5b45、fix: state.json をプロファイルごとに分ける #44 の直前)で再現した。 一方の/sentinelで変えたモード、baselineAt、unarchivedAtが、もう一方の書き込みでstate.jsonから消え、再起動するともう一方が書いたモードで起動した。state.jsonに書くとき(/sentinelのモード変更、アーカイブ初回のbaselineAt、手動解除の記録)。片方がblock/offのままで/sentinelも使わなければ起きない。ファイルは壊れず、ログにも出ない。73afe68)では再現しない。 ファイルはprofiles/<名前>/state.jsonに分かれ、片方の変更はもう片方のファイルとモードに影響しない。従来の共有ファイルからの移行(最初の起動だけ。従来のファイルは変わらない)も確認した。workspace.json)はプロファイル間で共有され、競合は修正後も再現する。 両方の cache-sentinel が同じセッションをアーカイブする(エラーは出ない)。一方の手動解除やアーカイブが、もう一方の書き込みで消える。cache-sentinel の自動再アーカイブが加わると、ファイルの中身が交互に入れ替わる。DSH のWorkspaceRegistryが起動時に 1 回だけ読み、書き込みでファイル全体を置き換えるためで、プラグインからは分けられない。仕様の判断: アーカイブ状態の競合をどう扱うか
archive/bothは 1 つのプロファイルでだけ有効にする」と案内する(おすすめ・現状のまま)。 fix: state.json をプロファイルごとに分ける #44 で README 3 言語の Limitations に記述済みで、今回の結果と合っている。おすすめの 1 を採ったので、README とコードは変えていません。
変更点
docs/multi-profile-check.md(新規): 環境、修正前と修正後の手順と結果、確認していないこと。docs/rdsh-check.md: Desktop の実機確認 7 を、Desktop アプリ固有の確認だけに絞った。重複 Issue の表に結果へのリンク。docs/implementation-plan.md(T39 の状態)、docs/spike.md(Z4 に実機確認と 0.2.2-alpha.2 の行番号)、docs/README.md(目次)。検証
HOME・DSH_HOME・XDG_*・TMPDIRを隔離し、webとweb2(webのテンプレートから作成)を別ポートで同時に起動。操作は RPC(session/create・commands/execute・workspace/unarchiveSession・workspace/archiveSession)、観察はサーバーログ・RPC の応答・state.jsonとworkspace.jsonの変化(100 ms ごとに記録)。LLM は使っていない。npm run typecheck・npm test(460 件成功)・npm run build(lib/の差分なし)。実機での確認をお願いしたいこと(Desktop)
Linux の npm 版
dshはdesktopプロファイルを起動できないため、Desktop アプリそのものは確かめていません。macOS か Windows で、docs/rdsh-check.mdの「Desktop の実機確認」7 の手順をお願いします。状態ファイル: …が$DSH_HOME/cache-sentinel/profiles/desktop/state.jsonであること((プロファイル名なし)が付くなら Desktop では名前が取れていない)。状態ファイルを作りました: …が出て、2 回目以降は出ないこと。従来の$DSH_HOME/cache-sentinel/state.jsonが変わらないこと。webと同時に動かし、片方の/sentinelのモード変更が、もう片方のファイルと/sentinelの表示を変えないこと。確認していないこと