ticket: accept worker workdir registry work
This commit is contained in:
parent
651422e0c8
commit
86f652a72f
|
|
@ -0,0 +1 @@
|
||||||
|
{"id":"orch-plan-20260710-161155-1","ticket_id":"00001KX6BPY7M","kind":"accepted_plan","accepted_plan":{"summary":"Ticket 00001KX6BPY7M は independent queued Ticket で blocker なし。Objective retention 方針に基づく Backend Worker/Workdir registry and link model を実装開始する。","branch":"work/00001KX6BPY7M-worker-workdir-registry","worktree":"/home/hare/Projects/yoi/.worktree/00001KX6BPY7M-worker-workdir-registry","role_plan":"単一 sibling Coder Pod に implementation worktree を委譲し、Backend SQLite Worker/Workdir/link tables、Backend create/status sync integration、managed/unmanaged list projections、retention pinned metadata、tests/UI projection adjustments を実装する。完了後、別 sibling Reviewer Pod で Ticket IntentPacket / raw-path redaction / registry authority / retention invariants に照らして read-only review する。"},"author":"orchestrator","at":"2026-07-10T16:11:55Z"}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: 'Add Backend Worker/Workdir registry and link model'
|
title: 'Add Backend Worker/Workdir registry and link model'
|
||||||
state: 'queued'
|
state: 'inprogress'
|
||||||
created_at: '2026-07-10T15:53:02Z'
|
created_at: '2026-07-10T15:53:02Z'
|
||||||
updated_at: '2026-07-10T16:10:57Z'
|
updated_at: '2026-07-10T16:12:07Z'
|
||||||
assignee: null
|
assignee: null
|
||||||
queued_by: 'workspace-panel'
|
queued_by: 'workspace-panel'
|
||||||
queued_at: '2026-07-10T16:10:57Z'
|
queued_at: '2026-07-10T16:10:57Z'
|
||||||
|
|
|
||||||
|
|
@ -46,4 +46,101 @@ Marked ready by `yoi ticket state`.
|
||||||
Ticket を `workspace-panel` が queued にしました。
|
Ticket を `workspace-panel` が queued にしました。
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: decision author: orchestrator at: 2026-07-10T16:11:45Z -->
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
Routing decision: implementation_ready
|
||||||
|
|
||||||
|
Reason:
|
||||||
|
- Ticket は Backend SQLite Worker registry / Workdir registry / Worker-Workdir link table の scope、retention/link authority、Backend-managed vs unmanaged Runtime workdir distinction、acceptance criteria を具体化している。
|
||||||
|
- typed relation blocker は 0 件、OrchestrationPlan record は 0 件。queued Ticket はこの Ticket 1件のみ、inprogress は 0 件。
|
||||||
|
- Objective `00001KWW44EXK` の retention 方針に沿った concrete implementation Ticket であり、実装前に必要な missing decision は見当たらない。
|
||||||
|
- queued notification is human authorized routing/start。
|
||||||
|
|
||||||
|
Evidence checked:
|
||||||
|
- Ticket body / thread / artifacts。
|
||||||
|
- `TicketRelationQuery(00001KX6BPY7M)`: 0 件。
|
||||||
|
- `TicketOrchestrationPlanQuery(00001KX6BPY7M)`: 0 件。
|
||||||
|
- Orchestrator worktree git status: clean on `orchestration`。
|
||||||
|
- queued Ticket 一覧: this Ticket 1件。inprogress は 0 件。
|
||||||
|
- Recent code history includes Runtime workdir pages / Worker launch / Execution Workspace materialization / Browser-managed execution workspaces already merged, giving implementation substrate。
|
||||||
|
|
||||||
|
IntentPacket:
|
||||||
|
|
||||||
|
Intent:
|
||||||
|
- Add Backend-owned SQLite Worker registry, Workdir registry, and Worker-Workdir link authority so Backend can explain Worker/workdir retention and relationships independently of live Runtime catalog/path state。
|
||||||
|
|
||||||
|
Binding decisions / invariants:
|
||||||
|
- Worker is the archival/retention unit. Session/transcript refs belong under Worker archive/reference shape, not independent long-term authority。
|
||||||
|
- Workdir canonical record exists in Backend SQLite; Runtime owns actual files, raw materialized paths, process/cwd binding, cleanup execution。
|
||||||
|
- Worker-Workdir relation authority is a SQLite link table; summary copies are non-authoritative。
|
||||||
|
- Workdir files are reproducible cache, not durable history。
|
||||||
|
- Dirty workdir is active/recovery state; dirty orphan is not automatically pruned。
|
||||||
|
- Browser-facing UI uses `workdir` wording; internal `working_directory` compatibility names may remain during migration。
|
||||||
|
- Raw Runtime path must not be stored in Backend registry or shown in Browser responses。
|
||||||
|
- Runtime direct/unmanaged workdirs must be distinguishable from Backend-managed workdirs and not mixed into managed lists。
|
||||||
|
|
||||||
|
Requirements / acceptance criteria:
|
||||||
|
- Add typed Backend SQLite tables for Worker registry, Workdir registry, and Worker-Workdir links with migration/default path for existing workspaces。
|
||||||
|
- Backend workdir creation creates/updates Backend Workdir registry before requesting Runtime materialization。
|
||||||
|
- Backend Worker creation creates/updates Backend Worker registry and Worker-Workdir link。
|
||||||
|
- Runtime Worker / Workdir status observations sync into Backend registry without deleting canonical record when files disappear。
|
||||||
|
- Backend registry can answer stopped Worker -> removed/missing Workdir relationship。
|
||||||
|
- Worker archive/retention metadata can represent `pinned`。
|
||||||
|
- Browser Worker/Workdir lists are based on Backend-managed registry plus Runtime observation merge。
|
||||||
|
- Backend-managed vs unmanaged/external Runtime Workdirs are distinguishable。
|
||||||
|
|
||||||
|
Implementation latitude:
|
||||||
|
- Exact table names/enum names/API response shape/test helper layout can follow current `workspace-server` store/server style。
|
||||||
|
- Session/transcript refs can be future-compatible nullable/json-ish shape if full archive model is not yet implemented。
|
||||||
|
- Runtime observation sync can be minimal v0 as long as canonical Backend rows remain authoritative and unmanaged/external is typed。
|
||||||
|
|
||||||
|
Escalate if:
|
||||||
|
- Actual prune/delete execution, dirty orphan recovery Worker auto-start, session/transcript full deletion UI, or storing Runtime raw paths in Backend canonical records becomes necessary。
|
||||||
|
|
||||||
|
Validation:
|
||||||
|
- `cargo test -p yoi-workspace-server --lib`
|
||||||
|
- `cargo test -p worker-runtime --features ws-server,fs-store`
|
||||||
|
- `cargo check -p yoi`
|
||||||
|
- `cd web/workspace && deno task check && deno task test`
|
||||||
|
- `git diff --check`
|
||||||
|
- `yoi ticket doctor`
|
||||||
|
- `nix build .#yoi --no-link`
|
||||||
|
|
||||||
|
Current code map:
|
||||||
|
- Backend store/schema: `crates/workspace-server/src/store.rs`。
|
||||||
|
- Backend server/workdir/worker APIs: `crates/workspace-server/src/server.rs`, `hosts.rs`, `companion.rs`。
|
||||||
|
- Runtime workdir/worker models: `crates/worker-runtime/src/{runtime.rs,working_directory.rs,execution_workspace.rs,catalog.rs,http_server.rs}`。
|
||||||
|
- Frontend workdir/worker pages: `web/workspace/src/routes/w/[workspaceId]/...`, workspace sidebar/workdir/worker helpers。
|
||||||
|
|
||||||
|
Critical risks / reviewer focus:
|
||||||
|
- Do not store or expose raw Runtime materialized paths。
|
||||||
|
- Backend registry/link table must remain relation authority, not transient Runtime observation。
|
||||||
|
- Runtime direct unmanaged workdirs must be visible/diagnosable as unmanaged, not silently treated as Backend-managed。
|
||||||
|
- Missing/removed workdir files must not erase canonical Backend records。
|
||||||
|
- `pinned` retention must be representable and protected from future cleanup/prune surfaces。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: state_changed author: orchestrator at: 2026-07-10T16:12:07Z from: queued to: inprogress reason: routing_acceptance_implementation_ready field: state -->
|
||||||
|
|
||||||
|
## State changed
|
||||||
|
|
||||||
|
Queued acceptance recorded after Workspace Dashboard Queue notification authorized Orchestrator routing.
|
||||||
|
|
||||||
|
Checked context:
|
||||||
|
- Ticket body / thread / artifacts。
|
||||||
|
- `TicketRelationQuery(00001KX6BPY7M)`: blocking relation 0 件。
|
||||||
|
- `TicketOrchestrationPlanQuery(00001KX6BPY7M)`: prior record 0 件。今回 accepted_plan を記録済み。
|
||||||
|
- Orchestrator worktree git status: clean on `orchestration`。
|
||||||
|
- queued Ticket はこの Ticket 1件のみ。inprogress は 0 件。
|
||||||
|
|
||||||
|
Acceptance basis:
|
||||||
|
- concrete missing decision / information は残っていない。
|
||||||
|
- Ticket scope is Backend Worker/Workdir registry/link authority; actual prune/delete/recovery automation and raw Runtime path persistence are explicitly out of scope。
|
||||||
|
- side effect はこの `queued -> inprogress` acceptance 後に、worktree-workflow に沿って implementation worktree を作成してから開始する。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user