PR #79: fix(heliopause): fall back when no-replace rename is unsupported

Raw Markdown for agents: https://autobot.eidonix.com/api/v1/cases/98b1b160-5cba-406d-b254-b43b1b62cbed

Opened by a workflow run, Nov 25, 2026 5:58 AM EST.

screen malicious

Screen Result: All Clear

Evidence: Screening covered the full PR #79 diff (7 files, +468/−22, head 06b9011), the PR description, all three discussion entries (two bot comments and yatesdr's CHANGES_REQUESTED review), the head commit message, and the linked issue #54. Nothing in any of these tries to direct an agent or a reviewer: no "ignore previous instructions"-style text, no instruction addressed to an AI/agent, no attempt to obtain an approval or skip scrutiny, no hidden or obfuscated content. The code changes are a genuine mergerfs robustness fix and contain no shell, network, credential, persistence or exfiltration primitives and no new dependencies.

What was verified directly in the code:

The findings that do exist are ordinary engineering-quality issues, already raised by reviewer yatesdr and the bots: a content conflict with main in helios/src/core/conversion.rs; the directory preflight mostly not firing because ignition/cli/serve.py:371 (not opened) passes path=None; "Fixes" overstating what is fixed; EINVAL/ENOTSUP in the fallback vs ENOSYS in the probe; and a test that checks call order rather than behaviour. None are security-relevant.

Open question: files referenced only via review comments (ignition/cli/serve.py (not opened), helios/src/core/export.rs (not opened), helios/src/core/conversion/edit.rs (not opened), helios/src/package/cache.rs (not opened)) were not individually re-read during screening; nothing indicated malicious content there, and they are untouched by this PR.

Details are in the report below.

Full report · Notes decide malicious: all_clear (100%): No malicious content found

explore

Author: efegokdemir (outside contributor, GitHub association NONE in this repo; 0 merged PRs, 1 other open PR, #147; no Discord handle given) Motivation: On filesystems like mergerfs the kernel call renameat2(RENAME_NOREPLACE) returns EINVAL, which made ignition export die with a bare "Invalid argument (os error 22)" about 20 minutes into a Gemma 4 export (issue #54). The PR makes the blob install fall back to an atomic hard link (which never clobbers an existing file), and — undeclared — adds a directory-publication preflight that rejects such filesystems with an explicit error. Scale: +468 / −22 lines in 7 files Proposal:

Full report · Notes

Value Proposition

Verdict: worth it with changes — keep the blob fallback, drop the directory-preflight half

The PR is really two changes: (a) a ~15-line hard-link fallback for unsupported renameat2(RENAME_NOREPLACE) in install_blob, and (b) a ~450-line directory-publication-preflight subsystem spread over 6 other files. (a) is the right fix in the right place. (b) is dead code on the only CLI path, does not achieve its stated purpose, adds a new public API and a Python binding, and should be removed. Merge (a) after a rebase; do not merge (b).

Why (a) is worth it

Why (b) should be dropped

I verified the maintainer's blocking points against the tree:

  1. The preflight never runs from ignition export. The only production caller, ignition/cli/serve.py:371, passes path=None, so cache_only=True and both the new Python check (ignition/preparation/model_core.py:41-42) and the new binding check (heliopause/src/export/binding.rs:33-36) are unreachable. ignition/preparation/host_ranks.py:501 does the same via combine(None if cache_only else path, ...).
  2. It does not fail early, so it does not fix the cost problem that motivated the issue. The probes at helios/src/core/cache.rs:2358 (Root::export_entry) and :3125 (Staging::commit_standalone) run at publication, after capture, staging and CUDA work — the same place the old error already arrived. The only effect is a better error message.
  3. Coverage is still incomplete. 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 still publish with a bare rename_noreplace and are unguarded. Adding a guard to only some of five call sites produces inconsistent behaviour: some directory exports fail early with "unsupported", others still fail late with os error 22.
  4. It contradicts the charter's "don't reinvent / smallest footprint" rule and duplicates existing structure. The probe creates a random 0700 directory, uses ring::rand::SystemRandom for a nonce (cache.rs:3638), creates source/target inside it, performs a no-replace rename, removes it again, and needs bespoke error reclassification of EINVAL|ENOTSUP|ENOSYS to a strerror string. That is ~70 lines of filesystem self-verification for a bug whose actual fix is 15 lines of link fallback in one function.
  5. It adds a public API and a new Python-visible symbol (export_preflight_directory, heliopause/src/export/binding.rs:120-128) with only one caller, plus a capture_with_owners wrapper (binding.rs:97-118) created solely to host it.
  6. Two unremarked behaviour changes to commit_standalone:
    • The probe calls fs::create_dir_all(parent) (cache.rs:3652) before synchronize(&self.directory) and before the staging copy, so a failing preflight now leaves a new empty parent directory behind.
    • synchronize(&self.directory) was moved from the start of commit_standalone to after the check, so a staging tree is synchronised later than before. Harmless-looking but bootstrapped onto a change unrelated to the bug.
  7. It makes a previously-working configuration fail by fiat. A user happily writing a directory core to a filesystem without RENAME_NOREPLACE would now get a hard refusal with no documented alternative, and the compensating doc change (docs/multi-host.md:275) was requested but not made.
  8. Evidence does not match the description. The body describes only commit one and still says "the temporary name is removed," which moved to the caller; it claims "Fixes #54" when a mergerfs directory export still fails. Tests are also weaker than they look: the five archive.rs test cases call install_blob_after_rename_error directly (including inventing EINVAL to exercise the fallback), so the actual renameat2 branch of install_blob has no test, and tests/preparation/test_directory_preflight.py replaces flare_heliopause, torch and torch.distributed in sys.modules, so it asserts call order rather than behaviour. The capture_with_owners test at binding.rs:1046-1071 is essentially the pre-existing lifetime.rs test again. The PR's own evidence is 3 helper tests, rustfmt and git diff --check — the charter requires the four-part description and real evidence, not a formatter pass.

Conditions for merging

  1. Rebase. The conflict is real: main made unpack_selected a wrapper over unpack_with (helios/src/core/conversion.rs:300-305), so the PR's hunk at conversion.rs:245 no longer applies. Also fold the fixup commits and add Signed-off-by per CONTRIBUTING.md (not opened).
  2. Revert everything except heliopause/src/export/archive.rs — drop preflight_directory_publication and its call sites (helios/src/core/cache.rs, helios/src/core/conversion.rs), the binding and its registration, capture_with_owners, the heliopause/src/export/core.rs and ignition/preparation/model_core.py hooks, and tests/preparation/test_directory_preflight.py.
  3. Add one seam test for install_blob that does not require mergerfs, in the style of preflight_directory_publication_with's injected rename: thread a rename function through install_blob and assert (i) EINVAL installs by link and leaves the destination readable, (ii) an existing destination still reports AlreadyExists, (iii) an unrelated errno is preserved, (iv) the caller removes the temporary.
  4. Unify the fallback errno set and keep it minimal — EINVAL and ENOTSUP as now. Consider ENOSYS (old kernels) only if a supported target needs it; do not silently swallow anything else.
  5. Rewrite the description to the four required parts and say "Partially fixes #54," noting explicitly which filesystems remain unsupported for directory publication and that they still fail with a clear EINVAL.
  6. Separate, optional follow-ups (not blockers here): document that directory core publication requires filesystem no-replace-rename support next to the same-filesystem rule at docs/multi-host.md:275; and improve the error text of rename_noreplace (helios/src/core/cache.rs:3712-3732) to name both paths, which fixes the opacity part of #54 for every call site for a few lines.

Answer to the framing question

The blob fallback is worth making: a genuine bug, a 15-line fix in the function the bug report fingered, no hot-path cost, no new surface, and it deletes a filesystem requirement rather than adding a policy. The rest of the branch is not worth making: it does not run where users invoke the feature, does not make the failure any earlier, leaves two of five publication sites unchanged, and costs roughly 30x the code of the actual fix. Dropping it is the simpler path to the same end.

Full report · Notes Decide Value: yes (99%): This change is worth reviewing: it provides value to the project in line with its charter.

Prose

Verdict: blocking issues

Blocking:

Should fix:

Nits: 5 (preflight doc comment narrower than callers, cache.rs:3621; {EINVAL,ENOTSUP} vs {EINVAL,ENOTSUP,ENOSYS} divergence undocumented, archive.rs:479 vs cache.rs:3687; PR title omits the preflight; repair commits plus a main merge; missing SPDX header in the new test file).

Link: https://github.com/NVIDIA/hyperflare-inference/pull/79

Full report · Notes

Architecture

Verdict: blocking issues

Blocking:

Should fix:

Nits: 1 — heliopause/src/export/binding.rs:97 the capture_with_owners extraction exists only to test the unreachable check.

Link: https://github.com/NVIDIA/hyperflare-inference/pull/79

Full report · Notes

Conventions

Verdict: should-fix issues only

Blocking:

Should fix:

Nits: 5 — missing SPDX header in tests/preparation/test_directory_preflight.py:1 (only file in the directory without one); probe name generation and cleanup re-implement conversion.rs staging_token/unique_staging and the TempDirectory guard (helios/src/core/cache.rs:3653-3707); export_preflight_directory flattens AlreadyExists/Unsupported into RuntimeError contrary to the Python-side FileExistsError convention (binding.rs:120-124); novel #[cfg(any(target_os = "linux", test))] gate leaves dead code off Linux (archive.rs:471); capture_with_owners consolidation touches one of three identical lease/drain blocks (binding.rs:97-118 vs binding.rs:1250-1270, transfer.rs:1221 (not opened)).

Link: https://github.com/NVIDIA/hyperflare-inference/pull/79

Full report · Notes

Simplicity

Verdict: should-fix issues only Blocking:

The PR's fallback in archive.rs is small and well-shaped; the deletable mass is in the second mechanism it adds (a directory-publication preflight) which is written twice at a distance (blob + directory), probes the destination twice per export, reinvents a name generator, and is tested by two self-referential stubs and a chmod that CI as root cannot enforce. No blocking issue: the blob fallback's EEXIST and error-preservation behaviour is correct and tested. Every claim is from reading head 06b9011; I ran no Rust or Python tests, so the one behavioural question I flag as open — whether export_capture now raising PyRuntimeError for all errors breaks Python callers that distinguished ValueError — would be settled by tests/preparation/test_runtime_core.py (not opened).

Full report · Notes

Correctness

Verdict: should-fix issues only Blocking:

Full report · Notes

Subtractive

Verdict: should not be merged — the ~6-line hard-link fallback is the whole fix; delete everything else first.

The change: +468 / −22 lines across 7 files.

Could remove: about 450 lines, in 5 places.

Biggest subtractions:

Left behind: helios/src/core/cache.rs:2371 (export_entry), :3143 (commit_standalone), helios/src/core/export.rs:742 (publish_staged_directory), helios/src/core/conversion.rs:324, edit.rs:250 (not opened) — all still bare rename_noreplace, so #54's default directory export still fails with EINVAL one step later at "Commit core". "Fixes #54" should be "partially fixes" unless the fallback reaches those.

Link: https://github.com/NVIDIA/hyperflare-inference/pull/79

Full report · Notes

Pre Test Report

Pre-test report — PR #79 "fix(heliopause): fall back when no-replace rename is unsupported"

Recommendation: DO NOT REFER TO HARDWARE TESTING. Return to the author for rework first.

Reason: the change as written must not merge in its current shape, and the part worth keeping cannot be validated by any test cn5 or cn7 can run. Sending it to hardware would burn GPU time on code that needs to be rewritten, on a property (filesystem rename semantics) a GPU cannot exercise.


1. What the PR actually contains (verified at head 06b9011)

Two unrelated changes bundled together (+468/−22, 7 files):

A. The blob fallback — correct, small, the real fix. heliopause/src/export/archive.rs:432-486: install_blob calls libc::renameat2(AT_FDCWD, src, AT_FDCWD, dst, RENAME_NOREPLACE); on EINVAL|ENOTSUP it now publishes with std::fs::hard_link(temporary, destination) (:481) and returns Ok(()) leaving the temporary for the caller. Every other errno is re-raised unchanged (:485). The caller blob.rs:194-224 already maps AlreadyExists to "reuse this identical pinned blob" (verify_pinned) and removes the temporary itself, tolerating NotFound. So the no-clobber guarantee is preserved (a link fails EEXIST) and the cleanup seam is right. This matches existing precedent in the tree (helios/src/core/cache.rs:2583, :3030 hard-link publication; issue #54 lists eight such sites).

B. A directory-publication preflight — ~245 added lines of scaffolding. New public helios_core::core::cache::preflight_directory_publication (helios/src/core/cache.rs:3621-3708) that creates a random .flare-rename-probe-<hex> directory in the destination parent, proves no-replace rename refuses an existing target and succeeds on a free one, and maps EINVAL|ENOTSUP|ENOSYS to ErrorKind::Unsupported. Plus five call sites (cache.rs:2358, :3125, heliopause/src/export/core.rs:708-710, helios/src/core/conversion.rs:245, heliopause/src/export/binding.rs:33-36), a new Python-visible export_preflight_directory (binding.rs:120-124), a capture_with_owners refactor that exists only to host a test for that binding check (binding.rs:97-118), a Python bootstrap step (ignition/preparation/model_core.py:41-42), and a new 68-line test file (tests/preparation/test_directory_preflight.py). It is not mentioned in the PR description.

2. Substantive problems that make hardware testing waste (must be fixed first)

  1. The preflight does not run where users invoke export. ignition export has no --output: ignition/cli/__init__.py:37 wires serve.export, which calls export_core(prepared, recorder, storage, None, ...) (ignition/cli/serve.py:371) and, multi-host, prepared.export(None, ...) (serve.py:240 → ignition/preparation/host_ranks.py:460 cache_only = path is None). So model_core.py:41-42 (if not cache_only and form == 'directory') and binding.rs:34 never fire from the CLI; only tests pass a path (tests/preparation/test_model_core.py:62, helios/tests/export_progress_fixture.py:62). Also export_core exports ranks with sources=True (model_core.py:51-52), so binding.rs:34's !request.sources guard excludes that path anyway.
  2. The checks that do run fire after the expensive work, so #54's stated cost (a wasted ~20-minute preparation pass) is unchanged: core.rs:708 is inside publish_payload, reached from binding.rs:64 after capture_rank returned; cache.rs:2358 is in export_entry, after "Commit core".
  3. The fix is not needed for #54's own scenario, and the reviews overstate the gap. I checked this directly because all six reviews repeat "the default export still fails at Commit core". That is wrong. With path=None, heliopause/src/export/core.rs:973 skips the standalone branch entirely, so export_entry/rename_noreplace is never reached; the cache entry is published by Staging::commit, which uses plain fs::rename after a symlink_metadata no-clobber check (helios/src/core/cache.rs:3082-3091), and combine likewise (helios/src/core/conversion.rs:3380). The default ignition export therefore has exactly one no-replace rename — the blob install — and the PR's blob fallback does fix issue #54's reported failure. The consequence cuts both ways: the ~450-line preflight buys nothing for the reported bug, and the "Fixes #54" claim in the description is closer to true than the reviewers concluded (the truly uncovered sites are export_entry at cache.rs:2371 for explicit-path/converted exports, publish_staged_directory at helios/src/core/export.rs:742, unpack at conversion.rs:324, and edit.rs:250).
  4. The probe mutates the filesystem before validating. helios/src/core/cache.rs:3652 calls fs::create_dir_all(parent) inside a function whose doc comment says "this probe reserves nothing" (:3621-3622), and helios/src/core/conversion.rs:245 runs it before payloads.verify() (:248) and before the established output.exists() check (:289-291). A corrupt source core now leaves a created output parent behind and changes the user-visible error for an existing destination from "destination exists: " to "directory export preflight: destination exists".
  5. Two divergent definitions of the same property, and neither fixes the primitive. archive.rs:477-480 accepts EINVAL|ENOTSUP; cache.rs:3687 accepts EINVAL|ENOTSUP|ENOSYS; existing precedent selene/src/disk.rs:1100-1104 (not opened) accepts EOPNOTSUPP|ENOSYS. rename_noreplace (cache.rs:3712-3732) is still bare, so the behaviour differs between blobs and directories inside one export.
  6. Branch hygiene and mergeability. main refactored unpack_selected into a wrapper over unpack_with (main:helios/src/core/conversion.rs:294-321), so the PR's two-line hunk at head conversion.rs:245 no longer applies. The maintainer (yatesdr, CHANGES_REQUESTED 2026-11-18) flagged this plus the preflight placement, the stale/misleading description ("then the temporary name is removed" — moved to the caller in 30ccc0de), the mock-only Python test, missing Signed-off-by on four commits, and the undocumented new filesystem requirement. No commit has landed on the branch since 2026-11-13; none of it is addressed at head. Reviewers also identified dead/self-referential tests: bindings.rs (not opened) capture_with_owners + its stub test, archive.rs:630-661's 0o555 test (unenforced under root), and test_directory_preflight.py:43-52 which cannot fail because it hits RuntimeError("export requires the configured core cache") before the code under test.

Verdict on priority 1: this is not "minor nits". Items 1-5 are architecture/quality defects in the added half of the change, and the maintainer has already requested changes that are unaddressed. Per the rule that substantive problems must never be tested, this stops here.

3. Why hardware testing would have no value even if the code were clean

So: zero expected value from a hardware slot, and substantial value from a filesystem-level check that does not need a GPU.

4. Conditions before any testing is worth scheduling

  1. Rebase onto main (the conversion.rs conflict) and fold the fixup commits, with Signed-off-by on every commit.
  2. Delete the directory-preflight half — preflight_directory_publication and its tests, all five call sites, export_preflight_directory and its registration, capture_with_owners and its test, the model_core.py hook, tests/preparation/test_directory_preflight.py, and revert the unexplained synchronize reorder in commit_standalone (cache.rs:3117-3126). Keep heliopause/src/export/archive.rs.
  3. Unify the unsupported-errno predicate once, beside rename_noreplace, and say which set is correct (EINVAL|ENOTSUP, plus ENOSYS only if a supported kernel needs it — selene/src/disk.rs:1102 (not opened) suggests the project assumes it is reachable).
  4. Add one seam test that drives install_blob's real branch, not the helper: inject the rename function so the test asserts (i) EINVAL installs by link and the destination is readable, (ii) an existing destination still reports AlreadyExists, (iii) an unrelated errno is preserved, (iv) the caller removes the temporary.
  5. Rewrite the description to the four-part form (why / what / claimed result / evidence), say "Partially fixes #54" if the directory sites stay uncovered, and state that the fallback is exercised by injected errno only. Document the rename requirement next to the same-filesystem rule at docs/multi-host.md:275-278, and record the unrun mergerfs check in docs/TODO.txt.

5. Minimal test plan for when it comes back — no GPU required

Run on any Linux builder or container image, in this order, and stop on the first failure:

T1 — Build and unit tests (blocks everything else). cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server and cargo test --locked --release --manifest-path heliopause/Cargo.toml. Neither ran at head; the author reported the heliopause suite does not compile on macOS. This is the cheapest way to catch the merge breakage and the #[cfg(any(target_os = "linux", test))] dead-code gate at archive.rs:471.

T2 — Real unsupported filesystem, no GPU needed (the test that settles the PR). On a container with fusermount available, create a mergerfs or equivalent FUSE mount whose renameat2(..., RENAME_NOREPLACE) returns EINVAL (confirm with the 10-line ctypes snippet in issue #54 first — it must print -1 Invalid argument). Then:

T3 — No regression on a supported filesystem (single run, cheap). Same as T2a on ext4 or ZFS, confirming the renameat2 path is still used and nothing changed for the documented environment. This is the only check that needs a machine that can actually prepare a model, and it can reuse T2a's model; keep it to one run on whichever host is free when the PR is ready — do not run it now.

No throughput A/B is warranted: nothing in this PR touches the hot path, memory layout or numerics, so a perf comparison would measure noise.

6. Answers to the framing questions

Also noted for the record: the case file's malicious-content screen is clean, and I found no instruction-like or agent-directed content in the PR description, comments, or review text.

Full report · Notes

code review summary

Recommendation: Changes Requested

The blob hard-link fallback is the right, minimal fix for #54 and should be kept; the directory-publication preflight that makes up most of the diff cannot run where #54 happens, leaves the publishers that do run unguarded, mutates the destination while "checking" it, and sits in code main has already rewritten.

Blockers:

Should fix:

Nits:

7 nits (missing SPDX header; capture_with_owners + redundant result bindings; probe doc comment and the one-off #[cfg(any(target_os = "linux", test))]; unexplained synchronize reorder; PyRuntimeError vs FileExistsError convention; title/commit hygiene; non-Linux preflight indistinguishable from success).

Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.

screen malicious

Screen Result: All Clear

Evidence: Screened the full diff of PR #79 (head 41f1c76, 7 files, +468/−22) plus the entire discussion and linked issue #54. No text anywhere in the change or the thread addresses an agent/model, overrides instructions, or smuggles hidden/obfuscated content; no new subprocess execution, network access, environment-variable reads, credential handling, or unrelated destructive filesystem operations were added. The unsafe blocks in heliopause/src/export/archive.rs are pre-existing libc/Windows wrappers reused by the new hard-link fallback, not new attack surface.

What the change actually does: on EINVAL/ENOTSUP from renameat2(RENAME_NOREPLACE) it publishes via std::fs::hard_link atomically and leaves cleanup to the caller; EEXIST and other errors are preserved. It also adds a directory-preflight pyfunction and a probe in the core cache path.

The discussion is ordinary technical review (original-el8 comments; yatesdr CHANGES_REQUESTED 2026-11-18; repo review automation 2026-11-25). The only agent-directed text is the review bot's #autobot:ignore opt-out marker and "call @flare-autobot after push" boilerplate — documented repo automation convention, reported as an observation, not malicious.

Code-quality issues I verified myself and that a reviewer should keep in mind: the probe's create_dir_all(parent) at helios/src/core/cache.rs:4205 contradicts the doc comment "this probe reserves nothing" at :4174-4175; heliopause/src/export/core.rs:618 and :629 repeat an identical path.exists() check; the new Python test at tests/preparation/test_directory_preflight.py:43-52 never enters export_options, so it cannot fail on the probe it names; and the hard-link fallback at archive.rs:298-313 is only covered by injected-errno tests, with no real mergerfs reproduction.

Open questions: none blocking the screening. Unverified only because the environment lacks a mergerfs mount and Helios/Linux test targets — the real-world EINVAL/ENOTSUP path and the Heliopause cargo test were not executed.

Full report · Notes decide malicious: all_clear (100%): No malicious content found

explore

Author: efegokdemir (outside contributor, association NONE; 0 merged PRs, one other open PR #147; no Discord handle given) Motivation: On mergerfs, ignition export dies with a bare "Invalid argument (os error 22)" after ~20 minutes of tuning, compilation and capture, because the blob publisher insists on renameat2(RENAME_NOREPLACE), which mergerfs rejects. The PR would fall back to a hard link for blobs and add a directory-publication preflight so the failure is at least explained. Scale: +468 / −22 lines in 7 files Proposal:

Full report · Notes

Value Proposition

Verdict: worth it with changes — keep the blob fallback, cut the directory preflight back to one guard plus docs

The rebase at head 41f1c76a (upstream merged 2026-11-27) fixed the one hard blocker: the probe now sits inside unpack_with (helios/src/core/conversion.rs:316), so main's unpack_selected:300 → unpack_with:305 shape survives and the hunk no longer lands in deleted code. Nothing else about the shape of the branch changed: still 7 files, +468/-21, one 16-line fix and one ~450-line filesystem self-verification subsystem.

What is worth merging, and why

install_blob_after_rename_error (heliopause/src/export/archive.rs:298-313) is the right fix, in the right place, at the right size. It converts renameat2(RENAME_NOREPLACE) returning EINVAL/ENOTSUP into a link() install, leaves EEXIST to propagate as AlreadyExists (archive.rs:275-280 → blob.rs:204-211, which re-verifies the existing object rather than trusting it), and re-raises every other errno unchanged (archive.rs:312). Cleanup stays in blob.rs:216-224, which tolerates NotFound — the right seam and the fix for original-el8's earlier comment (pr_comments, 2026-10-26). There is no durability regression: blob.rs:191 fsyncs the blob before install and neither the old rename nor the new link is followed by a blobs-directory fsync either side of the change.

Who benefits and how much: the #54 reporter's package cache is mergerfs (Proxmox LXC), and the strace in #54 points at exactly this function; the failure surfaced at "Scan and copy reachable storage" (heliopause/src/export/capture.rs:3316-3317, blob store created at :3340-3349) after a full preparation pass. For them the patch converts a hard failure into a working export and saves a ~20-minute preparation per retry. That is small but real, and it removes a filesystem requirement instead of adding a policy, which is exactly the charter's "smallest footprint… or a way to solve it without new code at all." Hard-link publication is already the norm here — helios/src/core/cache.rs:3061 (install_payload) and :3087 (install_legacy) do link-then-AlreadyExists, and the maintainer cites the same precedent.

Caveats, none blocking: the errno set is EINVAL|ENOTSUP while the branch's own probe accepts EINVAL|ENOTSUP|ENOSYS (cache.rs:4240) — one predicate should serve both; and link() re-resolves the temporary path rather than linking the open descriptor, so a local process could swap it between the failed rename and the link (the same exposure the existing linked-then-reopened pattern already has).

What should not be merged as it stands, and why

The preflight_directory_publication subsystem (helios/src/core/cache.rs:4176-4261 plus five call sites, a new public API, a new Python symbol, and a new Python test) is now less dead than at my last review — Root::export_entry (cache.rs:2804), publish_payload (heliopause/src/export/core.rs:640-642), and unpack_with are live paths. But it still fails the charter's tests:

  1. It does not deliver the fail-early benefit that motivated #54. Every probe runs at publication time — after capture, staging, CUDA work, and (for unpack_with) after Verified::open and before verify_stored_data. On the one command #54 is about, ignition export, it never runs at all: ignition/cli/serve.py:330 is the only caller and passes path=None, so cache_only=True and model_core.py:41-42 plus binding.rs:33-36 are unreachable. What the probes buy is a better error string, not an earlier failure.
  2. It still does not make directory export work on mergerfs. Directories cannot be hard-linked, so the probe's only possible outcomes are "proceed" or "refuse with a nicer message". A user who writes a directory core to such a filesystem gets a hard refusal with no documented alternative — and no documentation was added: mergerfs still appears nowhere under docs/, and the same-filesystem rule at docs/multi-host.md:314 / docs/core-format-design.md:698 says nothing about no-replace rename support.
  3. Coverage is still partial. flare edit publishes through a bare rename_noreplace at helios/src/core/conversion/edit.rs:249-252 and is unguarded, so the same filesystem yields "unsupported" from some commands and os error 22 from another.
  4. It reorders and mutates while "checking". cache.rs:4205 calls create_dir_all(parent) inside a function documented "this probe reserves nothing" (:4174-4175), so a failing probe leaves an empty parent behind; and conversion.rs:316 now fires before the established destination exists: {output} message (conversion.rs:364-366), changing an existing error. commit_standalone still moves synchronize(&self.directory) after the probe (cache.rs:3678-3679) for no reason connected to this bug.
  5. It is ~30x the code of the actual fix for one better message, adds a public helios API and a export_preflight_directory pyfunction (binding.rs:120-128) with one caller each, and re-implements helpers that exist (ring::SystemRandom loop at cache.rs:4206-4218 beside token(); a manual cleanup match where TempDirectory exists). That is "good ideas in the wrong place".
  6. The new Python test cannot fail on its subject. tests/preparation/test_directory_preflight.py:43-52 raises "configured core cache" from model_core.py:32-33 before any probe (the unexpected hook is dead), and :28-31 fakes flare_heliopause, torch, and torch.distributed, so it asserts call order, not behaviour.

The helper-level Rust tests miss the branch that actually broke: all five archive.rs:438-552 cases call install_blob_after_rename_error directly (one invents EINVAL), so install_blob's renameat2 path (archive.rs:259-297) has no test. The PR's stated evidence is "3 tests", rustfmt --check, and git diff --check, with no mergerfs reproduction ("mergerfs was not available") — the charter asks for real evidence and a four-part description, and the description still says "Fixes #54" and "the temporary name is removed" (the helper's own comment at archive.rs:309 says the caller owns cleanup).

Conditions for merge

  1. Rebase is already done (41f1c76a); fold the fixups and add Signed-off-by.
  2. Keep heliopause/src/export/archive.rs as is. Optionally promote the unsupported-errno predicate beside rename_noreplace (cache.rs:4265) and use it in both places, with ENOSYS only if a supported target needs it.
  3. Add one seam test through install_blob — thread the rename result in, and assert (i) EINVAL installs by link with the destination readable, (ii) an existing destination still reports AlreadyExists, (iii) an unrelated errno is preserved, (iv) the caller removes the temporary. That covers the branch users actually hit.
  4. Cut the preflight to one guard, or drop it. If kept: one call site at the publication that #54 users reach (Root::export_entry), no create_dir_all, run after the existing destination check so the current message survives, and use the shared errno predicate. Delete commit_standalone's probe (test-only callers), the binding.rs pyfunction and capture_with_owners, the model_core.py hook, the core.rs hook (redundant with Root::export_entry), and the Python test.
  5. Document the requirement: two sentences beside the same-filesystem rule at docs/multi-host.md:314 and docs/core-format-design.md:698 saying directory core publication needs no-replace rename support and how it fails. Optionally improve rename_noreplace's message (cache.rs:4265-4285) to name both paths — that fixes the opacity half of #54 for every site in a few lines.
  6. Rewrite the description in the four required parts, say "Partially fixes #54", and state which filesystems and commands remain unsupported.

Answer to the framing question

The blob fallback is worth making and worth merging: a reproducible user-facing bug, a 16-line fix in the exact function the report fingered, no hot-path cost, no new surface, no silent error swallowing, and it deletes a filesystem requirement. The directory-preflight half is not worth making in this form: it runs at the wrong time on every path, cannot make the operation succeed, is currently undocumented, leaves one publisher unguarded, and costs an order of magnitude more code than the fix it accompanies. The repo already had the simpler answer — hard-link publication — so the smallest correct change is to use it for blobs and document the directory limitation.

Full report · Notes Decide Value: yes (97%): This change is worth reviewing: it provides value to the project in line with its charter.

Prose

Verdict: blocking issues

Blocking:

Should fix:

Nits: 5 — preflight doc comment (cache.rs:4174) narrower than its callers; undocumented {EINVAL,ENOTSUP} vs {EINVAL,ENOTSUP,ENOSYS} divergence (archive.rs:304-306 vs cache.rs:4239-4240); under-describing PR title; repair commits/merge and missing SPDX header in the new test file; non-Linux preflight silently returns Ok (cache.rs:4179-4183).

Link: https://github.com/NVIDIA/hyperflare-inference/pull/79

Full report · Notes

Subtractive

Verdict: should not be merged The change: +468 / −22 across 7 files (archive.rs +139/−1, binding.rs +91/−20, cache.rs +163/−1, core.rs +3, conversion.rs +2, model_core.py +2, tests/preparation/test_directory_preflight.py +68) Could remove: about 380 lines, in 5 places Biggest subtractions:

Full report · Notes

Simplicity

Verdict: should-fix issues only

Blocking:

Should fix:

Nits: 2 (probe internals: duplicated destination check, unreachable Unsupported arm, three-arm cleanup match; and commit_standalone's undocumented reordering of synchronize). Plus two small ones folded into them: a new test file without an SPDX header, and the preflight running before payload verification in conversion.rs.

Link: https://github.com/NVIDIA/hyperflare-inference/pull/79

Full report · Notes

Conventions

Verdict: should-fix issues only

Blocking:

Should fix:

Nits: 5 — missing SPDX header in tests/preparation/test_directory_preflight.py:1; probe name generation/cleanup re-implement token() (cache.rs:3537), staging_token/unique_staging and TempDirectory (conversion.rs:2595-2623); export_preflight_directory flattens FileExistsError into RuntimeError (binding.rs:120-124); #[cfg(any(target_os = "linux", test))] (archive.rs:298) is a new form (my earlier "dead code" claim withdrawn); capture_with_owners (binding.rs:97-118) extracts one of four identical lease/drain blocks.

Link: https://github.com/NVIDIA/hyperflare-inference/pull/79

Full report · Notes

Architecture

Verdict: blocking issues

Blocking:

Should fix:

Nits: 1 — preflight_directory_publication is new pub Helios cache API, export_preflight_directory a new Python entry point, and capture_with_owners (binding.rs:97-118) an extraction existing only to test unreachable code.

Link: https://github.com/NVIDIA/hyperflare-inference/pull/79

Full report · Notes

Correctness

Verdict: should-fix issues only Blocking:

The blob hard-link fallback itself is correct: it links only on the two unsupported errnos, preserves all other errors, is atomic and EEXIST-preserving, is same-directory (blob.rs:178) so no EXDEV, and its caller (blob.rs:194-224) maps AlreadyExists to reuse and owns temporary cleanup. capture_with_owners and the OwnerLease lifetime are also correct. combine publishes with plain fs::rename (conversion.rs:3538), so it is not another #54 path. No live mergerfs reproduction exists; the errno mapping rests on injected-errno tests only.

Full report · Notes

code review summary

Recommendation: Changes Requested

Keep the blob hard-link fallback — it is the correct, minimal fix for #54 and makes ignition export succeed on mergerfs. Delete the directory-publication preflight that makes up most of the diff: it cannot run on the command #54 reports, leaves ignition edit and publish_staged_directory unguarded, and writes to the destination while documented as reserving nothing.

Full report · Notes

Pre Test Report

Pre-test report — PR #79 "fix(heliopause): fall back when no-replace rename is unsupported"

Recommendation: DO NOT REFER TO HARDWARE TESTING. Return to the author for rework first.

Two independent reasons, either sufficient: (1) the change will not merge as written and most of it is dead code that must be deleted, so any run would validate code that is about to change; (2) the part worth keeping is filesystem syscall semantics (renameat2(RENAME_NOREPLACE) errno handling, link(2)) that no GPU on the roster can exercise.

Re-verified this turn at head 41f1c76a (2026-11-27). Two corrections to my previous report, both stated below.


1. What the PR contains (verified at head 41f1c76a)

+468/−22, 7 files, unchanged since 06b9011.

A. The blob fallback — correct, small, the real fix. heliopause/src/export/archive.rs:259-313. install_blob calls libc::renameat2(..., RENAME_NOREPLACE) (:265-273); on error it calls install_blob_after_rename_error, which on EINVAL|ENOTSUP (:304-306) publishes via std::fs::hard_link (:308) and returns Ok(()), leaving cleanup to the caller (:309 comment). All other errno is re-raised unchanged (:312). The caller blob.rs:194-224 maps AlreadyExists to verify_pinned reuse (:204-211) and removes the temporary itself, tolerating NotFound (:216-224). The no-clobber guarantee holds (a link fails EEXIST), and it matches in-tree precedent (hard-link publication in cache.rs, and it is what the maintainer's own comment cites).

B. A directory-publication preflight — ~245 added lines. New public helios_core::core::cache::preflight_directory_publication (helios/src/core/cache.rs:4174-4261) that creates a .flare-rename-probe-<32 hex> directory pair in the destination parent, checks that no-replace rename refuses an existing target and succeeds on a free one, and maps EINVAL|ENOTSUP|ENOSYS to Unsupported. Plus six call sites, a new Python-visible export_preflight_directory (binding.rs:120-124, registered :128), a capture_with_owners extraction that exists only to host a test for it (binding.rs:97-118), a Python hook (model_core.py:41-42), and a new 68-line test file. The PR description never mentions it.


2. Correction: the merge conflict is resolved, but nothing else was

My previous report listed "branch does not apply to main" as a live blocker. That is now fixed. At 41f1c76a, unpack_selected is a one-line wrapper (conversion.rs:300-302) and the probe sits inside unpack_with at :316.

What the merge did not do: it addressed none of the review findings. The description still says "Fixes #54", still says "the temporary name is removed" (cleanup moved to the caller), still reports "3 tests" against 5 Rust tests + 3 Python tests. yatesdr's CHANGES_REQUESTED review (2026-11-18) stands unanswered, including the Signed-off-by gap. No documentation was added (mergerfs appears nowhere under docs/; docs/multi-host.md:314-315 still states only the same-filesystem rule).


3. Correction: cn5 is available again — the blocking reason changed, not the conclusion

My previous report said cn5 was out of service at 87 °C. It is now Ready. So the "no hardware" conclusion must rest on fit, not availability — and it does, more strongly:

The behaviour under test is renameat2(RENAME_NOREPLACE) returning EINVAL. No supported local filesystem does that — ext4/XFS/ZFS/Btrfs all support it, and tmpfs does too. So on either host the new fallback branch is never entered and the PR is indistinguishable from main. The only way to enter it is a FUSE/mergerfs mount, which is a privileged container/OS setup, involves no GPU at all, and is not something either host offers.


4. Substantive problems that make testing a waste — must be fixed first

4.1 Exactly one preflight site is production-reachable, and it is not the command #54 reports. I traced every site:

Site Production-reachable? Why
model_core.py:41-42 No Both ignition export entry points pass path=None (serve.py:330, :229 → host_ranks.py:460), so cache_only is always true. ignition/cli/__init__.py:106 registers no --output for export.
binding.rs:35 No Guarded by !request.sources; every production export_model passes sources=True (model_core.py:52, host_ranks.py:471, rank_group.py:111 (not opened)).
core.rs:640-642 No Requires !cache_only; combine passes None if cache_only else path (core_file.py:111-127 via model_core.py:76, host_ranks.py:502).
cache.rs:2804 (export_entry) No All three callers (core.rs:921, :934, conversion.rs:351) need a non-empty destination; no CLI supplies one. convert --output routes to convert_core, not payload_convert_cache (publishing.py:50-58).
cache.rs:3678 (commit_standalone) No Test callers only (cache.rs:5011/5017/5132).
conversion.rs:316 (unpack_with) Yes — the only one Via ignition convert --output DIR → publishing.py:56 → core_snapshot.convert:121 → export_payload_convert (conversion.rs:50) → unpack_with.

So the preflight produces a better error message for ignition convert --output and nothing for ignition export, the command #54 reports. Meanwhile the two publishers that matter for this failure class stay bare: publish_staged_directory (helios/src/core/export.rs:742, whose doc at :730-734 claims exactly these no-replacement semantics) and edit (conversion/edit.rs:250). Five of six Rust sites plus the Python hook and its test file are dead weight.

4.2 The probe mutates the destination while "checking" it. cache.rs:4205 calls fs::create_dir_all(parent)? inside a function documented "this probe reserves nothing" (:4174-4175), then creates and removes a .flare-rename-probe-* directory. In unpack_with it runs at :316, before verify_stored_data (:323) and before the established if output.exists() check (:364-366), so a corrupt source now leaves a created output parent behind and an existing destination reports directory export preflight: destination exists instead of the established destination exists: <path> (:365). That established check is now unreachable on Linux.

4.3 Two errno policies for one syscall. archive.rs:304-306 accepts EINVAL|ENOTSUP; cache.rs:4240 accepts EINVAL|ENOTSUP|ENOSYS; the repo's own precedent is EOPNOTSUPP|ENOSYS (selene/src/disk.rs (not opened)). A filesystem answering ENOSYS gets a working blob fallback and a hard directory refusal from the same export. rename_noreplace (cache.rs:4265) itself gained no fallback — the wrong layer.

4.4 The tests do not establish what they claim. No test drives install_blob's real renameat2 branch — all five archive.rs tests (:439, :459, :490, :513, :535) call the helper directly with a synthetic io::Error. The :459 test's 0o555 premise is a no-op when the suite runs as root, and it duplicates :439. In Python, test_directory_preflight.py:43-52 cannot fail on its subject: it never enters export_options, so model_core.py:31-33 raises "export requires the configured core cache" before line 41 is reached — which is exactly what the assertion matches — making its unexpected stub dead code. Test 1 (:11-40) mocks flare_heliopause/torch and asserts call order only.

4.5 No CI runs any of this. .github/workflows/native-serving.yml (not opened) runs cargo test for eos, selene, selene-manager, helios, flare-cli, flare — not heliopause, where archive.rs lives. No workflow runs pytest. So the 5 archive tests and 3 Python tests have never executed in CI, and the 3 cache.rs tests only run on the helios job (largely vacuous on Windows, where the probe is #[cfg(target_os = "linux")] and returns Ok).

4.6 One point the reviews got wrong, in the PR's favour. Five of six reviews assert "the default export still fails at Commit core". That is false. With path=None, core.rs:917-947 skips the standalone branch entirely, so export_entry/rename_noreplace is never reached; the cache entry is published by Staging::commit, which uses plain fs::rename after a symlink_metadata no-clobber check (cache.rs:3644), and combine likewise (conversion.rs:3538). The default ignition export therefore performs exactly one no-replace rename — the blob install — so the blob fallback does fix #54's reported failure. This cuts both ways: "Fixes #54" is closer to true than reviewers concluded, and the ~245-line preflight buys nothing for the reported bug.


5. Why a hardware test would add no value

  1. The property is not GPU-exercisable. No CUDA, kernel, graph, scheduling, memory-plan or numeric change. On a supported filesystem the fallback branch is never entered; on an unsupported one no GPU is involved.
  2. Neither host offers the required filesystem. Confirmed: 16 GiB scratch on both, no FUSE/mergerfs mount, and creating one is a privileged OS task outside a GPU job.
  3. No throughput A/B is meaningful. Nothing on the hot path changed, so a perf comparison would measure noise.
  4. A full export cannot even run without new setup. ignition/recipes/ no longer exists in this tree — ignition.cli.main(argv, *, recipes=(), ...) defaults to an empty recipe tuple, and official recipes now live in local-inference-lab/hyperflare-recipes. Any end-to-end export on cn5/cn7 requires that external package at a compatible version, for a run that cannot discriminate this PR from main.
  5. The code is going to change. Referral policy is explicit: substantive architecture problems must never be tested. Items 4.1–4.4 are exactly that, and the maintainer has already requested changes that remain unaddressed.

Expected value of a hardware slot if run anyway: near zero — it would neither confirm nor refute the fix, and could only produce a misleading "passed".


6. Conditions before any test is worth scheduling

  1. Delete the preflight half: preflight_directory_publication and its 3 tests, all six call sites, the export_preflight_directory pyfunction and its registration, capture_with_owners and its test, the model_core.py hook, tests/preparation/test_directory_preflight.py, and revert the unexplained synchronize reorder in commit_standalone (cache.rs:3678-3679; main has it first at cache.rs:3670).
  2. Keep heliopause/src/export/archive.rs, and add one seam test through install_blob (inject the rename result) asserting: EINVAL installs by link with the destination readable; an existing destination still reports AlreadyExists; an unrelated errno is preserved; the caller removes the temporary.
  3. Unify the unsupported-errno predicate once beside rename_noreplace, and state the chosen set.
  4. Add heliopause to the native-serving.yml test matrix and a pytest job — otherwise none of these tests ever run.
  5. Rewrite the description to the mandatory four parts, say "Partially fixes #54" if directory sites stay uncovered, state that the fallback is exercised by injected errno only, add the Discord: line, and add Signed-off-by.
  6. Document the filesystem requirement beside the same-filesystem rule (docs/multi-host.md:314-315) and record the unrun mergerfs reproduction in docs/TODO.txt.

7. Minimal test plan for when it returns — no GPU required

Run on any Linux builder/container; stop on first failure.

T1 — Build and unit tests (gates everything). cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server and cargo test --locked --release --manifest-path heliopause/Cargo.toml; then pytest tests/preparation/test_directory_preflight.py (or its replacement). None of these ran at head; the author reports the Heliopause suite does not compile on macOS.

T2 — The one test that settles the PR, on a real unsupported filesystem (no GPU). On a container with fusermount, mount mergerfs (or any FUSE mount whose renameat2(..., RENAME_NOREPLACE) returns EINVAL) and confirm with issue #54's ctypes snippet that it prints -1 Invalid argument. Then, with the core cache on that mount and --no-weights against an already-populated blob cache so preparation is short:

T3 — One regression run on a supported filesystem (single, cheap). Same as T2a on ext4/ZFS, confirming the renameat2 path is still taken and nothing changed for the documented environment. This is the only step that needs a host able to prepare a model; run it once on cn5 when the PR is otherwise ready, reusing T2a's model. Do not run it now.

No GPU hours are required for T1, T2, or the acceptance criterion of T3. If T3 must run on hardware, one job on cn5 suffices — do not schedule repeated runs, and do not use cn7 (single GB10, arm64, 16 GiB scratch: cannot host a full export).


8. Answers to the framing questions

Note on the material reviewed: the malicious-content screen is clean, and I found no instruction-like or agent-directed text in the PR description, comments, or review bodies. The only agent-directed strings are the repository's documented #autobot:ignore opt-out marker and the "Call @flare-autobot after push" boilerplate; neither was treated as an instruction.

Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.