Conversation
Unix no-replace publication used linkat followed by unlinkat, which briefly leaves the entry with two links. A concurrent reader correctly rejects that under the singly-linked-file guard, so identical concurrent tool-media publications produced different metadata (tool_media_publication_is_immutable_and_replay_preserves_manifest on macOS CI). Publish with the native exclusive rename (renameatx_np RENAME_EXCL on Apple, renameat2 RENAME_NOREPLACE on Linux/Android) so the entry is singly linked the instant it becomes visible. No-overwrite semantics, fd-relative confinement and the hard-link guard are unchanged. Where the kernel, filesystem or platform lacks exclusive rename (EINVAL/ENOSYS/ENOTSUP), degrade to the old link+unlink path instead of failing; that known limitation is documented at the fallback. Evidence: - 18 passed, 0 failed (13,226 skipped): four new Unix publication tests, the tool-media test above, and artifact/Fleet artifact and tool-media artifact publication tests. - Before/after: the new concurrent-publication test fails against the previous linkat implementation (0 passed, 1 failed; readers hit the hard-link guard) and passes with this change. - TUI all-target/all-feature Clippy with CI flags and fmt passed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unix no-replace publication used linkat followed by unlinkat, which
briefly leaves the entry with two links. A concurrent reader correctly
rejects that under the singly-linked-file guard, so identical concurrent
tool-media publications produced different metadata
(tool_media_publication_is_immutable_and_replay_preserves_manifest on
macOS CI).
Publish with the native exclusive rename (renameatx_np RENAME_EXCL on
Apple, renameat2 RENAME_NOREPLACE on Linux/Android) so the entry is
singly linked the instant it becomes visible. No-overwrite semantics,
fd-relative confinement and the hard-link guard are unchanged. Where
the kernel, filesystem or platform lacks exclusive rename
(EINVAL/ENOSYS/ENOTSUP), degrade to the old link+unlink path instead of
failing; that known limitation is documented at the fallback.
Evidence:
tests, the tool-media test above, and artifact/Fleet artifact and
tool-media artifact publication tests.
previous linkat implementation (0 passed, 1 failed; readers hit the
hard-link guard) and passes with this change.
Refs feat(web): move legal/terms and legal/privacy onto the dictionary spine (#5337) #6417 (an earlier macOS run of that PR hit this race; it is not caused by that PR).
🤖 Generated with Claude Code