storkit: create 457_bug_store_json_created_at_project_root_instead_of_inside_storkit

This commit is contained in:
dave
2026-04-02 13:15:04 +00:00
parent 13e3bd00f1
commit 46d09d4d45
@@ -0,0 +1,29 @@
---
name: "store.json created at project root instead of inside .storkit/"
---
# Bug 457: store.json created at project root instead of inside .storkit/
## Description
In main.rs, JsonFileStore is initialised with a hardcoded relative path `PathBuf::from("store.json")`, which creates the file in whatever directory the process was started from (typically the project root). It should live inside `.storkit/` alongside other runtime state files. The scaffold .gitignore also lists `store.json` as a root-level pattern rather than `.storkit/store.json`, and the scaffold comment/entries array in scaffold.rs explicitly lists `store.json` as a root-level file to ignore — both need updating.
## How to Reproduce
1. Run storkit in any project directory. 2. Observe that store.json is created at the project root rather than inside .storkit/.
## Actual Result
store.json is created at the working directory root, polluting the project root and not being gitignored by the scaffold-generated .gitignore unless the user happens to have a catch-all pattern.
## Expected Result
store.json is created at project_root/.storkit/store.json. The scaffold-generated .gitignore ignores .storkit/store.json. The scaffold comment and entries array in scaffold.rs no longer list store.json as a root-level file.
## Acceptance Criteria
- [ ] main.rs initialises JsonFileStore at project_root.join(".storkit").join("store.json") instead of PathBuf::from("store.json")
- [ ] scaffold.rs .gitignore entries updated: store.json root entry removed, .storkit/store.json added
- [ ] scaffold.rs comment on line ~333 updated to reflect store.json is no longer at the root
- [ ] wizard_tools.rs filter for store.json updated to match the new path if needed
- [ ] Existing deployments with a root-level store.json are not broken (storkit migrates or falls back gracefully)