Skip to content

fix: store session archives under PI_WEB_DATA_DIR#50

Merged
jmfederico merged 9 commits into
mainfrom
review-issue-48
Jul 13, 2026
Merged

fix: store session archives under PI_WEB_DATA_DIR#50
jmfederico merged 9 commits into
mainfrom
review-issue-48

Conversation

@jmfederico

@jmfederico jmfederico commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • store the session archive index and archived session files under PI_WEB_DATA_DIR, while preserving the existing ~/.pi-web fallback when the variable is unset
  • automatically migrate a complete legacy ~/.pi-web archive on the first eligible session-daemon startup, before PiSessionService, route registration, or listening
  • require an explicitly configured distinct data root, a valid and self-contained legacy archive, and a pristine destination; ambiguous, invalid, partial, or coexisting state is skipped without archive filesystem mutations
  • copy and byte-verify files with exclusive destination creation across filesystem boundaries, rewrite migrated archivePath values while preserving metadata, atomically publish the destination index, and delete legacy archive state only after commit
  • stop startup on pre-commit migration failures, continue from a committed destination when legacy cleanup is incomplete, and leave active Pi session files untouched
  • document PI_WEB_DATA_DIR as the general root for PI WEB-managed state and keep upgrade-specific migration guidance in the patch Changeset

Verification

  • npm run verify — 173 test files passed; 1207 tests passed and 2 skipped
  • npm run changelog:status — patch Changeset recognized
  • git diff --check
  • GitHub CI Verify and package passed on Ubuntu and Windows, including verification, build, and npm package-content checks

Related to #48

@jmfederico jmfederico merged commit 37fba00 into main Jul 13, 2026
2 checks passed
@jmfederico jmfederico deleted the review-issue-48 branch July 13, 2026 19:11
@jmfederico jmfederico mentioned this pull request Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant