ticket: use base32 project record ids
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
# Delegation intent: migrate Ticket storage to `.yoi/tickets`
|
||||
|
||||
## Classification
|
||||
|
||||
`implementation-ready` with repository-record migration risk.
|
||||
|
||||
The prerequisite `builtin-yoi-local-ticket-backend-config` is complete: Ticket backend config now has canonical provider `builtin:yoi_local` while preserving transitional `work-items` storage. This ticket performs the storage move.
|
||||
|
||||
## Intent
|
||||
|
||||
Move the active built-in Yoi local Ticket backend storage from repository-root `work-items/` to `.yoi/tickets/` and make that the default/configured root for the Rust Ticket backend.
|
||||
|
||||
Target active layout:
|
||||
|
||||
```text
|
||||
.yoi/tickets/{open,pending,closed}/<id>/item.md
|
||||
.yoi/tickets/{open,pending,closed}/<id>/thread.md
|
||||
.yoi/tickets/{open,pending,closed}/<id>/artifacts/
|
||||
```
|
||||
|
||||
Target config example:
|
||||
|
||||
```toml
|
||||
[backend]
|
||||
provider = "builtin:yoi_local"
|
||||
root = ".yoi/tickets"
|
||||
```
|
||||
|
||||
## Worktree / branch
|
||||
|
||||
- worktree: `/home/hare/Projects/yoi/.worktree/migrate-ticket-storage-to-yoi-tickets`
|
||||
- branch: `work/migrate-ticket-storage-to-yoi-tickets`
|
||||
|
||||
This ticket is an explicit exception to the normal child-worktree `.yoi` exclusion pattern because the implementation must add/modify tracked files under `.yoi/`. Do not read or edit `.yoi/memory/`; it is ignored generated memory state and is not part of this migration.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Move tracked Ticket records from `work-items/` to `.yoi/tickets/` using git-tracked file moves.
|
||||
- Update `crates/ticket/src/config.rs` defaults so missing Ticket config resolves to `<workspace>/.yoi/tickets`.
|
||||
- Preserve canonical provider behavior from the previous ticket:
|
||||
- `provider = "builtin:yoi_local"` remains the canonical provider;
|
||||
- unsupported providers still fail closed;
|
||||
- transitional `kind = "local"` handling should not become the documented path.
|
||||
- Add or update the project `.yoi/ticket.config.toml` if needed so this repository explicitly configures:
|
||||
|
||||
```toml
|
||||
[backend]
|
||||
provider = "builtin:yoi_local"
|
||||
root = ".yoi/tickets"
|
||||
```
|
||||
|
||||
- Update code/docs/tests that refer to `work-items/` as the active backend root.
|
||||
- Update `tickets.sh` only as a temporary compatibility/maintainer shim if it remains present after this ticket:
|
||||
- it should operate on `.yoi/tickets` by default after the migration;
|
||||
- its help text must stop claiming `work-items/` is canonical;
|
||||
- keep `WORK_ITEMS_DIR` override if useful for recovery/back-compat.
|
||||
- Keep Ticket tools, `yoi ticket ...`, TUI role launcher, and Pod Ticket feature registration working against the new root.
|
||||
- Ensure `target/debug/yoi ticket doctor` / built binary equivalent sees the migrated `.yoi/tickets` records.
|
||||
- Ensure `./tickets.sh doctor` works during the transition if `tickets.sh` still exists in this ticket.
|
||||
|
||||
## Non-goals
|
||||
|
||||
- Removing `tickets.sh`; that is the next ticket.
|
||||
- Rewriting historical thread text/artifacts merely because they mention `work-items/`.
|
||||
- Migrating generated memory, workflows, Pod sessions, or non-Ticket state.
|
||||
- Changing Ticket role profile mappings, workflows, role launcher semantics, or TUI UI.
|
||||
- External Ticket provider support.
|
||||
|
||||
## Current code map
|
||||
|
||||
- `crates/ticket/src/config.rs`
|
||||
- Default root currently remains `work-items`; change to `.yoi/tickets`.
|
||||
- Tests should be updated for the new default and explicit config root.
|
||||
- `crates/pod/src/feature/builtin/ticket.rs`
|
||||
- Uses `TicketConfig::load_workspace(...)` and `config.backend.root`; verify diagnostics/root handling remain correct.
|
||||
- `crates/yoi/src/ticket_cli.rs`
|
||||
- Uses Ticket config/backend root for `yoi ticket ...`; verify CLI commands against migrated storage.
|
||||
- `tickets.sh`
|
||||
- Still hardcodes `WORK_ITEMS_DIR=${WORK_ITEMS_DIR:-work-items}` and help text; update for transition or document if intentionally unsupported.
|
||||
- `docs/development/work-items.md`
|
||||
- Update active user documentation to `.yoi/tickets` and `yoi ticket`; `tickets.sh` should remain maintainer/transition-only until removal.
|
||||
- `AGENTS.md` / project instructions references may still say `work-items/` is authoritative. Update active instructions if in scope so future agents do not mutate the wrong path.
|
||||
|
||||
## Migration cautions
|
||||
|
||||
- Do not create two active mutable roots. After migration, `.yoi/tickets` is active; `work-items/` should not remain as a second live backend.
|
||||
- Do not leave open tickets split between old and new roots.
|
||||
- Do not mass-rewrite old ticket thread prose solely for path hygiene.
|
||||
- Verify lock-file behavior does not leave `.ticket-backend.lock` in the old root.
|
||||
- Since the migration moves the ticket records themselves, expect the current ticket directory to move from `work-items/open/...` to `.yoi/tickets/open/...` in the implementation commit.
|
||||
|
||||
## 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 if still present
|
||||
|
||||
Run `nix build .#yoi --no-link` if feasible.
|
||||
|
||||
Also manually check:
|
||||
|
||||
- no active Ticket records remain under `work-items/` unless intentionally retained as a compatibility notice/stub;
|
||||
- `.yoi/tickets/open`, `.yoi/tickets/pending`, and `.yoi/tickets/closed` contain the migrated records;
|
||||
- new `yoi ticket create` creates under `.yoi/tickets` in a scratch temp workspace or controlled test fixture, not `work-items`.
|
||||
|
||||
## Completion report
|
||||
|
||||
Report:
|
||||
|
||||
- worktree path / branch;
|
||||
- commit hash;
|
||||
- final storage root and config behavior;
|
||||
- whether `.yoi/ticket.config.toml` was added/updated;
|
||||
- what happened to `work-items/`;
|
||||
- whether `tickets.sh` was updated and how;
|
||||
- docs/tests updated;
|
||||
- validation results;
|
||||
- whether `remove-tickets-sh` can proceed.
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
title: "Migrate Ticket storage to .yoi/tickets"
|
||||
state: "closed"
|
||||
created_at: "2026-06-05T20:30:06Z"
|
||||
updated_at: "2026-06-05T21:51:58Z"
|
||||
---
|
||||
|
||||
## Background
|
||||
|
||||
The active Ticket storage should move from top-level `work-items/` to `.yoi/tickets/` so Yoi project orchestration state lives under `.yoi/` with workflows and Ticket config.
|
||||
|
||||
This is a project-record migration. Preserve all existing Ticket ids, thread history, artifacts, and resolutions.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Move active storage:
|
||||
|
||||
```text
|
||||
work-items/open/ -> .yoi/tickets/open/
|
||||
work-items/pending/ -> .yoi/tickets/pending/
|
||||
work-items/closed/ -> .yoi/tickets/closed/
|
||||
```
|
||||
|
||||
- Use `git mv` or equivalent tracked moves so history remains inspectable.
|
||||
- Update code defaults/tests/docs/workflows to refer to `.yoi/tickets` as active storage.
|
||||
- Update `.yoi/ticket.config.toml` examples/defaults to `root = ".yoi/tickets"`.
|
||||
- Update worktree workflow guidance if necessary: child worktrees still exclude `.yoi`; Ticket mutation remains main-workspace/orchestrator authority.
|
||||
- Ensure `.yoi/tickets` is tracked project state, not ignored generated memory.
|
||||
- Adjust `.gitignore` if needed so `.yoi/tickets`, `.yoi/workflow`, `.yoi/knowledge`, and `.yoi/ticket.config.toml` can be tracked while generated `.yoi/memory` remains ignored.
|
||||
- Do not rewrite historical thread/artifact body references unless they are current docs/config paths. Historical mentions of `work-items/` may remain as history.
|
||||
|
||||
## Non-goals
|
||||
|
||||
- Removing `tickets.sh`; handled later.
|
||||
- Changing Ticket ids/slugs/status semantics.
|
||||
- External tracker migration.
|
||||
- Scheduler/lease/queue automation.
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- All active Ticket records are under `.yoi/tickets/`.
|
||||
- Top-level `work-items/` no longer exists as active storage.
|
||||
- `yoi ticket list/show/doctor` works against `.yoi/tickets/`.
|
||||
- Ticket tools and TUI role actions use `.yoi/tickets/` through configured backend root.
|
||||
- Documentation no longer tells users to use `work-items/` as active storage.
|
||||
- `git status` shows intentional tracked moves, not delete/recreate loss of records.
|
||||
- Validation passes:
|
||||
- `yoi ticket doctor`
|
||||
- transitional `./tickets.sh doctor` only if still present and intentionally updated;
|
||||
- `cargo check --workspace --all-targets`;
|
||||
- `cargo fmt --check`;
|
||||
- `git diff --check`.
|
||||
|
||||
## Dependency
|
||||
|
||||
Prefer after:
|
||||
|
||||
- `yoi-ticket-cli-parity`
|
||||
- `builtin-yoi-local-ticket-backend-config`
|
||||
@@ -0,0 +1,39 @@
|
||||
Migrated active Yoi local Ticket storage from repository-root `work-items/` to `.yoi/tickets/`.
|
||||
|
||||
Final storage/config behavior:
|
||||
|
||||
```toml
|
||||
[backend]
|
||||
provider = "builtin:yoi_local"
|
||||
root = ".yoi/tickets"
|
||||
```
|
||||
|
||||
- Missing Ticket config now defaults to `<workspace>/.yoi/tickets`.
|
||||
- `provider = "builtin:yoi_local"` remains the canonical provider spelling.
|
||||
- Legacy `kind = "local"` remains only a transitional alias and is not documented as the active path.
|
||||
- Tracked Ticket records were moved to `.yoi/tickets/{open,pending,closed}/...`.
|
||||
- `work-items/` now contains only a legacy README notice and is not a live mutable backend.
|
||||
- `.yoi/ticket.config.toml` was added for this repository.
|
||||
- `.yoi/memory/` was not migrated or touched.
|
||||
- `tickets.sh` remains only as a transitional maintainer shim and now defaults to `.yoi/tickets`; `WORK_ITEMS_DIR` remains available for one-off legacy/recovery checks.
|
||||
- The later workspace panel UI design update from `develop` was merged into the migration branch before final merge, so the design ticket content is preserved under `.yoi/tickets`.
|
||||
|
||||
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`
|
||||
- `cargo build -p yoi`
|
||||
- `target/debug/yoi ticket doctor`
|
||||
- `./tickets.sh doctor`
|
||||
- scratch workspace `target/debug/yoi ticket create` creates under `.yoi/tickets` and does not create `work-items`
|
||||
- `nix build .#yoi --no-link --print-out-paths`
|
||||
|
||||
A first post-merge attempt to run `target/debug/yoi ticket doctor` failed because the binary was stale and still expected the old config schema; rebuilding with `cargo build -p yoi` fixed it. This was a local validation-order issue, not a source failure.
|
||||
|
||||
External review approved with no requested changes.
|
||||
|
||||
`remove-tickets-sh` can proceed next.
|
||||
@@ -0,0 +1,109 @@
|
||||
<!-- 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:28:37Z -->
|
||||
|
||||
## Plan
|
||||
|
||||
Preflight result: `implementation-ready` with repository-record migration risk.
|
||||
|
||||
The provider-config prerequisite is complete. This ticket now owns the active storage move from `work-items/` to `.yoi/tickets/` and should make `.yoi/tickets` the default/configured built-in Yoi local backend root.
|
||||
|
||||
Important boundaries:
|
||||
- no generated memory migration;
|
||||
- do not read or edit `.yoi/memory/`;
|
||||
- do not remove `tickets.sh` in this ticket, but update it as a transitional maintainer shim if it remains present;
|
||||
- do not mass-rewrite historical thread prose solely because it mentions `work-items/`.
|
||||
|
||||
Detailed delegation intent is recorded in `artifacts/delegation-intent.md`.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: hare at: 2026-06-05T21:43:54Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Implemented the local Ticket storage migration to `.yoi/tickets/`.
|
||||
|
||||
- Moved tracked `work-items/{open,pending,closed}` records to `.yoi/tickets/{open,pending,closed}`.
|
||||
- Added `.yoi/ticket.config.toml` with `provider = "builtin:yoi_local"` and `root = ".yoi/tickets"`.
|
||||
- Updated default config resolution, Pod feature fallback, CLI tests/help, docs, and the transitional `tickets.sh` shim.
|
||||
- Left `work-items/README.md` as a non-active compatibility notice only.
|
||||
- Validated with the requested cargo tests/checks, both doctors, scratch default-create check, and `nix build .#yoi --no-link`.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: review author: hare at: 2026-06-05T21:51:58Z status: approve -->
|
||||
|
||||
## Review: approve
|
||||
|
||||
External reviewer approved the implementation at branch head `9d142ec`.
|
||||
|
||||
Review summary:
|
||||
- Active Ticket records moved under `.yoi/tickets/`.
|
||||
- `work-items/` is reduced to a non-active legacy README and is not a second mutable root.
|
||||
- Missing config/default root resolves to `<workspace>/.yoi/tickets`.
|
||||
- `.yoi/ticket.config.toml` uses `provider = "builtin:yoi_local"` and `root = ".yoi/tickets"`.
|
||||
- `tickets.sh` defaults to `.yoi/tickets` as a transitional shim.
|
||||
- Rust Ticket CLI/tools and Pod feature preserve config-root behavior and fail-closed diagnostics.
|
||||
- `.yoi/memory/` was not migrated or touched.
|
||||
- The latest workspace panel design ticket update from `develop` was preserved after migration.
|
||||
|
||||
No changes requested.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: close author: hare at: 2026-06-05T21:51:58Z status: closed -->
|
||||
|
||||
## Closed
|
||||
|
||||
Migrated active Yoi local Ticket storage from repository-root `work-items/` to `.yoi/tickets/`.
|
||||
|
||||
Final storage/config behavior:
|
||||
|
||||
```toml
|
||||
[backend]
|
||||
provider = "builtin:yoi_local"
|
||||
root = ".yoi/tickets"
|
||||
```
|
||||
|
||||
- Missing Ticket config now defaults to `<workspace>/.yoi/tickets`.
|
||||
- `provider = "builtin:yoi_local"` remains the canonical provider spelling.
|
||||
- Legacy `kind = "local"` remains only a transitional alias and is not documented as the active path.
|
||||
- Tracked Ticket records were moved to `.yoi/tickets/{open,pending,closed}/...`.
|
||||
- `work-items/` now contains only a legacy README notice and is not a live mutable backend.
|
||||
- `.yoi/ticket.config.toml` was added for this repository.
|
||||
- `.yoi/memory/` was not migrated or touched.
|
||||
- `tickets.sh` remains only as a transitional maintainer shim and now defaults to `.yoi/tickets`; `WORK_ITEMS_DIR` remains available for one-off legacy/recovery checks.
|
||||
- The later workspace panel UI design update from `develop` was merged into the migration branch before final merge, so the design ticket content is preserved under `.yoi/tickets`.
|
||||
|
||||
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`
|
||||
- `cargo build -p yoi`
|
||||
- `target/debug/yoi ticket doctor`
|
||||
- `./tickets.sh doctor`
|
||||
- scratch workspace `target/debug/yoi ticket create` creates under `.yoi/tickets` and does not create `work-items`
|
||||
- `nix build .#yoi --no-link --print-out-paths`
|
||||
|
||||
A first post-merge attempt to run `target/debug/yoi ticket doctor` failed because the binary was stale and still expected the old config schema; rebuilding with `cargo build -p yoi` fixed it. This was a local validation-order issue, not a source failure.
|
||||
|
||||
External review approved with no requested changes.
|
||||
|
||||
`remove-tickets-sh` can proceed next.
|
||||
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user