Repository navigation
refactor: deepen the Task store - #45
Merged
Merged
Conversation
… and remove Commands no longer repeat root discovery, scanning and slug resolution. mv, start and finish share one move path, and the roadmap commands take their slug-to-status lookup from the store. Behavior and output are unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
src/core/store.rswith aTaskStoremodule (find, tasks, lookup, create, move_to, transition, remove). Collision, ambiguity, reserved-directory and missing-Status rules now live behind that interface.mv,startandfinishshare one move path (TaskStore::move_to/transition); the duplicated body incommands/mod.rsis gone.rm,show,edit,newandlistuse the store instead of their own root discovery and scanning.roadmap show,nextandaddtake their slug-to-status lookup fromTaskStore::lookup.slug.rskeepsslugify; scanning and resolution moved to the store. The "backlog" literal for new Tasks lives in the store.deepen-the-task-storeis moved to done.Three sibling refactors (roadmap module, table/JSON output, task document) run in parallel and touch neighbouring files (
commands/roadmap/*,commands/list.rs,commands/new.rs), so small merge conflicts are possible.Verification
cargo fmt --checkcargo clippy --all-targets -- -D warnings -W clippy::pedantic(local rustc 1.99, CI pins 1.98.0)cargo test --locked