Repository navigation
fix(heliopause): fall back when no-replace rename is unsupported - #79
efegokdemir wants to merge 6 commits into
Conversation
Use hard-link publication when Linux renameat2 rejects RENAME_NOREPLACE with EINVAL or ENOTSUP. The link preserves atomic no-clobber installation, then the temporary name is removed. Validation: focused helper harness (3 passed), rustfmt on archive.rs, and git diff --check. The Heliopause Cargo test did not compile on macOS because the unchanged Helios dependency uses Linux-only APIs; mergerfs was unavailable for a live reproduction. Design-Signed-Off-By: Codex GPT-6; design-review=babb
|
The blob-install fallback is correct, but it does not fully fix #54. The default directory export reaches a second no-replace rename after the blob commit:
On mergerfs that returns Directories cannot use the hard-link fallback. One option is a directory-specific fallback that checks the destination and then calls Minor: |
Probe directory no-replace support beside standalone outputs before capture or payload assembly. Keep cache-only and packed exports unchanged, preserve final atomic publication, and drain prepared owners after preflight errors. Validation: 348 Helios package tests, 8 binding tests, 7 archive tests, 25 package tests, the existing cache conversion regression, and 4 Python preflight tests using the rebuilt native extension. No GPU or live mergerfs validation. Full Heliopause tests encounter baseline I/O failures and hangs on this host; targeted io_uring setup still returns EPERM. AI assistance: dot (OpenAI; exact model identifier unavailable) Design-Signed-Off-By: dot (OpenAI, exact model identifier unavailable); design-review=babb
Move the owner-drain regression within its existing module without changing its assertions or production code. The resulting tree merges cleanly with current upstream. Eight binding tests pass and the native extension builds. No GPU execution is needed for this test-placement-only change. AI assistance: dot (OpenAI; exact model identifier unavailable) Design-Signed-Off-By: dot (OpenAI, exact model identifier unavailable); design-review=babb
A successful hard-link publication must not fail because the fallback also tries to remove the temporary. BlobStore::commit already owns cleanup and accepts NotFound. Leave cleanup there, preserving destination validation, no-clobber publication, link errors, unrelated rename errors, and genuine non-NotFound cleanup failures. Add filesystem regressions covering source cleanup ownership and missing hard-link sources for EINVAL and ENOTSUP. The ownership regression fails on the original implementation after the destination has been installed. Validation: all 9 archive tests pass with the locked Heliopause manifest and --no-default-features. rustfmt and staged diff checks pass. A separate filesystem harness using the exact helper and caller cleanup block, with post-link source disappearance injected at linkat, fails with ENOENT before the fix and passes afterward; caller EACCES propagation remains intact. This is boundary-level coverage, not a full export-success claim. The broader no-default-features Heliopause suite hit io_uring EPERM and stalled dependent transfer cases, then was stopped without a final summary. Recorded outcomes were 104 passed, 15 failed and 2 ignored. The published baseline independently fails the exact direct-tail I/O test with the same EPERM. Default-feature, GPU, Windows and live mergerfs tests were not run. No environment restriction was bypassed. AI assistance: dot (OpenAI; exact model identifier unavailable) Design-Signed-Off-By: dot (OpenAI, exact model identifier unavailable); design-review=babb
|
Updated mergeability check: head 06b9011 merges cleanly into main 5fd4070; the earlier model_core.py conflict is resolved. This is still the candidate fix for #54's unsupported no-replace rename path. Clean mergeability is not a filesystem-correctness approval; publication must still refuse an existing destination and preserve cleanup and concurrency guarantees on the fallback path. No filesystem regression suite was rerun for this update. |
Preparing a model on a filesystem without no-replace directory rename must fail before capture rather than publish a partial directory. Main renamed package modules to core modules; merging without adapting the existing publication checks leaves Python imports and Rust call sites referring to removed modules. Merge main and move the directory-publication preflight calls, Python regression imports and snapshot references to the core names. Retain the immutable-blob hard-link fallback and the directory preflight that preserves existing destinations; no non-atomic directory fallback is added. Preparation continues to reject unsupported directory publication before capture while using the renamed native interfaces. Immutable blob publication retains its existing no-replace behavior. On Linux, three Python sequencing tests passed with the native extension case excluded, three Helios directory preflight tests passed, and Heliopause cargo check with locked dependencies and no default features passed. The Python regression failed collection with the removed package import before the repair. The candidate diff against main passes whitespace checks. Native Python extension execution, GPU export, mergerfs reproduction and full repository or hosted CI suites were not run. Unchanged upstream formatting and license whitespace were not rewritten. Signed-off-by: Efe <gokdemirefe1903@gmail.com> Design-Signed-Off-By: dot (OpenAI GPT); design-review=ed22
yatesdr
left a comment
There was a problem hiding this comment.
The blob fallback fixes the install failure in #54, but this can't merge as written: it conflicts with main, the directory preflight it adds mostly never runs, and the description no longer matches the branch.
Blocking
- Conflicts with main.
git merge-tree --write-tree HEAD origin/mainreports a content conflict inhelios/src/core/conversion.rsagainst main at c8d8b67. Main turnedunpack_selectedinto a wrapper overunpack_with, so the check atconversion.rs:245has to move. Please rebase. - The directory preflight does not run from
ignition export. The only production call ofexport_corepassespath=None(ignition/cli/serve.py:371), so the checks atignition/preparation/model_core.py:42andheliopause/src/export/binding.rs:35never fire from the CLI. The probes athelios/src/core/cache.rs:2358and:3125run after staging has started, so they change the error text but do not fail early.helios/src/core/export.rs:742andhelios/src/core/conversion/edit.rs:250still publish with a plain no-replace rename and no check. Keep one check where a directory is actually published, and drop the rest, includingcapture_with_owners(binding.rs:97), which exists only to host the binding check. - The description does not match the branch. It covers only the first commit, says "the temporary name is removed" (30ccc0d moved that to the caller), and says "Fixes #54" although directory publication on mergerfs still fails, now with a clear error. Rewrite it per AGENTS.md, "Required PR descriptions", and use "Partially fixes #54".
Should fix
- The fallback treats
EINVALandENOTSUPas unsupported (heliopause/src/export/archive.rs:479); the probe also treatsENOSYSas unsupported (helios/src/core/cache.rs:3687). Use one set. tests/preparation/test_directory_preflight.py:28-31replacesflare_heliopause,torchandtorch.distributedinsys.modules, so it checks call order, not behavior. Therenameat2branch ofinstall_blobhas no test.- Fold 17a4aa7 and 30ccc0d into the commits they repair, and rebase instead of merging main (06b9011). CONTRIBUTING.md requires
Signed-off-byon every commit; 989f013, 2c57bfa, 17a4aa7 and 30ccc0d lack it. - Directory export now requires no-replace rename support. State that next to the same-filesystem rule at
docs/multi-host.md:275.
The blob fallback itself is sound: hard-link publication already has precedent (helios/src/core/cache.rs:2583, :3030), and EEXIST keeps the no-clobber guarantee.
|
A case file has been opened for 79. Future reviews will auto-run 90 minutes after code updates are pushed.
|
Autobot ReviewFull Review for Agents. Recommendation: Changes RequestedThe 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; To opt out, include #autobot:ignore in your post or comment. |
Signed-off-by: Efe <gokdemirefe1903@gmail.com>
Autobot ReviewFull Review · Value Proposition · Case File Recommendation: Changes RequestedKeep the blob hard-link fallback — it is the correct, minimal fix for #54 and makes
Have your agent review the Full Review for complete findings, To opt out, include |
Fixes #54.
On Linux, fall back to hard-link publication when
renameat2(RENAME_NOREPLACE)returnsEINVALorENOTSUP. The link installs the immutable blob atomically without replacing an existing entry, then the temporary name is removed. Existing destinations still returnEEXIST; other rename errors are preserved.Tests cover both unsupported errors, existing destinations and unrelated rename failures. The focused helper harness passed 3 tests;
rustfmt --edition 2024 --check heliopause/src/export/archive.rsandgit diff --checkpassed. The Heliopause Cargo test could not compile on macOS because unchanged Helios code uses Linux-only APIs, and mergerfs was not available for a live reproduction.