Skip to content

fix: 🐛 Retry denied Windows file replacements - #81

Merged
oxspan merged 1 commit into
developfrom
feature/58
Nov 12, 2026
Merged

oxspan merged 1 commit into
developfrom
feature/58

Conversation

@oxspan

@oxspan oxspan commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Why

A Windows process holding a capture manifest can make atomic replacement fail with AccessDeniedException, leaving a partial file and an intact previous checkpoint. File and Collector transport failures also shared one ambiguous message.

Refs #58

Changes

  • Retry Windows access-denied atomic replacement up to five total attempts, separated by four 50 ms waits. Share the operation across capture, counter and context stores while preserving atomic moves and existing locks.
  • Preserve committed files and propagate persistent or unrelated failures. Interruption aborts the retry and preserves the interrupt flag.
  • Distinguish local file errors from Collector transport errors without changing error codes, exit codes or capture formats.
  • Explain valid-manifest recovery in the English and Korean quickstarts and recovery guide.

Validation

  • Linux: full test suite, coverage and release input checks passed. XML reports 234 tests with no failures/errors/skips; one entry represents an empty Windows-only specification. Coverage: 95.15% line, 80.06% branch.
  • Native Windows JDK 21: three regression tests passed, including transient handle release and real v1/v3 CLI checkpoint failures with preservation and recovery.
  • The Windows retry test failed with AccessDeniedException when retry was removed, then passed after restoring it.
  • Packaged Linux CLI: 30 scenarios passed, including capture/resume, no overwrite, corruption rejection, file diagnostics and existing manifest/envelope compatibility.

Compatibility and limits

Only Windows AccessDeniedException during replacement is retried. It can also indicate permanent permissions problems; persistent denial still fails. The controlled file-handle case is reproduced, but the original intermittent incident and any antivirus/indexer involvement remain unconfirmed. New Windows tests used files in the repository through WSL UNC access; they do not establish NTFS-specific failure frequency. No release is published by this PR.

@github-actions

Copy link
Copy Markdown
Contributor

Linux CI: success · Commit 910bd33

Test results (Linux)

Total Passed Failed Errors Skipped
234 234 0 0 0

Test coverage

Metric Covered / total Coverage Minimum Result
LINE 2098 / 2205 95.15% 90.00% PASS
BRANCH 1245 / 1555 80.06% 80.00% PASS

Includes the test JVM and CLI subprocesses. Excludes optional real-Collector smoke tests.

Workflow logs and report artifacts

Updated on each CI run. Windows checks, when required, are reported separately in the workflow.

@oxspan
oxspan merged commit da33d93 into develop Nov 12, 2026
6 checks passed
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