ticket: use base32 project record ids
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
---
|
||||
title: "Pod tools: unify pod listing and rename restore operation"
|
||||
state: "closed"
|
||||
created_at: "2026-05-31T02:28:21Z"
|
||||
updated_at: "2026-05-31T03:00:15Z"
|
||||
---
|
||||
|
||||
## Background
|
||||
|
||||
The current LLM-callable Pod tool surface has overlapping concepts:
|
||||
|
||||
- `ListPods` is registry-oriented and lists Pods spawned by the current Pod.
|
||||
- `ListVisiblePods` is state/visibility-oriented and lists visible live/stored Pods.
|
||||
- `InspectPod` provides a named detail lookup.
|
||||
- `AttachOrRestorePod` has an ambiguous name: the "attach" branch mostly detects an existing live socket and returns connection information; it does not clearly mean that the target becomes a comm-registered child for `SendToPod` / `ReadPodOutput`.
|
||||
|
||||
Recent multi-agent workflow incidents also showed that stopped/restorable child Pods and missing/unreachable children are not clearly represented. For LLM tool use, fewer, more precise operations are preferable.
|
||||
|
||||
User decision:
|
||||
|
||||
- Integrate `ListVisiblePods` semantics into `ListPods`.
|
||||
- Remove `InspectPod` from the LLM tool surface.
|
||||
- Rename `AttachOrRestorePod` to `RestorePod`.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Replace the old `ListPods` result semantics with the state/visibility-aware listing currently represented by `ListVisiblePods`.
|
||||
- The tool should list Pods visible to the current Pod, not host-wide Pods.
|
||||
- Visible set should include self and spawned children according to current visibility rules.
|
||||
- Preserve enough fields to distinguish live/reachable, stored/restorable, missing/corrupt/unrestorable, and comm/registry state where available.
|
||||
- If preserving exact `PodList`/`PodListEntry` structures is easier, use them; do not keep two nearly identical listing tools.
|
||||
- Remove `ListVisiblePods` as a separate LLM-callable tool.
|
||||
- Update tool registration, tool descriptions, tests, prompts/docs if they mention it.
|
||||
- If protocol enum compatibility must remain for non-LLM/TUI callers, keep internal compatibility only and do not expose it as an LLM tool; otherwise remove it cleanly.
|
||||
- Remove `InspectPod` from the LLM-callable tool surface.
|
||||
- Update tool registration, tool descriptions, schema, tests, prompts/docs.
|
||||
- Prefer `ListPods` for discovery/detail and `RestorePod` for action.
|
||||
- If protocol enum compatibility must remain, keep it internal/non-advertised only; otherwise remove it cleanly.
|
||||
- Rename `AttachOrRestorePod` to `RestorePod` in the LLM-callable surface.
|
||||
- The operation should restore a visible stopped/restorable Pod, or report that a visible Pod is already live.
|
||||
- Avoid using “attach” terminology in tool name/description unless a real comm-registry materialization semantics is implemented.
|
||||
- Update tool schema, descriptions, registration, tests, and prompts/docs.
|
||||
- Decide whether to keep a backwards-compatible protocol alias internally; avoid exposing both names to the LLM.
|
||||
- Preserve scope, visibility, and safety boundaries.
|
||||
- Do not make host-wide Pod enumeration available.
|
||||
- Do not allow restoring Pods outside the caller’s visibility set.
|
||||
- Do not broaden delegated scope handling in this ticket.
|
||||
- Keep behavior for `SpawnPod`, `SendToPod`, `ReadPodOutput`, and `StopPod` coherent with the new listing/restore tools.
|
||||
- If full stopped/restorable child semantics require a larger registry change, document it as follow-up rather than half-implementing it.
|
||||
|
||||
## Non-goals
|
||||
|
||||
- Full redesign of stopped/restorable child lifecycle and delegated scope reclaim semantics.
|
||||
- Changing Pod registry durable authority or parent restore pruning behavior.
|
||||
- Host-wide Pod management tools.
|
||||
- TUI dashboard redesign.
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- The LLM-visible tool list exposes `ListPods` and `RestorePod`, and no longer exposes `ListVisiblePods`, `InspectPod`, or `AttachOrRestorePod`.
|
||||
- `ListPods` returns visibility/state-aware data sufficient for the LLM to decide whether a Pod is live, stopped/restorable, or unavailable.
|
||||
- `RestorePod` replaces the old `AttachOrRestorePod` name in tool descriptions and tests.
|
||||
- Existing tests are updated and new/renamed tests cover:
|
||||
- `ListPods` includes visible stored/live entries formerly covered by `ListVisiblePods`;
|
||||
- `RestorePod` rejects invisible/missing Pods;
|
||||
- `RestorePod` reports already-live visible Pods without spawning another process;
|
||||
- removed tools are not registered in the LLM tool registry.
|
||||
- Any intentional protocol compatibility aliases are documented in code comments and are not advertised to the LLM.
|
||||
- `cargo fmt --check`, focused Pod/tools tests, `cargo check` for affected crates, `./tickets.sh doctor`, and `git diff --check` pass.
|
||||
@@ -0,0 +1 @@
|
||||
Simplified the LLM-facing Pod tool surface: `ListPods` now uses visibility/state-backed listing semantics, `ListVisiblePods` and `InspectPod` are removed from the active tool/protocol surface, and `AttachOrRestorePod` is renamed to `RestorePod`. TUI/protocol/docs/tests were updated, external review approved, and main workspace validation passed.
|
||||
@@ -0,0 +1,105 @@
|
||||
<!-- event: create author: tickets.sh at: 2026-05-31T02:28:21Z -->
|
||||
|
||||
## Created
|
||||
|
||||
Created by tickets.sh create.
|
||||
|
||||
---
|
||||
|
||||
<!-- event: decision author: hare at: 2026-05-31T02:29:17Z -->
|
||||
|
||||
## Decision
|
||||
|
||||
Decision note:
|
||||
|
||||
- `ListVisiblePods` should be folded into `ListPods` rather than kept as a separate tool.
|
||||
- `InspectPod` is not needed as an LLM-facing tool; `ListPods` should provide enough state/detail, and action should go through restore/send/read/stop tools.
|
||||
- `AttachOrRestorePod` should become `RestorePod`. The current "attach" branch only observes an already-live socket and returns status/socket data; it does not mean a persistent attachment or comm-registry materialization, so the name is misleading.
|
||||
- If deeper semantics are needed later, define them explicitly as comm-registration/materialization rather than using "attach" implicitly.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: hare at: 2026-05-31T02:59:12Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Implementation report from coder Pod `pod-tool-surface-coder-20260531`:
|
||||
|
||||
- Branch: `pod-tool-surface-restore-list`
|
||||
- Commit: `5472cec` (`pod: simplify pod tool surface`)
|
||||
- Changed files: `crates/pod/src/controller.rs`, `crates/pod/src/discovery.rs`, `crates/pod/src/spawn/comm_tools.rs`, `crates/pod/src/spawn/registry.rs`, `crates/pod/src/spawn/tool.rs`, `crates/pod/tests/pod_comm_tools_test.rs`, `crates/protocol/src/lib.rs`, `crates/tui/src/app.rs`, `crates/tui/src/picker.rs`, `docs/architecture.md`.
|
||||
- Simplified LLM-facing Pod tools to `ListPods` / `RestorePod`.
|
||||
- Removed `ListVisiblePods`, `InspectPod`, and `AttachOrRestorePod` from active tool/protocol identifiers.
|
||||
- Moved old `ListVisiblePods` state-backed visibility semantics into `ListPods`.
|
||||
- Removed old spawned-registry-only `ListPods` comm tool and added `comm_registry` information to state-backed Pod listing output.
|
||||
- `RestorePod` now reports already-live Pods or restores visible stopped/restorable Pods without using attach terminology.
|
||||
- TUI protocol handling and architecture docs were updated.
|
||||
|
||||
Validation reported by coder:
|
||||
|
||||
- `cargo fmt --check` passed
|
||||
- `cargo check -p pod -p protocol` passed with existing `llm-worker` warning only
|
||||
- `cargo test -p protocol pod_discovery` passed
|
||||
- `cargo test -p pod state_backed_visibility_and_restore_planning` passed
|
||||
- `cargo test -p pod --test pod_comm_tools_test` passed
|
||||
- `./tickets.sh doctor` passed
|
||||
- `git diff --check` passed
|
||||
|
||||
Unresolved issues: none.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: review author: hare at: 2026-05-31T02:59:12Z status: approve -->
|
||||
|
||||
## Review: approve
|
||||
|
||||
External review by reviewer Pod `pod-tool-surface-reviewer-20260531`: approve.
|
||||
|
||||
Reviewer summary:
|
||||
|
||||
- `ListPods` is now the state/visibility-aware listing tool.
|
||||
- `RestorePod` replaces old attach/restore naming.
|
||||
- Active Rust source no longer contains `ListVisiblePods`, `InspectPod`, or `AttachOrRestorePod` tool/protocol identifiers.
|
||||
- Visibility remains self + durable spawned children + live in-memory spawned registry, not host-wide enumeration.
|
||||
- `RestorePod` rejects non-visible/missing/non-restorable Pods, reports already-live visible Pods, and only restores when state is restorable and unlocked.
|
||||
- Existing `SpawnPod`, `SendToPod`, `ReadPodOutput`, and `StopPod` remain coherent; the old comm-registry-only `ListPods` tool was removed rather than retained as alias.
|
||||
- TUI/protocol/docs were updated consistently.
|
||||
|
||||
Blockers: none.
|
||||
|
||||
Non-blocking follow-ups:
|
||||
|
||||
- `crates/pod/src/controller.rs` had a stale comment saying “four communication tools” after the comm tool count changed; not behavior-affecting.
|
||||
- Run `cargo check -p tui` before merge because TUI files changed.
|
||||
- A small assertion that removed tool names are absent from the registry would satisfy the ticket wording more literally, but reviewer did not consider it blocking.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: hare at: 2026-05-31T03:00:14Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Main workspace validation after merge:
|
||||
|
||||
- `cargo fmt --check` passed
|
||||
- `cargo check -p pod -p protocol -p tui` passed with pre-existing dead-code warnings in `llm-worker` and `tui`
|
||||
- `cargo test -p protocol pod_discovery` passed
|
||||
- `cargo test -p pod state_backed_visibility_and_restore_planning` passed
|
||||
- `cargo test -p pod --test pod_comm_tools_test` passed
|
||||
- `./tickets.sh doctor` passed
|
||||
- `git diff --check` passed
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: close author: hare at: 2026-05-31T03:00:15Z status: closed -->
|
||||
|
||||
## Closed
|
||||
|
||||
Simplified the LLM-facing Pod tool surface: `ListPods` now uses visibility/state-backed listing semantics, `ListVisiblePods` and `InspectPod` are removed from the active tool/protocol surface, and `AttachOrRestorePod` is renamed to `RestorePod`. TUI/protocol/docs/tests were updated, external review approved, and main workspace validation passed.
|
||||
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user