2.2 KiB
2.2 KiB
Local Workspace identity を tracked .yoi/workspace.toml に永続化する実装を完了した。
完了内容:
.yoi/workspace.tomlを local Workspace identity の authority として追加。- v0 schema は
workspace_id,created_at,display_nameのみ。 workspace_idは UUIDv7 canonical string として検証し、path / display basename から導出しない。created_atは UTC RFC3339 timestamp として検証。display_nameは空文字列を拒否。- unknown fields は v0 では明示的に deny。
- invalid existing file は fail closed し、自動上書きしない。
- missing file 初期化では
OpenOptions::create_new(true)を使い、既存 file が race で作られた場合は persisted identity を read/parse して返す。 - fixed temp file /
path.exists()+renamefinalization は使わない。 ServerConfig::local_devはlocal:{display}を生成せず、persistedWorkspaceIdentityを受け取る。- SQLite
workspacesupsert、Workspace API、repository ids、host ids は persisted Workspace id を使う。 - legacy
/api/repositories/localalias は維持。 - 既存
local:*DB rows の destructive migration はしない。 .yoi/workspace.tomlは絶対 path / secret / socket / runtime data を含まない安全な project identity record として維持。
統合:
- Implementation:
31565c9b feat: persist workspace identity - Fix:
49c9e190 fix: return persisted workspace identity - Merge:
2745f3d5 merge: workspace identity persistence
検証:
- Reviewer approval:
yoi-reviewer-00001KVSKGDYS-r1 cargo fmt --check: passedgit diff --check HEAD^1..HEAD: passedcargo test -p yoi-workspace-server: passedcargo check -p yoi-workspace-server: passedcd web/workspace && deno task check && deno task build: passedcargo run -q -p yoi -- ticket doctor: passed (doctor: ok)nix build .#yoi --no-link: passed
生成物 cleanup:
- orchestration worktree の
target/,web/workspace/node_modules/,web/workspace/.svelte-kit/,web/workspace/build/を削除済み。
残作業:
- なし。将来必要なら legacy
local:*row cleanup / migration policy は別 Ticket で扱う。