Skip to content

fix(cli): publish Matchstick downloads atomically - #2174

Open
yinbowen-dc wants to merge 1 commit into
graphprotocol:mainfrom
yinbowen-dc:codex/fix-2169-atomic-matchstick-download
Open

yinbowen-dc wants to merge 1 commit into
graphprotocol:mainfrom
yinbowen-dc:codex/fix-2169-atomic-matchstick-download

Conversation

@yinbowen-dc

Copy link
Copy Markdown

Fixes #2169.

Concurrent graph test processes currently write directly into the shared executable cache path. Download to a unique staging directory, close the stream, set executable permissions, then atomically publish the completed inode with a hard link. If another download publishes first, reuse it without truncating/replacing its executable. Staging files are removed on success and failure.

Four filesystem regression tests cover a paused partial download, eight concurrent publishers, an already-published executable, and stream failure cleanup. They pass locally, together with the CLI source TypeScript build and ESLint/Prettier checks. The tests verify publication and cleanup on macOS; the Linux-specific kernel ETXTBSY symptom was not directly reproduced here. Includes a patch changeset.

Prepared with AI assistance.

@changeset-bot

changeset-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d59e793

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphprotocol/graph-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@yinbowen-dc
yinbowen-dc force-pushed the codex/fix-2169-atomic-matchstick-download branch from 7f2d0d4 to d59e793 Compare November 18, 2026 09:27
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.

graph test races on the shared matchstick binary, failing with ETXTBSY

1 participant