From 89e768a658dd65e4bbffc6c5916df6b402eae141 Mon Sep 17 00:00:00 2001 From: Hare Date: Tue, 9 Jun 2026 19:46:29 +0900 Subject: [PATCH] ticket: record tool context and parallel reviews --- .yoi/tickets/20260609-085212-001/item.md | 2 +- .yoi/tickets/20260609-085212-001/thread.md | 73 ++++++++++++++++++++++ .yoi/tickets/20260609-101732-001/item.md | 2 +- .yoi/tickets/20260609-101732-001/thread.md | 56 +++++++++++++++++ 4 files changed, 131 insertions(+), 2 deletions(-) diff --git a/.yoi/tickets/20260609-085212-001/item.md b/.yoi/tickets/20260609-085212-001/item.md index 82cec6f2..9a93e230 100644 --- a/.yoi/tickets/20260609-085212-001/item.md +++ b/.yoi/tickets/20260609-085212-001/item.md @@ -2,7 +2,7 @@ title: 'TicketListの出力を軽量化する' state: 'inprogress' created_at: '2026-06-09T08:52:12Z' -updated_at: '2026-06-09T10:39:36Z' +updated_at: '2026-06-09T10:45:45Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-06-09T10:01:28Z' diff --git a/.yoi/tickets/20260609-085212-001/thread.md b/.yoi/tickets/20260609-085212-001/thread.md index 1e87f5cd..5a465d2f 100644 --- a/.yoi/tickets/20260609-085212-001/thread.md +++ b/.yoi/tickets/20260609-085212-001/thread.md @@ -211,3 +211,76 @@ Coder validation reported passed: Coder reports no conflict with the ToolExecutionContext branch. --- + + + +## Review: approve + +## Review result: approve + +Reviewed commit `7368416e54609517c2252beb6ae98f73fb7935ee` on branch `ticketlist-output-lightweight` in worktree `.worktree/ticketlist-output-lightweight`. + +### Evidence + +- `TicketList` tool output is now a summary model (`state_filter`, `count`, `returned`, `truncated`, `limit`, `tickets`) where each ticket contains only `id`, truncated `title`, `state`, `updated_at`, and optional short `hints`. +- `TicketList` does not serialize item body, thread/events, artifacts, or resolution content. The focused leak test creates sentinel body/thread/artifact/resolution strings and asserts none appear in list output, and also asserts forbidden keys are absent from each ticket entry. +- Limits are bounded with default `50` and max `100`; tests cover default truncation, excessive requested limit capping, and `all`/`closed` default cap behavior. +- Long title and hint truncation are covered for the LLM-facing tool output and CLI title truncation is covered separately. +- CLI `yoi ticket list` is a bounded tabular overview with `--limit` and a truncation note that points users to `yoi ticket show ` for details; it does not dump Markdown/JSON bodies by default. +- `TicketShow` remains detailed: tool `TicketShow` still returns bounded body, recent thread events, artifact metadata, relations, and resolution; CLI `show` remains the detailed Markdown-oriented output. +- Tool descriptions and `docs/development/work-items.md` now explicitly state List is overview/selection and Show is the detailed authority before routing/close/planning/implementation decisions. +- No Ticket backend schema, relation, Objective, or OrchestrationPlan design changes were found in the reviewed diff. + +### Validation run + +- `cargo test -p ticket ticket_list_tool` — passed (`4` tests). +- `cargo test -p yoi ticket_cli_list` — passed (`2` tests). +- `cargo test -p yoi ticket_cli_create_list_show_comment_review_state_close_and_doctor` — passed. +- `cargo test -p ticket ticket_tools_create_list_show_and_doctor` — passed. +- `cargo fmt --check` — passed. +- `git diff --check` — passed. +- `cargo run -q -p yoi -- ticket doctor` — passed (`doctor: ok`). +- `cargo check --workspace` — passed. +- `nix build .#yoi` — passed. +- Manual CLI smoke check: `cargo run -q -p yoi -- ticket list --state all --limit 3` returned only `state/id/title/updated_at/hints` rows plus a truncation note. + +### Residual risks + +- If the parallel ToolExecutionContext branch lands first, final merge may need a small mechanical adaptation around tool execution plumbing, but this implementation's TicketList data-shape and policy are sound. +- CLI `--limit 0` is parsed as zero while the tool clamps limits to at least one; this is not a context-safety or leakage issue and is not blocking for this Ticket's requirements. + +--- + + + +## Review: approve + +Review result: approve + +Evidence: +- `TicketList` tool output is a bounded overview model with `state_filter`, `count`, `returned`, `truncated`, `limit`, and `tickets`. +- Each ticket entry includes only `id`, truncated `title`, `state`, `updated_at`, and short `hints`. +- `body`, `thread/events`, `artifacts`, and `resolution` content are not emitted from `TicketList`. +- Sentinel tests verify body/thread/artifact/resolution strings do not leak into list output and forbidden detailed keys are absent from entries. +- Default limit is 50 and max limit is 100, including `state=all` / closed-inclusive listing tests. +- Long title and hint truncation are tested; CLI title truncation and truncation note are covered. +- CLI `yoi ticket list` remains a bounded table and points detailed use to `yoi ticket show `. +- `TicketShow` remains detailed and includes body, recent thread events, artifact metadata, relations, and resolution. +- Docs/tool descriptions preserve `List = overview/selection` and `Show = detailed authority`. +- No Ticket backend schema, TicketRelation, Objective, or OrchestrationPlan design change was introduced. + +Reviewer validation: +- `cargo test -p ticket ticket_list_tool` +- `cargo test -p yoi ticket_cli_list` +- `cargo test -p yoi ticket_cli_create_list_show_comment_review_state_close_and_doctor` +- `cargo test -p ticket ticket_tools_create_list_show_and_doctor` +- `cargo fmt --check` +- `git diff --check` +- `cargo run -q -p yoi -- ticket doctor` +- `cargo check --workspace` +- `nix build .#yoi` +- manual CLI smoke: `cargo run -q -p yoi -- ticket list --state all --limit 3` + +All passed. Residual note: if ToolExecutionContext lands first, final merge may need mechanical API adjustment around tool execution plumbing. This does not affect the bounded TicketList output policy. + +--- diff --git a/.yoi/tickets/20260609-101732-001/item.md b/.yoi/tickets/20260609-101732-001/item.md index 4f1a2aee..ba8ce4e3 100644 --- a/.yoi/tickets/20260609-101732-001/item.md +++ b/.yoi/tickets/20260609-101732-001/item.md @@ -2,7 +2,7 @@ title: 'Orchestratorに独立queued workの並列開始を促す' state: 'inprogress' created_at: '2026-06-09T10:17:32Z' -updated_at: '2026-06-09T10:42:37Z' +updated_at: '2026-06-09T10:46:18Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-06-09T10:31:16Z' diff --git a/.yoi/tickets/20260609-101732-001/thread.md b/.yoi/tickets/20260609-101732-001/thread.md index 83c6004a..70a05013 100644 --- a/.yoi/tickets/20260609-101732-001/thread.md +++ b/.yoi/tickets/20260609-101732-001/thread.md @@ -130,3 +130,59 @@ Coder validation reported passed: `cargo check --workspace` was not run because only workflow resource/docs changed. --- + + + +## Review: approve + +Review result: approve + +Evidence checked: +- Reviewed commit `492fe06832c30a08a982f469080041a290b1c228` on branch `orchestrator-parallel-queued-work`; `HEAD` matches the reviewed commit and worktree status is clean. +- Reviewed `.yoi/workflow/ticket-orchestrator-routing.md` and `.yoi/workflow/multi-agent-workflow.md` against the Ticket invariants. +- `ticket-orchestrator-routing.md` now states that queued notification is not an unattended scheduler trigger, that `queued -> inprogress` must be recorded before worktree/Pod/implementation side effects, and that unqueued Tickets are not capacity-fill candidates. +- The new Parallel acceptance pass requires checking Ticket body/thread/artifacts, `TicketRelationQuery`, `TicketOrchestrationPlanQuery`, workspace/worktree dirty state, visible Pods, branches, and conflict/dependency notes before accepting additional queued work. +- The same pass permits parallel start only for independently queued work with no blocking relation/dependency, no applicable `do_not_parallelize`/conflict, disjoint or low-risk mechanical surfaces, coder/reviewer capacity, committed acceptance records, and separate worktree/branch/scope. +- `multi-agent-workflow.md` reinforces separate worktree/branch/narrow write scope, reviewer read-only default, and bounded defer reasons when queued work remains idle despite apparent capacity. +- Both workflows explicitly reject scheduler/background-runner/resource-graph-solver/automatic-queue-drain semantics. + +Validation run: +- Focused fixed-string validation for scheduler/no-background/no-queue-drain language, `queued -> inprogress` pre-side-effect acceptance, no unqueued start, required inspection surfaces, bounded idle reasons, separate worktrees/branches/scopes, and reviewer read-only default: passed. +- `git diff --check 492fe06832c30a08a982f469080041a290b1c228^ 492fe06832c30a08a982f469080041a290b1c228`: passed. +- `cargo run -q -p yoi -- ticket doctor`: `doctor: ok`. +- `nix build .#yoi`: passed. + +Residual risks: +- This is workflow guidance only; enforcement still depends on Orchestrator following the documented routing/acceptance checks rather than runtime scheduler constraints. +- `cargo check --workspace` was not rerun because the reviewed changes are workflow/resource text only and `nix build .#yoi` passed. + +--- + + + +## Review: approve + +Review result: approve + +Evidence: +- Review target `492fe06832c30a08a982f469080041a290b1c228` changes only workflow guidance files: + - `.yoi/workflow/ticket-orchestrator-routing.md` + - `.yoi/workflow/multi-agent-workflow.md` +- Orchestrator routing guidance states queued notifications are not unattended scheduler triggers. +- It requires durable `queued -> inprogress` acceptance before worktree creation, Pod spawn, or implementation side effects. +- It forbids starting unqueued Tickets merely to fill capacity. +- Parallel acceptance guidance checks Ticket body/thread/artifacts, Ticket relations, OrchestrationPlan, workspace/worktree dirty state, visible Pods, branches, and conflict/dependency notes. +- It explicitly says this is not a scheduler/background runner/resource graph solver/automatic queue drain loop. +- Multi-agent workflow guidance prefers parallel starts for independent queued Tickets when blockers/conflicts are absent, surfaces are disjoint or low-risk, capacity exists, and record commits can be made. +- Parallel Coder Pods require separate worktrees/branches/narrow write scopes; Reviewer remains read-only by default. +- Idle queued work with visible capacity requires a bounded reason. + +Reviewer validation: +- Focused fixed-string validation for no scheduler/background runner/queue drain loop, pre-side-effect acceptance, no unqueued start, relation/orchestration-plan/dirty-state/visible-Pod checks, bounded idle reasons, separate worktree/branch/narrow scope, reviewer read-only default. +- `git diff --check 492fe06832c30a08a982f469080041a290b1c228^ 492fe06832c30a08a982f469080041a290b1c228` +- `cargo run -q -p yoi -- ticket doctor` +- `nix build .#yoi` + +All passed. Residual note: this is workflow guidance, not runtime scheduler enforcement, which is consistent with the Ticket scope. + +---