ticket: use base32 project record ids

This commit is contained in:
2026-06-09 22:10:47 +09:00
parent 0803bc3725
commit 4203988d74
798 changed files with 477 additions and 105 deletions
+47
View File
@@ -0,0 +1,47 @@
---
title: "Strictly validate Ticket role launch config"
state: "closed"
created_at: "2026-06-07T03:14:39Z"
updated_at: "2026-06-07T03:42:39Z"
---
## Background
Fallback audit found that Ticket backend config and Ticket role launch config are currently conflated. A backend-only `.yoi/ticket.config.toml` can be parsed and treated as usable by the panel, while missing role profiles are filled by role defaults that currently use `inherit`. Top-level Ticket role launches then fail late because `inherit` is not supported there.
The desired policy is fail-closed runtime validation: role launch must require explicit concrete role profile configuration. Init/scaffold may write builtin selectors explicitly, but runtime must not silently invent them.
## Goal
Add strict validation for Ticket role launch configuration so Panel Intake / Orchestrator launch availability reflects whether role config is actually executable.
## Requirements
- Separate Ticket backend availability from Ticket role launch availability.
- Backend-only config may be usable for listing/showing Tickets.
- Role launch actions require fixed role config validation.
- Add a role-launch validation path that rejects:
- missing role table for the target fixed role;
- missing role `profile`;
- `profile = "inherit"` for top-level Ticket role launch;
- role profile selectors that cannot be resolved for the launch path, where resolvability can be checked at this layer.
- Panel Intake and workspace Orchestrator lifecycle must use the strict role-launch validation before presenting/attempting launch.
- Diagnostics must be bounded and actionable, e.g. tell the user to run init/scaffold or set `[roles.<role>].profile` explicitly.
- Keep `TicketRoleLaunchPlan::spawn_config` rejection of `inherit` as a final defensive check, but normal Panel/launcher paths should fail earlier with a clearer diagnostic.
- Preserve explicit concrete builtin selectors when they are present in config; the target is not to ban builtin, only implicit fallback.
- Do not silently convert missing roles to `builtin:default`, `default`, or `inherit` at runtime.
## Non-goals
- Implementing init/scaffold generation; that belongs to `ticket-init-role-profile-scaffold`.
- Removing low-risk backend defaults such as the local Ticket backend root.
- Redesigning model/provider fallback policy.
- Allowing top-level Ticket role launch to resolve `inherit`.
## Acceptance criteria
- Backend-only `.yoi/ticket.config.toml` is not considered sufficient for Panel Intake / Orchestrator role launch.
- Missing or `inherit` role profile produces an early actionable diagnostic before spawn.
- Explicit concrete role profile config allows launch planning to proceed.
- Tests cover backend-only config, partial role config, explicit `inherit`, and full concrete role config.
- Existing Ticket backend listing/show behavior remains available when only backend config is present, unless a separate design intentionally changes that.
+25
View File
@@ -0,0 +1,25 @@
Implemented, reviewed, merged, and validated.
Summary:
- Added strict Ticket role launch readiness validation while preserving backend config loading/list/show behavior.
- Role launch planning now rejects missing role table, missing role `profile`, explicit top-level `profile = "inherit"`, and unresolvable concrete selectors before spawn.
- `plan_ticket_role_launch(_with_config)` uses launch-specific validation instead of implicit role defaults.
- No implicit builtin/default/inherit fallback was added.
- `TicketRoleLaunchPlan::spawn_config` still defensively rejects `inherit`.
- Diagnostics are bounded/actionable for Panel/launcher surfaces.
- Init/scaffold generation was intentionally not implemented here; `ticket-init-role-profile-scaffold` remains the next task.
Implementation:
- Child commit: `30a07b7 ticket: validate role launch config`
- Merge commit: `merge: role launch config validation`
Review:
- External reviewer `role-launch-config-validation-reviewer-20260607` approved with no blockers.
Validation after merge:
- `cargo test -p ticket config --lib`
- `cargo test -p client ticket_role --lib`
- `cargo test -p tui multi_pod --lib`
- `cargo fmt --check`
- `git diff --check`
- `target/debug/yoi ticket doctor`
+194
View File
@@ -0,0 +1,194 @@
<!-- event: create author: LocalTicketBackend at: 2026-06-07T03:14:39Z -->
## Created
Created by LocalTicketBackend create.
---
<!-- event: plan author: hare at: 2026-06-07T03:20:38Z -->
## Plan
## Preflight / implementation intent
Classification: implementation-ready, should run before `ticket-init-role-profile-scaffold`.
Intent:
- Add an explicit runtime validation boundary for Ticket role launch config.
- Keep backend availability separate from role-launch readiness: backend-only config may list/show Tickets, but Panel Intake / Orchestrator launch must fail early if fixed role profile config is missing or non-executable.
- Preserve the policy distinction between explicit builtin selectors in config and implicit runtime fallback.
Requirements:
- Reject role launch readiness for:
- missing role table for the target role;
- missing role profile for the target role;
- `profile = "inherit"` for top-level launch;
- unresolvable concrete selector where this layer can validate it.
- Do not silently convert missing roles to `builtin:default`, `default`, or `inherit` at runtime.
- Keep backend defaults/list/show behavior working where possible.
- Panel Intake and workspace Orchestrator launch paths should use the stricter validation before spawn and emit bounded actionable diagnostics.
- Keep `TicketRoleLaunchPlan::spawn_config` `inherit` rejection as a final defensive check.
Current code map:
- `crates/ticket/src/config.rs`
- `TicketConfig::load_workspace` returns `default_for_workspace` on missing config.
- `RawTicketConfig::resolve` starts with `TicketRoleProfiles::default()` and overlays provided roles.
- `TicketRoleConfig::default_for_role` uses `ProfileSelectorRef::inherit()`.
- Tests around missing config/default roles need adjustment or expansion.
- `crates/client/src/ticket_role.rs`
- `plan_ticket_role_launch(_with_config)` reads `config.role(context.role)` and currently does not distinguish explicit vs default role config.
- `spawn_config` rejects `inherit` late.
- `crates/tui/src/multi_pod.rs`
- Panel Intake / Orchestrator role launch surfaces should receive clearer diagnostics.
Implementation direction:
- Preserve enough metadata in parsed Ticket config to know whether a role was explicitly configured, or add a dedicated validation API that can report missing/implicit role defaults.
- Prefer a typed validation error with role name and actionable remediation text.
- Tests should cover backend-only config, partial role config, explicit `inherit`, and full concrete role config.
Non-goals:
- Do not implement init/scaffold generation here; `ticket-init-role-profile-scaffold` follows after this lands.
- Do not add implicit builtin fallback.
- Do not allow top-level `inherit` launch.
- Do not redesign global provider/model/profile fallback policy.
---
<!-- event: intake_summary author: INSOMNIA at: 2026-06-07T03:20:49Z -->
## Intake summary
Implementation-ready: add strict Ticket role launch config validation before spawn, keep backend availability separate from role-launch readiness, reject missing role profile and top-level `inherit`, and avoid implicit builtin/default fallback. This should land before init/scaffold generation.
---
<!-- event: state_changed author: INSOMNIA at: 2026-06-07T03:20:49Z from: intake to: ready reason: intake_ready field: workflow_state -->
## State changed
Ticket intake complete; workflow_state intake -> ready.
---
<!-- event: implementation_report author: hare at: 2026-06-07T03:21:41Z -->
## Implementation report
## Delegation
Implementation delegated to child Pod `role-launch-config-validation-coder-20260607` in worktree `.worktree/ticket-role-launch-config-strict-validation` on branch `work/ticket-role-launch-config-strict-validation`.
Scope:
- Add strict runtime validation for Ticket role launch config.
- Keep backend availability separate from role-launch readiness.
- Reject missing role config and top-level `inherit` before spawn with actionable diagnostics.
- Do not implement init/scaffold generation here; `ticket-init-role-profile-scaffold` follows after this lands.
The child should commit implementation work in the child worktree and report diff/tests. Merge, review, Ticket closure, and cleanup remain with the parent/human workflow.
---
<!-- event: implementation_report author: hare at: 2026-06-07T03:38:25Z -->
## Implementation report
## Implementation report
Coder Pod `role-launch-config-validation-coder-20260607` completed implementation in `.worktree/ticket-role-launch-config-strict-validation`.
Commit:
- `30a07b7 ticket: validate role launch config`
Reported summary:
- Added explicit launch-readiness metadata for fixed Ticket roles without breaking backend-only config loading.
- Added typed validation failures for missing role table, missing `profile`, top-level `inherit`, and profile selector resolution failure.
- Updated `plan_ticket_role_launch(_with_config)` to validate launch readiness before plan/spawn.
- Kept `TicketRoleLaunchPlan::spawn_config` defensive rejection of `inherit`.
- Added focused tests for backend-only configs, partial roles, missing profile, explicit inherit, unresolvable selectors, and successful concrete `builtin:default` launch planning.
Reported validation:
- `cargo test -p ticket config --lib`
- `cargo test -p client ticket_role --lib`
- `cargo test -p tui multi_pod --lib`
- `cargo fmt --check`
- `git diff --check`
- `nix build .#yoi`
External review delegated to `role-launch-config-validation-reviewer-20260607`.
---
<!-- event: review author: role-launch-config-validation-reviewer-20260607 at: 2026-06-07T03:42:05Z status: approve -->
## Review: approve
Approved.
Reviewer found no blockers and judged the implementation merge-ready.
Evidence:
- Strict launch readiness is separated from backend config loading: backend-only config still loads, while `role_launch_config` rejects missing role table, missing role `profile`, and explicit top-level `inherit`.
- No implicit launch fallback was added: role launch planning uses launch-specific validation instead of internal default role config access.
- Early validation happens before plan/spawn, including profile selector resolution where possible.
- `TicketRoleLaunchPlan::spawn_config` still defensively rejects `inherit`.
- Backend-only `.yoi/ticket.config.toml` still parses/exposes backend root while role launch fails with `MissingRoleTable`.
- Diagnostics are bounded/actionable on panel surfaces.
- Explicit concrete `builtin:default` launch planning works; unresolvable selectors fail before spawn.
- Init/scaffold generation was not implemented in this ticket.
Reviewer validation:
- `cargo test -p ticket config --lib`
- `cargo test -p client ticket_role --lib`
- `cargo test -p tui multi_pod --lib`
- `cargo fmt --check`
- `git diff --check`
- `nix build .#yoi`
Merge readiness:
- `git merge-tree --write-tree develop HEAD` exited 0.
- Worktree status clean.
---
<!-- event: state_changed author: hare at: 2026-06-07T03:42:39Z from: ready to: done reason: closed field: workflow_state -->
## State changed
Ticket closed; workflow_state set to done.
---
<!-- event: close author: hare at: 2026-06-07T03:42:39Z status: closed -->
## Closed
Implemented, reviewed, merged, and validated.
Summary:
- Added strict Ticket role launch readiness validation while preserving backend config loading/list/show behavior.
- Role launch planning now rejects missing role table, missing role `profile`, explicit top-level `profile = "inherit"`, and unresolvable concrete selectors before spawn.
- `plan_ticket_role_launch(_with_config)` uses launch-specific validation instead of implicit role defaults.
- No implicit builtin/default/inherit fallback was added.
- `TicketRoleLaunchPlan::spawn_config` still defensively rejects `inherit`.
- Diagnostics are bounded/actionable for Panel/launcher surfaces.
- Init/scaffold generation was intentionally not implemented here; `ticket-init-role-profile-scaffold` remains the next task.
Implementation:
- Child commit: `30a07b7 ticket: validate role launch config`
- Merge commit: `merge: role launch config validation`
Review:
- External reviewer `role-launch-config-validation-reviewer-20260607` approved with no blockers.
Validation after merge:
- `cargo test -p ticket config --lib`
- `cargo test -p client ticket_role --lib`
- `cargo test -p tui multi_pod --lib`
- `cargo fmt --check`
- `git diff --check`
- `target/debug/yoi ticket doctor`
---