Skip to content

fix: detect concurrent destination changes - #36

Merged
cervantesh merged 2 commits into
mainfrom
issue-34-destination-concurrency-guard
Jul 16, 2026
Merged

fix: detect concurrent destination changes#36
cervantesh merged 2 commits into
mainfrom
issue-34-destination-concurrency-guard

Conversation

@cervantesh

Copy link
Copy Markdown
Contributor

Summary

  • capture destination existence, file identity, byte length, and SHA-256 digest when loading filesystem edits
  • revalidate immediately before atomic replacement and return stable [E_CONCURRENT_DESTINATION] recovery output without overwriting detected concurrent state
  • add deterministic fixtures for same-size/restored-timestamp content changes, same-content inode replacement, deletion, and missing-to-created races
  • update generated dist, README, architecture/operations guidance, and changelog

Concurrency guarantee

This is best-effort optimistic detection, not compare-and-swap. A residual race remains between final revalidation and rename; the documentation explicitly avoids a false CAS guarantee.

Validation

  • npm run check
  • npm run build
  • npm run test:coverage (87.45% lines, 85.00% branches overall)
  • npm run verify:package (28 packed files)
  • npm audit --audit-level=high (0 vulnerabilities)
  • git diff --check
  • built distribution import smoke check

Closes #34

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6275ecbcf6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/filesystem-client.ts
@cervantesh
cervantesh merged commit 987e828 into main Jul 16, 2026
6 checks passed
@cervantesh
cervantesh deleted the issue-34-destination-concurrency-guard branch July 16, 2026 00:22
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.

Detect destination changes between classification and atomic replacement

1 participant