You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(sync): report accurate key counts in --frozen drift message
`deepl sync --frozen` previously reported `Sync drift detected: 0 new,
0 stale keys.` whenever the drift was caused by a newly-added target
locale (the `hasNewLocale` branch) — even though `--dry-run` against
the same state correctly reported the backfill count. The frozen branch
in `processBucket` short-circuited via `driftDetected = true` before
promoting current-status keys missing a target-locale translation into
`newKeysDelta`. The dry-run branch a few lines below already does this
promotion; the frozen path now mirrors it.
The drift message in `displayResult` also dropped `deletedKeys` entirely
even though `processBucket` populates that count correctly under frozen
drift (covered by an existing integration test). The message now uses
the same nonzero-only join pattern as the success-path summary
formatter, surfacing `new`, `stale`, and `deleted` counts when present.
The drift exit code (10) is unchanged. The dry-run output is unchanged.
Tests:
- New integration test exercising the hasNewLocale frozen branch
- Two new unit tests covering the broadened message format
- Full unit (4294) and integration (804) suites pass; lint + type-check
clean
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
### Fixed
11
+
12
+
-**sync**: `deepl sync --frozen` now reports an accurate key count when drift is caused by a newly-added target locale. Previously the message read `Sync drift detected: 0 new, 0 stale keys.` because the frozen branch in `processBucket` short-circuited before promoting current-status keys missing a target-locale translation into `newKeys` — even though `--dry-run` against the same state correctly reported the backfill count. The drift exit code (10) is unchanged. The drift message now also surfaces `deletedKeys` and only mentions nonzero categories, mirroring the success-path summary format.
0 commit comments