Project file lifecycle (#25) #71
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
needs-info
needs-triage
question
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/ai-studio!71
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-25-project-file-lifecycle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #25. Part of #24.
What
The tracer bullet for the app:
crates/studio-core,src-tauri).studio-core(no Tauri, no specta).ProjectSessioncreates, opens and closes.studioSQLite files:application_id; a non-studio file is refusedPRAGMA user_versionmigrations embedded in the core, run in one transaction after an online-backup copy to<name>.studio.bak-v<N>; a newer schema is refused and left untouchedjournal_mode=DELETE, leaving a single file at rest<name>.studio.lockwith PID and host, acquired atomically (temp file + hard link); stale same-host locks are taken over<name>.media/folder, ULID keys, content-addressed BLAKE3blobtable with an unused-blob sweep on opendefaults.json(app config dir), copied into theprojectrow and thelighting/reference_category_ordertables at creation and never read againsrc-tauri: thintaurpcadapter with DTOs and a typedCommandError; bindings generated tosrc/lib/bindings.ts(cargo test -p ai-studioregenerates them). The session is closed cleanly on app exit.*.studiopickers), shows the title, the aspect ratio (editable), the path, and a Close button.Decisions to check
test-supportfeature that injects a migration list; that test file hasrequired-features, so a plaincargo testskips it.Known limitations
Testing
cargo test --workspace --features studio-core/test-support: 26 passed (core: lifecycle 12, lock 4, migrations 5, blobs 2; adapter smoke 3).cargo clippy --workspace --all-targets --features studio-core/test-support: clean.bun run check: 0 errors, 0 warnings.bun run buildsucceeds.bun tauri devcheck.