Skip to content

feat: add atomic output writes and clean cancellation#19

Merged
Monotox merged 1 commit into
mainfrom
feat/atomic-output-writes-and-cancellation
Jun 1, 2026
Merged

feat: add atomic output writes and clean cancellation#19
Monotox merged 1 commit into
mainfrom
feat/atomic-output-writes-and-cancellation

Conversation

@Monotox

@Monotox Monotox commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

Route every on-disk write through a temp-file-then-os.replace helper so a killed or interrupted run never leaves a truncated artifact; the destination is either the prior content or absent. Add CliExitCode.CANCELLED (14) and a SIGTERM/SIGINT handler installed by the console-script entrypoint so an interrupt produces a defined exit code instead of the shell default.

Test Plan

  • uv run pytest passes
  • uv run ruff check . passes
  • Documentation updated, if user-facing behavior changed
  • Golden fixtures updated, if a public JSON or Markdown contract changed

Contract Impact

  • No public contract surfaces changed
  • Public contract changes are intentional and versioned per docs/VERSIONING_POLICY.md

Route every on-disk write through a temp-file-then-os.replace helper so a
killed or interrupted run never leaves a truncated artifact; the destination
is either the prior content or absent. Add CliExitCode.CANCELLED (14) and a
SIGTERM/SIGINT handler installed by the console-script entrypoint so an
interrupt produces a defined exit code instead of the shell default.
@Monotox Monotox merged commit b3158be into main Jun 1, 2026
4 checks passed
@Monotox Monotox deleted the feat/atomic-output-writes-and-cancellation branch June 1, 2026 04:53
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