Skip to content

fix(import): keep import publication out of the watcher; ignore atomic staging siblings - #158

Merged
MrScripty merged 1 commit into
mainfrom
fix/import-watcher-race
Nov 13, 2026
Merged

MrScripty merged 1 commit into
mainfrom
fix/import-watcher-race

Conversation

@MrScripty

Copy link
Copy Markdown
Owner

Summary

Fixes the intermittent Windows failures in acquired_gguf_vision::moved_primary_requires_current_acknowledgement_and_owned_file_bindings and acquired_model_bridge::safetensors_single_file_is_genuine_and_receipt_bound ("download recovery path is outside its verified filesystem authority").

Root cause: import publication renamed its stage into place without the owned-move watcher suppression that merge and migration use. Windows directory notifications are recursive, so the watcher saw the publication as an external change. It then ran a full reclassification right after the import released the root. That pass atomically rewrote metadata.json, and the brief metadata.json.<uuid>.<n>.tmp sibling showed up as an unbound entry in the payload proof.

  • importer/staging.rs: call notify_owned_move_destination before publishing. Two notifier-count tests were updated (2 → 3 calls).
  • import_custody.rs / metadata/atomic.rs: payload observation skips only <root document>.<uuid>.<u8>.tmp regular files at the model root, including ones that have already vanished. Lookalikes, staging-style names of payload files, out-of-range attempts and directories are still refused. A new unit test covers each case.

Verification

  • On diagnostic branch fix/windows-recovery-authority, the Windows Rust release job was green, and 8 Windows stress iterations of the acquired_* tests were all green.
  • Linux: the full pumas-library suite, clippy -D warnings, and the Windows cross-check all pass.

🤖 Generated with Claude Code

…c staging siblings

Import publication now records its destination with the owned-move
watcher suppression before renaming into place, so the watcher (natively
recursive on Windows) no longer triggers a full reclassification that
races the import's own finalization. Payload proof also skips exactly the
<document>.<uuid>.<attempt>.tmp sibling of an atomic root-document
replacement; lookalikes, payload staging names and directories are still
refused.

Fixes the intermittent Windows 'download recovery path is outside its
verified filesystem authority' failures in the acquired_* tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d2f0d737-eec6-4eae-b980-30fb4a89a007
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@MrScripty
MrScripty merged commit b5f31c5 into main Nov 13, 2026
33 checks passed
@MrScripty
MrScripty deleted the fix/import-watcher-race branch November 13, 2026 23:06
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