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
@@ -0,0 +1,100 @@
# Delegation intent: builtin yoi_local Ticket backend config
## Classification
`implementation-ready` with a transitional storage-root constraint.
`yoi-ticket-cli-parity` is complete, so the binary now owns direct Ticket CLI operations. The next step is to make the Ticket backend provider explicit as Yoi's built-in local backend without moving storage yet.
## Intent
Extend `.yoi/ticket.config.toml` backend config from implicit/generic local storage toward a canonical built-in provider:
```toml
[backend]
provider = "builtin:yoi_local"
root = "work-items" # transitional until migrate-ticket-storage-to-yoi-tickets
```
This ticket should introduce the provider field and canonical spelling. It must not migrate records to `.yoi/tickets`; that is the next ticket.
## Worktree / branch
- worktree: `/home/hare/Projects/yoi/.worktree/builtin-yoi-local-ticket-backend-config`
- branch: `work/builtin-yoi-local-ticket-backend-config`
## Requirements
- Update Ticket config parsing in `crates/ticket/src/config.rs`.
- Add a backend provider concept with canonical value `builtin:yoi_local`.
- Keep the backend implementation local and bounded to the configured root.
- Preserve current active storage for this ticket:
- missing config should continue to resolve to `<workspace>/work-items` until the storage migration ticket lands;
- docs/tests should call this transitional explicitly.
- Support `.yoi/ticket.config.toml` with:
```toml
[backend]
provider = "builtin:yoi_local"
root = "work-items"
```
- Decide and implement legacy handling for existing `kind = "local"`:
- Accept as a short transitional alias if needed for compatibility/tests, but mark it non-canonical in docs/comments; or
- Reject with a clear diagnostic if that is cleaner and does not break current tests.
- Prefer new public names such as `TicketBackendProvider::BuiltinYoiLocal` over overloading `TicketBackendKind::Local`.
- Keep unsupported providers fail-closed with bounded diagnostics.
- Update Pod Ticket feature adapter only as needed to use provider/root validation.
- Update examples/docs that currently show `kind = "local"` to use `provider = "builtin:yoi_local"` where active docs are touched.
## Non-goals
- Moving storage to `.yoi/tickets/`.
- Removing `tickets.sh`.
- External provider implementations.
- GitHub/Linear/Jira/MCP backend support.
- TUI UI changes.
- Scheduler/lease/queue automation.
- Changing role profile/launch prompt/workflow semantics.
## Current code map
- `crates/ticket/src/config.rs`
- Current backend config is `TicketBackendKind::Local` and root defaults to `<workspace>/work-items`.
- Add provider support here.
- `crates/pod/src/feature/builtin/ticket.rs`
- Uses `TicketConfig::load_workspace(...)` and `config.backend.root`.
- Should preserve fail-closed/no-register behavior for malformed config/unusable roots.
- `crates/yoi/src/ticket_cli.rs`
- Uses Ticket config/backend root for `yoi ticket ...`; make sure provider changes do not break CLI.
- `docs/development/work-items.md`
- Shows `.yoi/ticket.config.toml` examples; update from `kind = "local"` to `provider = "builtin:yoi_local"` if not already migrated by another change.
## Validation
Run at least:
- `cargo test -p ticket config`
- `cargo test -p ticket`
- `cargo test -p pod ticket --lib`
- `cargo test -p yoi ticket`
- `cargo check --workspace --all-targets`
- `cargo fmt --check`
- `git diff --check`
- `target/debug/yoi ticket doctor` or built binary equivalent
- `./tickets.sh doctor` during transition
Run `nix build .#yoi --no-link` if feasible.
## Completion report
Report:
- worktree path / branch;
- commit hash;
- final backend config schema;
- legacy `kind = "local"` handling;
- default root behavior and why storage was not moved;
- docs/tests updated;
- validation results;
- whether `migrate-ticket-storage-to-yoi-tickets` can proceed.
+53
View File
@@ -0,0 +1,53 @@
---
title: "Builtin yoi_local Ticket backend config"
state: "closed"
created_at: "2026-06-05T20:30:06Z"
updated_at: "2026-06-05T21:26:56Z"
---
## Background
The Ticket backend should be configured as an explicit built-in Yoi local backend rather than an implicit generic local root.
The desired config is:
```toml
[backend]
provider = "builtin:yoi_local"
root = ".yoi/tickets"
```
This makes the backend an explicit Yoi product capability and prepares for removing `tickets.sh` and moving storage under `.yoi/`.
## Requirements
- Extend `.yoi/ticket.config.toml` backend schema from `kind = "local"` toward `provider = "builtin:yoi_local"`.
- Support `provider = "builtin:yoi_local"` as the canonical spelling.
- Decide whether old `kind = "local"` is rejected immediately or accepted only as a short transitional alias. Prefer avoiding long-term compatibility aliases.
- Default backend provider should become `builtin:yoi_local`.
- Default backend root should become `.yoi/tickets` once migration is ready, or support a transition mode if this ticket lands before storage migration.
- Update Ticket tools / Pod Ticket feature adapter to use the configured provider/root.
- Update role launcher/TUI paths if they inspect backend diagnostics.
- Keep backend root path containment and fail-closed behavior.
- Do not auto-create active storage unless the CLI command explicitly creates/migrates records.
## Non-goals
- Moving existing records; handled by `migrate-ticket-storage-to-yoi-tickets`.
- Removing `tickets.sh`; handled by `remove-tickets-sh`.
- External provider implementation.
- GitHub/Linear/Jira/MCP backend support.
- TUI UI changes.
## Acceptance criteria
- `.yoi/ticket.config.toml` with `provider = "builtin:yoi_local"` parses and resolves.
- Missing config defaults to the selected built-in backend semantics.
- Tests cover provider parsing, unsupported provider diagnostics, relative root resolution, missing/unusable root behavior, and Pod Ticket feature adapter integration.
- Docs/examples use `provider = "builtin:yoi_local"`.
- `cargo test -p ticket` and focused Pod Ticket tests pass.
- `cargo check --workspace --all-targets`, `cargo fmt --check`, `git diff --check`, and Ticket doctor validations pass.
## Dependency
Prefer after `yoi-ticket-cli-parity`, so validation and migration can use `yoi ticket doctor`.
+31
View File
@@ -0,0 +1,31 @@
Implemented canonical Yoi local Ticket backend provider config.
Final backend config schema:
```toml
[backend]
provider = "builtin:yoi_local"
root = "work-items"
```
`provider = "builtin:yoi_local"` is the canonical spelling. Existing `kind = "local"` config is accepted as a short transitional alias so existing local workspaces/tests do not break during the migration, but docs now show the provider spelling.
Default root behavior intentionally remains `<workspace>/work-items` for missing config and for this transitional provider config. This ticket did not move storage to `.yoi/tickets`; that is owned by the follow-up `migrate-ticket-storage-to-yoi-tickets` ticket.
Implementation commit was merged from branch `work/builtin-yoi-local-ticket-backend-config`.
Validation after merge:
- `cargo test -p ticket config`
- `cargo test -p ticket`
- `cargo test -p pod ticket --lib`
- `cargo test -p yoi ticket`
- `cargo check --workspace --all-targets`
- `cargo fmt --check`
- `git diff --check HEAD~1..HEAD`
- `target/debug/yoi ticket doctor`
- `./tickets.sh doctor`
- `nix build .#yoi --no-link`
External review approved with no requested changes.
`migrate-ticket-storage-to-yoi-tickets` can proceed next.
+78
View File
@@ -0,0 +1,78 @@
<!-- event: create author: tickets.sh at: 2026-06-05T20:30:06Z -->
## Created
Created by tickets.sh create.
---
<!-- event: plan author: hare at: 2026-06-05T21:10:22Z -->
## Plan
Preflight result: `implementation-ready` with transitional root behavior.
`provider = "builtin:yoi_local"` should become the canonical backend spelling now, but this ticket must not move records yet. Until `migrate-ticket-storage-to-yoi-tickets` lands, missing config should continue to resolve the active root to `<workspace>/work-items` so existing Ticket tools/CLI remain usable.
Implementation should add provider parsing/diagnostics and update active docs/examples, while leaving storage migration and `tickets.sh` removal to follow-up tickets.
Detailed delegation intent is recorded in `artifacts/delegation-intent.md`.
---
<!-- event: review author: hare at: 2026-06-05T21:26:56Z status: approve -->
## Review: approve
External reviewer approved the implementation.
Review summary:
- No blocking issues found.
- `provider = "builtin:yoi_local"` is supported as the canonical backend spelling.
- Transitional `work-items` storage is preserved.
- Unsupported providers fail closed.
- Legacy `kind = "local"` is retained only as a documented transitional alias.
- Tests/docs were updated sufficiently for this ticket.
---
<!-- event: close author: hare at: 2026-06-05T21:26:56Z status: closed -->
## Closed
Implemented canonical Yoi local Ticket backend provider config.
Final backend config schema:
```toml
[backend]
provider = "builtin:yoi_local"
root = "work-items"
```
`provider = "builtin:yoi_local"` is the canonical spelling. Existing `kind = "local"` config is accepted as a short transitional alias so existing local workspaces/tests do not break during the migration, but docs now show the provider spelling.
Default root behavior intentionally remains `<workspace>/work-items` for missing config and for this transitional provider config. This ticket did not move storage to `.yoi/tickets`; that is owned by the follow-up `migrate-ticket-storage-to-yoi-tickets` ticket.
Implementation commit was merged from branch `work/builtin-yoi-local-ticket-backend-config`.
Validation after merge:
- `cargo test -p ticket config`
- `cargo test -p ticket`
- `cargo test -p pod ticket --lib`
- `cargo test -p yoi ticket`
- `cargo check --workspace --all-targets`
- `cargo fmt --check`
- `git diff --check HEAD~1..HEAD`
- `target/debug/yoi ticket doctor`
- `./tickets.sh doctor`
- `nix build .#yoi --no-link`
External review approved with no requested changes.
`migrate-ticket-storage-to-yoi-tickets` can proceed next.
---