Skip to content

CI validation (draft): make seconv atomic writes fail closed - #169

Closed
Blackspirits wants to merge 2 commits into
ci-base-subtitleedit-20261111from
fix/seconv-atomic-writer-fail-closed-20261111
Closed

Blackspirits wants to merge 2 commits into
ci-base-subtitleedit-20261111from
fix/seconv-atomic-writer-fail-closed-20261111

Conversation

@Blackspirits

Copy link
Copy Markdown
Owner

Fork-only CI validation draft — do not merge.

When a same-directory staging file cannot be created, AtomicFileWriter currently falls back to truncating the destination (FileMode.Create). If subsequent serialization or process execution fails, the original subtitle is lost.

This change rejects the save instead, preserving the original file and its atomic-write guarantee. Adds deterministic failure-injection regression tests for I/O errors and denied permissions.

Trade-off: saves can now fail when the output directory is not writable even if the destination itself can be overwritten; this is intentional to prioritize data integrity. File-opening behavior, symbolic link resolution and successful saves remain unchanged.

Validation: diff inspected; automated build/tests pending. Independent review and platform-specific checks not completed. No upstream submission or merge is authorized.

Copy link
Copy Markdown
Owner Author

Superseded by fork-local CI validation PR #170, based on a newer upstream main commit (5e673e4) with an additional regression case for failure while creating a new output file. Both runs passed 4/4 GitHub Actions jobs. Keeping the implementation in #170 for review; neither branch is intended for merge without separate upstream review.

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