3.8 KiB
Implementation report: ticket-role-pod-launcher
Worktree / branch
- Worktree:
/home/hare/Projects/yoi/.worktree/ticket-role-pod-launcher - Branch:
work/ticket-role-pod-launcher
Commits
4bf0e27 feat: add ticket role pod launcherdd70517 fix: harden ticket role launch execution
Summary
Added a reusable Ticket role Pod launcher in the client crate so TUI/future CLI surfaces can build and execute fixed Ticket-role Pod launches without depending on pod internals or duplicating role/profile/workflow prompt construction.
The launcher uses .yoi/ticket.config.toml role configuration, preserves Profile ownership of durable system/role behavior, and sends concrete Ticket/action context as the first committed Method::Run input.
Final module/API layout
crates/client/src/ticket_role.rsTicketRefTicketRoleLaunchContextTicketRoleLaunchPlanTicketRoleLaunchResultTicketRoleLaunchErrorplan_ticket_role_launch(...)plan_ticket_role_launch_with_config(...)launch_ticket_role_pod(...)
crates/client/src/lib.rs- re-exports the Ticket role launcher API.
Behavior
Supported roles come from ticket::config::TicketRole:
intakeorchestratorcoderreviewerinvestigator
The launcher:
- loads
.yoi/ticket.config.tomlwithTicketConfig; - reads role
profile,workflow, and optionallaunch_prompt; - creates a deterministic launch plan;
- generates first-run input as
Segment::WorkflowInvoke { slug }plusSegment::Text { content }; - exposes unresolved
launch_promptrefs as launch-plan/text metadata rather than treating them as system instruction; - can execute concrete top-level profile launches with
spawn_pod,PodClient, andMethod::Run.
profile = "inherit" remains valid in launch planning but is rejected for top-level client execution with a bounded UnsupportedInheritProfile error, because top-level --profile inherit does not have child SpawnPod inheritance semantics.
launch_ticket_role_pod(...) waits for first-run acceptance evidence after sending Method::Run:
- accepts matching
Event::UserMessage; - accepts
Event::InvokeStart { kind: UserSend }; - accepts
Event::TurnStart; - reports
Event::Error, stream close, and timeout as errors.
Changed files
Cargo.lockcrates/client/Cargo.tomlcrates/client/src/lib.rscrates/client/src/spawn.rscrates/client/src/ticket_role.rspackage.nix
Review status
External sibling review initially requested changes with two blockers:
- Default
profile = "inherit"was being passed through top-level--profile inherit. launch_ticket_role_podreturned success after writingMethod::Runwithout acceptance evidence.
Both blockers were fixed in dd70517, and re-review approved with no blockers.
Remaining non-blocker follow-ups:
- Add fake-socket/client execution tests for acceptance/rejection/close/timeout behavior.
- Add an aggregate prompt/list cap; current implementation bounds individual fields but not the number of validation/report list entries.
- Future TUI/CLI integration must surface
UnsupportedInheritProfileclearly or require concrete role profiles until an inheritance-aware launch path exists.
Validation
Coder-reported validation for the initial implementation passed:
cargo test -p client ticketcargo test -p ticketcargo check --workspace --all-targetscargo fmt --checkgit diff --check./tickets.sh doctornix build .#yoi --no-link
Coder-reported validation for blocker fixes passed:
cargo test -p client ticketcargo check --workspace --all-targetscargo fmt --checkgit diff --check./tickets.sh doctornix build .#yoi --no-link
Ready for merge
Yes.
This clears the launcher prerequisite for tui-ticket-role-actions.