#1 [high] PR 79 facts: scope vs description
PR #79 (efegokdemir) "fix(heliopause): fall back when no-replace rename is unsupported", claims "Fixes #54". Actual diff (pr_files): 7 files, +468/-21, not the single-file fallback the description implies:
- heliopause/src/export/archive.rs +139/-1:
install_blob_after_rename_error(archive.rs:471-486): on EINVAL/ENOTSUP doesfs::hard_link(temporary, destination)and returns Ok; EEXIST propagates as AlreadyExists; other errors preserved. Caller heliopause/src/export/blob.rs:194-224 owns temp cleanup (remove_temporary at :216 tolerates NotFound), matching original-el8's earlier review request to drop the?on unlink (done: no unlink inside helper). - heliopause/src/export/binding.rs +91/-20: new
capture_with_ownershelper (binding.rs:97-118) + new pyfunctionexport_preflight_directory(binding.rs:120-124); preflight moved inside the capture closure (binding.rs:33-36) for non-sources requests. - heliopause/src/export/core.rs +3: preflight in publish_payload when !cache_only && form=="directory" (core.rs:708-710).
- helios/src/core/cache.rs +163/-1: new public
preflight_directory_publication(cache.rs:3621-3708) that creates a probe dir in destination parent, asserts RENAME_NOREPLACE rejects an existing dir, removes probe; wired into Root::export_entry (cache.rs:2358) and Staging::commit_standalone (cache.rs:3125); commit_standalone also movedsynchronize(&self.directory)from before the destination check to after the preflight (cache.rs:3117-3126). - helios/src/core/conversion.rs +2: preflight in unpack_selected (conversion.rs:245).
- ignition/preparation/model_core.py +2: preflight before capture (model_core.py:41-42).
- tests/preparation/test_directory_preflight.py added (68 lines).
#2 [high] Issue 54 content and its two proposed fixes
Issue #54 (mark-yong, CONTRIBUTOR, open, label priority:P2, area:caching area:packaging, bug). ignition export fails at "Scan and copy reachable storage" with RuntimeError: Invalid argument (os error 22) when [paths].package_cache is on mergerfs (FUSE). strace points at install_blob in heliopause/src/export/archive.rs. mergerfs returns EINVAL for renameat2(RENAME_NOREPLACE); last_os_error discards paths so message is opaque. Failure lands after ~20 min of preparation (tuning/compilation/capture).
Issue itself proposes two changes: (1) fall back to link()+unlink() on EINVAL/ENOTSUP keeping EEXIST behavior; (2) preflight before preparation and document the requirement beside docs/multi-host.md same-filesystem rule and docs/package-format-design.md:638. Workaround: use ZFS/ext4.
Note: the issue reporter's own failure point IS the blob path (Scan and copy reachable storage → blob store commit), so the link fallback alone addresses the reported symptom for the blob store.
#3 [high] Verified: preflight half is dead code on CLI + doesn't fail early
Verified against code at PR head 06b9011:
- Preflight is dead on the CLI path.
ignition/cli/serve.py:371is the only production call ofexport_coreand passespath=None(cache-only) →cache_only=True, so model_core.py:41-42 and binding.rs:34-36 never fire fromignition export. Same for host_ranks.py:501combine(None if cache_only else path, ...). Confirmed yatesdr's blocking point #2. - Preflight is per-call, not early: Root::export_entry (cache.rs:2350-2378) and Staging::commit_standalone (cache.rs:3117-3151) are the only sites probed, and both run only at publication, i.e. after capture/staging. So the ~20 min "fail late" complaint in #54 is not addressed by any path the CLI uses.
- Remaining uncovered no-replace renames on main-ish paths: helios/src/core/export.rs:735-749
publish_staged_directory(called from heliopause/src/export/core.rs:1070) and helios/src/core/conversion/edit.rs:250. cache.rs:2358 does cover heliopause/src/export/core.rs:990root.export_entry(...). - Merge conflict confirmed: at main, helios/src/core/conversion.rs:300
unpack_selectedis a thin wrapper overunpack_with(:305); the PR inserts its preflight at conversion.rs:245 inside the old monolithic body → the hunk no longer applies. - Hidden cost: Staging::commit_standalone was changed to create the destination parent (
preflightcallsfs::create_dir_all(parent)) beforesynchronize(&self.directory)and before the real copy/sync, so a failing preflight leaves a new empty parent dir behind. - blob.rs:194-224 caller does own temp cleanup and already tolerates NotFound — the earlier minor issue from original-el8 is fixed; helper does not unlink.
- Probe needs
ring::rand::SystemRandom(cache.rs:3638) for a 16-byte nonce; ring is already a helios dep (helios/Cargo.toml:42) and used elsewhere in cache.rs (import at :38 is digest only).
#4 [high] Maintainer review (yatesdr) + charter mapping
yatesdr review 2026-11-18 CHANGES_REQUESTED (head 06b9011) — three blocking points: (1) conflicts with main in helios/src/core/conversion.rs; (2) directory preflight mostly never runs (serve.py:371 passes path=None; probes at cache.rs:2358/3125 run after staging starts; export.rs:742 and conversion/edit.rs:250 unguarded) and recommends dropping the rest including capture_with_owners; (3) description mismatch — only covers the first commit, wrong about temp removal, should say "Partially fixes #54". Should-fix: unify EINVAL/ENOTSUP vs probe's extra ENOSYS; test at tests/preparation/test_directory_preflight.py monkeypatches sys.modules so it checks call order not behavior, and the renameat2 branch of install_blob has no test; fold fixup commits / rebase, Signed-off-by missing on four commits; document the new requirement beside docs/multi-host.md:275 same-filesystem rule. The maintainer explicitly calls the blob fallback "sound" and cites hard-link precedent at helios/src/core/cache.rs:2583 and :3030. Charter hooks: "Solve the right problem in the right place... Good ideas in the wrong place will be declined"; "Bug fixes need to address the root cause; don't just swallow, skip, or retry an unexplained error (#397)"; "Bring real evidence"; PR descriptor requires 4 parts.
#5 [high] Verdict: worth it with changes (keep blob fallback only)
Verdict: WORTH IT WITH CHANGES — keep the blob fallback, drop the directory-preflight subsystem. Benefit: removes the only hard dependency on renameat2(RENAME_NOREPLACE) for file publication in the export blob store; that is exactly the syscall in #54's strace at "Scan and copy reachable storage". Unblocks export on mergerfs/FUSE package caches (Proxmox LXC + mergerfs homelab, per issue env: kernel 6.17.9-1-pve). Saves a ~20 min preparation pass per attempt for those users; cast skill: none. Precedent: hard-link publication is the norm in this tree (issue #54 lists 8 sites; maintainer cites cache.rs:2583, :3030). Cost: 15 lines of decision logic + ~120 lines of unit tests in heliopause/src/export/archive.rs; runs only on the error path, so no hot-path effect. No durability change: neither renameat2 nor link was followed by a directory fsync for the blobs dir before or after (blob.rs only fsyncs the file at :191). No-clobber preserved because link returns EEXIST. Risk: EINVAL is overloaded (unsupported flag vs invalid arg); masking it would hide a real bug — mitigated because we pass exactly one constant flag and all semantics (EEXIST, other errno) are preserved; clonefile/-forbidden. Simpler alternative to the preflight half: none needed — the blob fallback makes the requirement disappear for blobs, which is cheaper than any probe. Required to merge: rebase (conversion.rs conflict is real: main moved unpack_selected behind unpack_with at conversion.rs:300-305); split out/remove the preflight half (dead on the CLI path, does not fail early, misses export.rs:742 and edit.rs:250); fix description to "Partially fixes #54" + 4-part format; add one seam test through install_blob (mirror preflight_directory_publication_with's injected-rename pattern); unify supported errno set (consider ENOSYS); document the directory-publication requirement at docs/multi-host.md:275 if any directory behaviour remains.
#7 [high] Re-review at 41f1c76a: what changed since the first verdict
Head 41f1c76a (merge of upstream main, 2026-11-27). Same 7 files, +468/-21. Verified at this head:
FIXED by the rebase: the conversion.rs conflict. Preflight now sits inside unpack_with at helios/src/core/conversion.rs:316, i.e. main's wrapper shape (unpack_selected:300 -> unpack_with:305) is preserved. It still runs before payload_files()/verify_stored_data (:318-323) and before the established destination exists: {output} check (:364-366), so Autobot blocker 2 (probe reorders the established error, and creates the parent first via cache.rs:4205 create_dir_all) still stands. Existing test conversion.rs:4244 asserts .contains("destination exists"), which the mapped message "directory export preflight: destination exists" still satisfies.
STILL PRESENT at this head:
- heliopause/src/export/archive.rs:298-313
install_blob_after_rename_error: EINVAL|ENOTSUP only (no ENOSYS),hard_linkthen return Ok, caller owns cleanup. 5 new tests (:438-552) still call the helper directly, soinstall_blob's renameat2 branch (:259-297) is untested;#[cfg(any(target_os = "linux", test))]remains a one-off. - cache.rs:4176-4261
preflight_directory_publication/_with: unchanged (ring::SystemRandom loop :4206-4218,create_dir_all(parent):4205 inside a "reserves nothing" probe, bespoke Unsupported reclassification :4238-4249 accepting EINVAL|ENOTSUP|ENOSYS — inconsistent with the blob fallback's two), non-Linux returns Ok() :4179-4183 (indistinguishable from success). - cache.rs:2804 (Root::export_entry) and :3678 (Staging::commit_standalone) call sites unchanged; commit_standalone still moves
synchronize(&self.directory)from :3670-before to :3679-after the probe. - heliopause/src/export/core.rs:640-642 preflight in publish_payload; heliopause/src/export/binding.rs:33-36 + :120-128 pyfunction + capture_with_owners :97-118; ignition/preparation/model_core.py:41-42 — all unchanged, and
ignition/cli/serve.py:330still passespath=None(sole caller), so those probes stay unreachable fromignition export. - tests/preparation/test_directory_preflight.py unchanged: its second test still dies on "configured core cache" (model_core.py:32-33) before any probe, so it cannot fail on its subject.
- STILL ZERO DOC CHANGES:
mergerfsappears nowhere under docs/. The new requirement (directory publication needs no-replace rename) is undocumented. - Description still says "Fixes #54", "the temporary name is removed" (archive.rs:309 says the caller owns cleanup), and claims "3 tests" while the diff adds 5 Rust tests + a Python file; evidence still rustfmt + git diff --check + a helper harness, and no mergerfs reproduction ("mergerfs was not available").
Remaining unguarded live publisher: helios/src/core/conversion/edit.rs:249-252 (flare edit). Guarded live paths: Root::export_entry (cache+standalone payload export), publish_payload (no-cache directory export), unpack_with (flare convert --form directory --output). commit_standalone's only callers are tests (cache.rs:5011/5017/5132).