# Changelog

All notable changes to `@jachy/pi-git-sync` are documented here.

## [0.7.0] - 2026-08-11

### Added

- Read-only synchronization plans with execution-time SHA-256 revalidation before write, push, apply, or package side effects.
- Per-path current-device/shared-remote conflict decisions while preserving non-conflicting changes and device recovery branches.

### Changed

- Promoted the `0.7.0-beta.1` synchronization behavior to the stable `latest` channel for maintainer personal multi-device use.

### Compatibility

- Public commands, `pi-sync.json` schema v2, local state schema v3, package approval, secret scanning, backups, and device recovery branches are unchanged.
- No repository or state migration is required. Upgrade the extension, run `/pisync status`, then run `/pisync` normally.

### Validation scope

- `0.7.0` is released for maintainer personal multi-device use after the full automated release gate and cross-platform CI smoke.
- Closed-Beta activation, retention, and broader real-user reliability targets are deferred to `1.0.0` and are not asserted by this release.

## [0.7.0-beta.1] - 2026-08-11

### Added

- Read-only synchronization plans that summarize local file effects, remote commits, package changes, and recovery state before high-impact synchronization begins.
- SHA-256 plan fingerprints and execution-time revalidation, so a stale confirmation is rejected before any write, push, apply, or package side effect.
- Per-path conflict decisions that allow different conflicted files to use current-device or shared-remote content while preserving non-conflicting changes and the device recovery branch.
- A project release workflow skill with separate beta/formal dist-tag policy, mandatory gates, explicit publication approval, and partial-release recovery guidance.

### Changed

- `/pisync` now presents the synchronization plan and asks for confirmation before high-impact work; cancellation and non-interactive use remain fail-safe.
- Conflict handling now shows each affected path and a final decision summary before applying selected resolutions.

### Fixed

- The legacy publish helper now reuses an unpublished package version instead of incrementing past it.
- Updated release/test dependency overrides to patched `brace-expansion` 5.0.9, `undici` 8.9.0, and `nanoid` 3.3.17, removing known high-severity findings from the full audit.

### Compatibility

- Public commands, `pi-sync.json` schema v2, local state schema v3, package approval, secret scanning, backups, and device recovery branches are unchanged.
- No repository or state migration is required. Upgrade the extension, run `/pisync status`, then run `/pisync` normally.

### Beta validation and known limitations

- This beta is intended to validate first-time two-device setup, confirmation clarity, conflict recovery, and macOS/Windows/Linux behavior before `0.7.0` becomes `latest`.
- High-impact synchronization requires an interactive Pi UI confirmation; non-interactive sessions stop without applying side effects.
- The redesigned status panel, synchronization-scope management, and operation history remain deferred to v0.8.
- Report issues at <https://github.com/jachy-h/pi-git-sync/issues> with the version, operating system, reproduction steps, and sanitized output. Do not include repository credentials, tokens, or synchronized file contents.

## [0.6.3] - 2026-08-04

### Added

- Footer synchronization status and a bilingual README generated for newly initialized configuration repositories.
- Main-branch and publication checks for the npm release workflow.

### Changed

- Hardened the extension operation-runner lifecycle and improved unsupported `/pisync` argument guidance.
- Clarified multi-device setup and daily-use documentation.

### Fixed

- Repository permission failures now explain the required access more clearly.

## [0.6.2] - 2026-07-31

### Changed

- Reworked the README quick start around the unified first-machine and additional-machine `/pisync` flow.

## [0.6.1] - 2026-07-30

### Fixed

- Recovered interrupted first synchronization correctly on Windows.
- Pruned nested synchronization trees safely and added timeout regression coverage.

## [0.6.0] - 2026-07-30

### Changed

- Reorganized production modules into shallow `orchestration`, `sync`, `system`, and `extension` responsibility directories.
- Moved complete pull, push preparation/execution, and confirmed conflict-resolution orchestration into dedicated lock-free flows; the command façade retains lifecycle, lock, and Pi-specific dependency boundaries.
- Consolidated setup dependencies behind a narrow `SetupFlowDependencies` interface and made unreferenced repository-path helpers private.

### Compatibility

- No public command, `pi-sync.json` schema v2, local state schema v3, device-branch, backup, package-approval, or secret-scan behavior change.
- No repository migration is required. Upgrade the extension, run `/pisync status`, then run `/pisync` normally.

## [0.5.0] - 2026-07-29

### Added

- Explicit lock-free setup, pull, push, apply, and extension operation-runner phase boundaries.
- Core lifecycle contracts for setup preflight/onboarding, lock contention, stale preparation, rollback/retry, pending recovery, and pull/push phase outcomes.
- Coverage gates for command orchestration and the extracted extension operation runner.

### Changed

- `PiSyncCommands` now focuses on public façade behavior, lifecycle, lock ownership, phase ordering, and conflict coordination.
- Setup, apply, pull/push Git integration, and extension progress/cancel/watchdog behavior retain their existing public semantics while executing through dedicated modules.
- CI runs core coverage and the two-device E2E suite separately, so E2E executes once per `test:ci` invocation.

### Compatibility

- No public command, config schema v2, state schema v3, device-branch, backup, package-approval, or secret-scan behavior change.
- See [the upgrade guide](docs/upgrade.md) for the v0.5 verification steps.

## [0.4.0] - 2026-07-28

### Added

- Structured `sync_conflict` results with shared/device branch OIDs and affected paths.
- Four-way conflict UI: agent handoff, manual abort, current-device selection, or shared-remote selection.
- Safe automatic path-level resolution with fresh fetch/ref/worktree validation, normal merge commits, validation, secret scanning, backup/apply, and no force push.
- Current-device branch retention and modify/delete conflict coverage.

### Changed

- Conflict UI dispatch now uses structured result details rather than message text.
- Conflict resolution Git primitives live in `src/conflict-resolution.ts`.

## [0.3.0] - 2026-07-27

### Added

- Unified `/pisync` setup and synchronization entry point.
- Lifecycle detection for uninitialized, initialized, and broken installations.
- Automatic recovery for legacy pending operations.
- Pull-then-push orchestration with aggregated reload handling.
- Two-device end-to-end coverage for convergence and conflict preservation.

### Changed

- `/pisync status` and `/pisync diff` remain the only public subcommands.
- Removed public write commands: `/pisync init`, `/pisync pull`, `/pisync push`, and
  `/pisync push --continue`.
- Package approval re-enters synchronization after approval so state is revalidated.
- Bootstrap and documentation now use the unified `/pisync` workflow.

### Compatibility

- Existing v0.2.x repositories and state files migrate in place.
- Legacy pending operations are recovered by the next `/pisync` invocation.
- See [the upgrade guide](docs/upgrade.md) for migration and rollback notes.

[0.7.0]: https://github.com/jachy-h/pi-git-sync/releases/tag/v0.7.0
[0.7.0-beta.1]: https://www.npmjs.com/package/@jachy/pi-git-sync/v/0.7.0-beta.1
[0.6.3]: https://github.com/jachy-h/pi-git-sync/releases/tag/v0.6.3
[0.6.2]: https://www.npmjs.com/package/@jachy/pi-git-sync/v/0.6.2
[0.6.1]: https://www.npmjs.com/package/@jachy/pi-git-sync/v/0.6.1
[0.6.0]: https://www.npmjs.com/package/@jachy/pi-git-sync/v/0.6.0
[0.5.0]: https://github.com/jachy-h/pi-git-sync/releases/tag/v0.5.0
[0.3.0]: https://github.com/jachy-h/pi-git-sync/releases/tag/v0.3.0
