Skip to content

fix(desktop): preserve Rewind writer error classification - #9818

Merged
Git-on-my-level merged 2 commits into
mainfrom
fix/rewind-storage-error-classification
Jul 15, 2026
Merged

Git-on-my-level merged 2 commits into
mainfrom
fix/rewind-storage-error-classification

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-up to #9193.

Preserves structured Rewind writer errors when logging writer-start, frame-write, frame-processing, and chunk-flush failures, allowing the existing storage-write classifier to inspect the real wrapped error rather than only an interpolated string.

Root cause and durable guard

Relevant catch paths called logError without the caught error, bypassing established disk-write classification. A narrow wiring regression test covers every affected logging site. This does not suppress or alter unknown AVFoundation failures; writer retry/reset behavior is unchanged.

Verification

  • xcrun swift test --package-path Desktop --filter RewindStorageErrorClassificationTests — 9 passed
  • targeted encoder diagnostics tests — 5 passed
  • desktop test-quality check — passed
  • git diff --check — passed

Review in cubic

Pass caught VideoChunkEncoder/RewindIndexer failures to logError as structured errors so the existing #9193 disk-write classifier can inspect RewindError.storageWriteFailed underlying OS errors.

Tests:
- xcrun swift test --package-path Desktop --filter RewindStorageErrorClassificationTests
- xcrun swift test --package-path Desktop --filter 'VideoChunkEncoderPresentationTimeTests|RewindEncoderDiagnosticsSourceTests'
- python3 scripts/check_desktop_test_quality.py
- make preflight (blocked only because this internal-only local branch has no no-changelog-needed PR label)
@Git-on-my-level Git-on-my-level added the no-changelog-needed Skip desktop changelog enforcement for internal-only changes label Jul 15, 2026
Preserve structured errors when stale, memory-pressure, and power-cadence finalization/flush paths fail so storage classification can inspect their wrapped causes. Keep each existing recovery path running after logging.

Tests: xcrun swift test --package-path Desktop --filter RewindStorageErrorClassificationTests (passed before rebase); python3 scripts/check_desktop_test_quality.py; make preflight.
@Git-on-my-level
Git-on-my-level merged commit c7aa23e into main Jul 15, 2026
21 checks passed
@Git-on-my-level
Git-on-my-level deleted the fix/rewind-storage-error-classification branch July 15, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog-needed Skip desktop changelog enforcement for internal-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant