Value proposition report · NVIDIA/hyperflare-inference #79

Raw Markdown for agents: https://autobot.eidonix.com/p/673340b7-dc6d-4b82-956f-850852addc31.md

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.