Skip to content

Keep shard output leaf exclusive - #499

Merged
Anionix merged 1 commit into
mainfrom
codex/bug-496-output-race
Jul 24, 2026
Merged

Anionix merged 1 commit into
mainfrom
codex/bug-496-output-race

Conversation

@Anionix

@Anionix Anionix commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Fixes #496

Follow-up to merged PR #477.

Contract

  • Create every missing output ancestor explicitly with requested mode 0700.
  • Create the final shard output leaf exclusively.
  • Reject a final leaf created after merge validation and before publication.
  • Copy or publish no files into a rejected competing destination.

Verification

  • Regression: a race-created final leaf raises FileExistsError and remains empty.
  • Focused shard suite: 16 passed.
  • Ruff: PASS.
  • git diff --check: PASS.
  • Targeted correctness/scope review: PASS.
  • Lean: NO_LEAN; atomic directory creation is an executable Python/OS boundary.

Exact SHA: ad3e8c33d44426e69167db7dbedfbe08f8bd8ea4

Primary source:

@Anionix
Anionix enabled auto-merge July 24, 2026 06:13
@Anionix
Anionix merged commit c727704 into main Jul 24, 2026
6 checks passed
@Anionix
Anionix deleted the codex/bug-496-output-race branch July 24, 2026 06:21
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.

Reject race-created shard output destination

1 participant