#1 [high] Should fix: directory-publication preflight is a second, redundant mechanism (~200 lines)
PR #79 adds, besides the blob hard-link fallback, a whole "preflight directory publication" mechanism. It is redundant with checks already at every call site and is not needed by #54's chosen fix (issue #54 "Possible changes" lists the fallback or a preflight as alternatives; the PR does both).
What it adds:
- helios/src/core/cache.rs:3621-3708
preflight_directory_publication(54 lines) +preflight_directory_publication_with(75 lines): createsfs::create_dir_all(parent), generates a 16-byte random name withring::SystemRandom,fs::DirBuilder::mode(0o700).create(probe), createssource/targetdirs, does tworenamecalls, thenremove_dir_all. ~87 lines. - helios/src/core/cache.rs:3948-4017 three tests (~68 lines).
- helios/src/core/conversion.rs:245-246 (2 lines) + a test.
- heliopause/src/export/binding.rs:33-36, 120-124, 127-128 (~10 lines) plus the
capture_with_ownersrefactor. - heliopause/src/export/core.rs:708-710 (3 lines).
- ignition/preparation/model_core.py:41-42 (2 lines).
- tests/preparation/test_directory_preflight.py (68 lines new file).
Why nothing is lost:
- Every call site already checks the destination immediately before, so the preflight's own
symlink_metadata(destination)check is a duplicate: helios/src/core/cache.rs:2351-2357 (export_entry) and 3118-3124 (commit_standalone) testfs::symlink_metadata(destination).is_ok()first; heliopause/src/export/core.rs:686-700 already has twopath.exists()checks before the added preflight at 708-710. - The unsupported-rename verdict the probe produces is exactly what
rename_noreplaceitself returns at the same place: cache.rs:2371 and 3143 both callrename_noreplace(&staging, destination).map_err(failure)after the staging tree is built. The probe cannot remove that error, it only moves it earlier. - The probe is not free: it creates a
.flare-rename-probe-<32 hex>directory in the user's output parent (cache.rs:3652-3665) and creates that parent (fs::create_dir_all(parent)) from a function documented as "reserves nothing" (cache.rs:3621-3622).model_core.pycalls it before capture,core.rs:709calls it again inpublish_payload, andexport_entry/commit_standalonecall it a third time — three probe directories per directory export on the happy path. - It also duplicates RNG/unique-name machinery that exists: helios/src/core/cache.rs:2991
token()and helios/src/core/conversion.rs:2462-2481staging_token/unique_staging.
Smaller version: delete preflight_directory_publication, preflight_directory_publication_with, the export_preflight_directory pyfunction and its registration, the 4 call sites, the 3 cache.rs tests, the conversion.rs call, model_core.py:41-42 and tests/preparation/test_directory_preflight.py, and revert export_capture in binding.rs to main's inline shape (which also deletes capture_with_owners and its test). Lines saved: ~87 (cache.rs fn) + 68 (cache.rs tests) + 68 (new test file) + ~30 (binding refactor) + 48 (binding test) + ~10 (call sites/py binding) ≈ 300 added lines of the +468, leaving only the archive.rs fallback.
#2 [high] Should fix: archive.rs fallback tests prove the same two things twice (~60 lines)
heliopause/src/export/archive.rs:471-486 adds install_blob_after_rename_error (16 lines, #[cfg(any(target_os = "linux", test))]) and 432-453 calls it from install_blob. The behaviour needed is 6 lines and can live in install_blob itself:
if unsafe { libc::renameat2(libc::AT_FDCWD, source.as_ptr(), libc::AT_FDCWD,
target.as_ptr(), libc::RENAME_NOREPLACE) } != 0
{
let error = std::io::Error::last_os_error();
if !matches!(error.raw_os_error(), Some(libc::EINVAL | libc::ENOTSUP)) {
return Err(error.into());
}
// Link preserves no-replace: an existing destination still fails with EEXIST,
// which BlobStore::commit (heliopause/src/export/blob.rs:204-211) treats as reuse.
std::fs::hard_link(temporary, destination)?;
}
Tests added in archive.rs:608-728 = ~95 lines. Two pairs prove the same thing:
unsupported_noreplace_rename_installs_blob_with_a_hard_link(611-629) andunsupported_noreplace_rename_leaves_temporary_cleanup_to_the_caller(630-661) both assert: destination has the bytes AND the temporary still exists, for both EINVAL and ENOTSUP. The only difference is the 0o555 permission dance, which testsremove_temporary(an unchanged, already-tested function) rather than the fallback. Drop one, ~31 lines.other_rename_errors_are_preserved_without_installing_the_blob(685-706) andunsupported_noreplace_rename_preserves_hard_link_errors(707-728) both prove "an error is returned and the destination is not created"; one suffices (~21 lines).unsupported_noreplace_rename_does_not_replace_an_existing_blob(662-684) is worth keeping: it is the EEXIST guarantee the fallback must preserve.
Lines saved: ~52 of the ~95 test lines, plus ~10 by inlining the helper (the helper exists mainly so tests can inject an error; keeping it is acceptable if a reviewer prefers the seam — then save only the duplicate tests).
#4 [high] Should fix: the retained fallback does not cover #54's actual default-export path
PR title says "fix(heliopause): fall back when no-replace rename is unsupported. Fixes #54." but #54 is about ignition export with the package cache on mergerfs, and reviewer original-el8 (2026-10-26) explains the export then hits other rename_noreplace sites with no fallback:
- helios/src/core/cache.rs:2371 (
export_entry, reached from heliopause/src/export/core.rs:990 on the default directory export) — still a barerename_noreplace. - helios/src/core/cache.rs:3143 (
commit_standalone) — same. - helios/src/core/export.rs:742 (
publish_staged_directory) — same, used at core.rs:1070 when no cache is configured. - helios/src/core/conversion.rs:324 (
unpack_selected) and edit.rs:250 — same.
Verified: rename_noreplace (helios/src/core/cache.rs:3712-3732) still returns the raw EINVAL, and nothing wraps it. So the PR does not fix #54's default export path: the blob commit now succeeds, and the export fails one step later ("Commit core", core.rs:938) with the very same Invalid argument (os error 22). The description should say "partially fixes"; either the same 6-line fallback applies at publish_staged_directory/export_entry (directories cannot hard-link, so a documented fs::rename after the existing existence check is the fallback), or the title/claim shrinks to the blob path.
This is not an additional-feature request: it is the stated purpose of the PR being unmet, and it means the one retained piece (the fallback) is in the wrong place relative to #54.
#6 [high] Blocking: line accounting and total subtraction
Counting from pr_files: +468/−22 across 7 files.
- heliopause/src/export/archive.rs +139/−1: fallback ~16 (of which ~6 essential) + ~95 tests.
- heliopause/src/export/binding.rs +91/−20:
capture_with_owners+ preflight call + test. - heliopause/src/export/core.rs +3.
- helios/src/core/cache.rs +163/−1: preflight fn ~87 + tests ~68 + call sites.
- helios/src/core/conversion.rs +2.
- ignition/preparation/model_core.py +2.
- tests/preparation/test_directory_preflight.py +68.
Smallest version that fixes the stated bug (blob commit on mergerfs): heliopause/src/export/archive.rs only — the ~6-line in-place fallback plus the one EEXIST test. That is about +30/−1 instead of +468/−22.
Subtraction total if all findings are applied: ~450 of the 468 added lines; of that, ~245 lines are the preflight mechanism (+87 cache.rs fn, +68 cache.rs tests, +68 python test file, ~30 binding refactor incl. test, ~10 call sites), ~52 are duplicate fallback tests, ~48 are capture_with_owners + its test, and ~10 are the inlined helper/probe duplication.
Severity: blocking and not merely "should fix" — the PR's own claim ("Fixes #54") is not met (finding 4), and roughly 95 % of the diff serves a mechanism that duplicates checks already present at every call site while the actual bug's path stays broken.
#7 [high] Research summary
Reviewed PR #79 (+468/−22, 7 files) against the subtraction lens, the charter and AGENTS.md/design-review.md (not opened). Six findings recorded in the scratchpad, ranked by lines saved.
The core conclusion: the ~6-line hard-link fallback in heliopause/src/export/archive.rs is the whole fix, and everything else in the diff should go. The PR adds a full "preflight directory publication" mechanism — a 87-line probe in helios/src/core/cache.rs plus 68 lines of Rust tests, a new 68-line Python test file, a pyfunction, and four call sites (Python model_core.py, binding.rs, core.rs, cache.rs export_entry/commit_standalone) — that duplicates destination checks already made immediately before each call and produces no verdict rename_noreplace does not already produce at the same place; it also creates and removes a probe directory in the user's output parent up to three times per export. Reverting export_capture to main's inline shape also deletes capture_with_owners and its test, which exist only for their own test.
Separately, verified that the PR does not fix #54 as claimed: rename_noreplace at cache.rs:2371 (export_entry), 3143 (commit_standalone), export.rs:742 and conversion.rs:324 are untouched, so the default directory export still fails with EINVAL one step later at "Commit core" — matching original-el8's review. That makes the change both too big and aimed at only part of its stated bug.
Estimated total subtraction ≈ 450 of the 468 added lines, leaving ~+30/−1 in archive.rs.
#8 [high] Blocking: consolidated ranked findings list for the final report
Ranked by lines saved. Severity prefixes as the report must use them (note 1's title lacked one; its severity is Blocking, folded into item 1 below).
-
BLOCKING (~245 lines) — delete the whole directory-publication preflight mechanism. helios/src/core/cache.rs:3621-3708 (fn + helper), :3948-4017 (3 tests), helios/src/core/conversion.rs:245-246, tests/preparation/test_directory_preflight.py (all 68 lines), heliopause/src/export/binding.rs:33-36 + 120-128, heliopause/src/export/core.rs:708-710, ignition/preparation/model_core.py:41-42. Nothing replaces it: every call site already checks the destination (cache.rs:2351-2357, 3118-3124; core.rs:686-700) and
rename_noreplace(cache.rs:3712) already returns the unsupported verdict at cache.rs:2371/3143. Running it 3x per export and creating/removing.flare-rename-probe-*in the user's output parent is cost, not guarantee. Smallest version: no preflight at all. -
SHOULD FIX (~52 lines) — duplicate fallback tests in heliopause/src/export/archive.rs:608-728. Drop
unsupported_noreplace_rename_leaves_temporary_cleanup_to_the_caller(630-661, same assertions as 611-629 plus a 0o555 test of unchangedremove_temporary), and mergeother_rename_errors_are_preserved_without_installing_the_blob(685-706) withunsupported_noreplace_rename_preserves_hard_link_errors(707-728). Keepunsupported_noreplace_rename_does_not_replace_an_existing_blob(662-684) — it is the EEXIST guarantee. -
SHOULD FIX (~48 lines) — heliopause/src/export/binding.rs:97-118
capture_with_owners+ test 1046-1091. One caller, exists for the test; revertexport_captureto main's inline shape (main binding.rs:32-102), which preserves the same capture→drain→release ordering. -
SHOULD FIX (~10 lines, and the claim itself) — the retained fallback does not fix #54: cache.rs:2371 (export_entry), :3143 (commit_standalone), export.rs:742, conversion.rs:324 are still bare
rename_noreplace. Either apply the same 6-line fallback there (directories:fs::renameafter the existing existence check) or change "Fixes #54" to partial. -
NIT (~10 lines + 1 behavioural change) — inline
install_blob_after_rename_error(archive.rs:471-486, called only from 448) intoinstall_blobas the 6-linematches!(raw_os_error, Some(EINVAL | ENOTSUP))branch; and revert the unrelatedsynchronize(&self.directory)reordering incommit_standalone(cache.rs:3117-3126) — it has no purpose once the preflight is gone and is churn under AGENTS.md:170-175.
Total ≈ 450 of the 468 added lines; the smallest correct change for the stated blob bug is ~+30/−1 in archive.rs alone.
#11 [high] Blocking: whole directory-publication preflight is redundant (~244 lines)
Head 41f1c76. Verified with search_code (preflight_directory_publication / export_preflight_directory) and read_file.
Where it lives (all added by this PR):
- helios/src/core/cache.rs:4174-4184
preflight_directory_publication, :4186-4261preflight_directory_publication_with(87 lines incl. doc). - helios/src/core/cache.rs:4518-4587 three tests (~70 lines).
- tests/preparation/test_directory_preflight.py (68 lines).
- heliopause/src/export/binding.rs:33-36 call in capture closure; :120-124 pyfunction
export_preflight_directory; :128 registration. - heliopause/src/export/core.rs:640-642 call in
publish_payload. - helios/src/core/cache.rs:2804 call in
export_entry; :3678 call incommit_standalone. - helios/src/core/conversion.rs:316-317 call in
unpack_with. - ignition/preparation/model_core.py:41-42 call before rank capture.
Why nothing is lost (verified in code):
- Every call site already checks the destination immediately before: cache.rs:2797-2803 (export_entry), :3671-3677 (commit_standalone), core.rs:618-620 and :627-632 (publish_payload, second check is main's), conversion.rs:364-366 (
destination exists: {output}). The probe's own AlreadyExists arm (cache.rs:4194-4200) is a third/duplicate check with a different message ("destination exists" vs the established "directory export preflight: …" wrapper at conversion.rs:316-317). - The verdict duplicates what the real call returns: cache.rs:2817 and :3696 call
rename_noreplace(cache.rs:4265-4285) right where the tree is published; on mergerfs the same EINVAL surfaces there. Nothing at 4265 wraps it, so the probe only moves the failure earlier, after the expensive capture. - It reimplements existing helpers:
token()(cache.rs:3537-3543) already makes unique staging names,unique_staging/staging_token(conversion.rs:2603-2623) already do the ring-random hex name,TempDirectory(conversion.rs:2595-2601) already handles cleanup. - It is not free, despite its doc ("this probe reserves nothing", cache.rs:4175):
fs::create_dir_all(parent)at :4205 creates the user's output parent and :4206-4218 creates and removes a.flare-rename-probe-<32 hex>tree. - Redundancy in one export:
model_core.py:42→ laterpublish_payload(core.rs:640-642) →root.export_entry(core.rs:934 → cache.rs:2804) all probe the same destination; 2-3 probes per export.
Smaller version: delete all of the above; keep no preflight.
Lines saved: ~244 (87 + 70 + 68 + 10 call/pyfunction lines + 2 model_core.py + 4 binding closure).
#12 [high] Should fix: capture_with_owners + its test exist only for the preflight test (~69 lines)
Head 41f1c76. search_code capture_with_owners → definition heliopause/src/export/binding.rs:97-118, single call :89, test :1474-1520. Nothing else uses it.
Main's export_capture (read at main binding.rs:14-100) has the same capture → drain → release ordering inline, with OwnerLease created before py.detach and take_after_drain after. The PR version at binding.rs:33-95 is the same body wrapped in two closures plus the generic.
Smaller version: restore main's inline body; the preflight call at binding.rs:34-36 goes with the preflight (see the blocking note).
Lines saved: ~69 added lines (22 helper + 47 test); reverting also restores the 20 lines the PR removed, so binding.rs returns to its main size.
#13 [high] Should fix: archive.rs fallback tests duplicate each other (~63 lines)
Head 41f1c76. heliopause/src/export/archive.rs:438-555 = five tests, ~118 lines, for a 15-line branch (:298-313).
Duplicate pairs (verified by reading both bodies):
unsupported_noreplace_rename_installs_blob_with_a_hard_link(:438-456) andunsupported_noreplace_rename_leaves_temporary_cleanup_to_the_caller(:457-488) both loop EINVAL/ENOTSUP and assert destination bytes == payload and temporary still present (:453-454 vs :483-486). The second's only extra content is the 0o555 staging chmod (:469-472, :480) which tests the unchangedremove_temporary(:314-317). Drop it: −32 lines.other_rename_errors_are_preserved_without_installing_the_blob(:512-533) andunsupported_noreplace_rename_preserves_hard_link_errors(:534-555) both assert "error kind preserved + destination not created" (:531!destination.exists()vs :553). One is enough: −21 lines.- Keep
unsupported_noreplace_rename_does_not_replace_an_existing_blob(:489-511): it is the EEXIST guarantee BlobStore::commit relies on (blob.rs:204-211 treats AlreadyExists as reuse).
Also heliopause/src/export/archive.rs:298-313 install_blob_after_rename_error is called from production at :275 only; it exists so the tests can inject an errno. Inlining into install_blob (:259-297) is ~10 lines shorter and keeps the same behaviour.
Total: ~63 lines saved (32 + 21 + 10).
#14 [high] Should fix: the fallback still misses every directory publisher (~1 claim, 0 lines)
Head 41f1c76. The retained fallback is only heliopause/src/export/archive.rs:275-279 + :298-313 (blob install). The directory publishers remain bare rename_noreplace:
- helios/src/core/cache.rs:2817
export_entry— reached from heliopause/src/export/core.rs:934 on the default directory export. - helios/src/core/cache.rs:3696
commit_standalone. - helios/src/core/export.rs:742
publish_staged_directory— reached from heliopause/src/export/core.rs:1014 when no cache is configured. - helios/src/core/conversion.rs:436
unpack_with(i.e. theflare convertpath). - helios/src/core/conversion/edit.rs:250 (not opened).
No wrapper exists at these sites (search_code rename_noreplace). Independently reported by original-el8 in the PR thread (2026-10-26). The PR adds preflights in front of three of them instead of fixing them, so on mergerfs the export now fails at "Commit core"/"Publish core directory" with the same EINVAL — only later and after capture.
Issue #54's "Possible changes" lists the fallback and a preflight as alternatives; the PR ships both.
Smaller version: say "Partially fixes #54", or add the same 6-line fallback in publish_staged_directory (fs::rename after the existence check) and drop the preflights — either way the diff shrinks.
#16 [high] Blocking: corrected line accounting (~378 of 468 removable)
Head 41f1c76, pr_files: +468/−22 across 7 files. Corrected accounting (an earlier note over-counted; these numbers do not double count):
| File (added/removed) | Removable | What |
|---|---|---|
| helios/src/core/cache.rs (+163/−1) | 159 | preflight fn 87 + 3 tests 70 + 2 call sites |
| tests/preparation/test_directory_preflight.py (+68) | 68 | whole new file |
| heliopause/src/export/binding.rs (+91/−20) | 71 | capture_with_owners 22 + its test 47 + preflight call 4, less restoring the 20 removed lines |
| heliopause/src/export/archive.rs (+139/−1) | 63 | 2 duplicate tests 53 + helper inlined 10 |
| heliopause/src/export/core.rs (+3) | 3 | preflight call |
| helios/src/core/conversion.rs (+2) | 2 | preflight call |
| ignition/preparation/model_core.py (+2) | 2 | preflight call |
| cache.rs synchronize reorder (+1/−1) | 2 | revert |
| Total | ~378 of 468 |
What remains after all cuts: archive.rs 76 added lines (the 6-line hard-link branch, the EEXIST test and one errno test); that is the honest size of the fix, roughly +80/−1 in one file. The "+30" in the previous report assumed a single test.
Severity: blocking. ~80 % of the diff is a second mechanism (preflight) that duplicates checks at every call site (cache.rs:2797-2803, :3671-3677; core.rs:618-620, :627-632; conversion.rs:364-366) and cannot change the outcome, while the publishers that actually fail (#54) — cache.rs:2817, :3696, export.rs:742, conversion.rs:436, edit.rs:250 — are left bare.
#17 [high] Research summary
Verdict: should not be merged at this size — the ~6-line hard-link fallback is the fix; about 80 % of the diff is a second mechanism that changes no outcome.
The change at head 41f1c76: +468 / −22 across 7 files (archive.rs, binding.rs, core.rs, cache.rs, conversion.rs, model_core.py, and a new 68-line Python test file). Five new Rust tests plus one new Python test file for one branch.
Could remove: about 378 of the 468 added lines, in four places, leaving ~80 lines in heliopause/src/export/archive.rs (the branch, the EEXIST test, one errno test).
- Blocking (~244 lines): the whole "directory publication preflight" —
preflight_directory_publication/_with(helios/src/core/cache.rs:4174-4261), its three tests (:4518-4587), tests/preparation/test_directory_preflight.py, theexport_preflight_directorypyfunction and registration (binding.rs:120-128), and five call sites (cache.rs:2804, :3678; core.rs:640-642; conversion.rs:316-317; model_core.py:41-42). Every call site already checks the destination immediately before (cache.rs:2797-2803, :3671-3677; core.rs:618-620, :627-632; conversion.rs:364-366), andrename_noreplaceat cache.rs:2817/3696 returns the same EINVAL. It also reimplementstoken()/unique_staging/TempDirectory, and creates/removes a probe directory in the user's output parent even though its doc says it "reserves nothing" (cache.rs:4175 vs :4205-4218). - Should fix (~71 lines):
capture_with_owners(binding.rs:97-118) has one caller and one test that exists only to inject the preflight failure; main's inline body (main binding.rs:14-100) is equivalent. - Should fix (~63 lines): archive.rs:438-555 has two duplicate test pairs (install vs cleanup, and the two "error preserved, destination not created" tests); one of each is enough, and
install_blob_after_rename_error(:298-313) can be inlined intoinstall_blob(:259-297). - Nit (~2 lines): revert the purposeless
synchronizereorder incommit_standalone(cache.rs:3670-3679 vs main cache.rs:3669-3677).
Left behind: cache.rs:2817 (export_entry), :3696 (commit_standalone), helios/src/core/export.rs:742 (publish_staged_directory), conversion.rs:436 and edit.rs:250 (not opened) are still bare rename_noreplace with no fallback, so on mergerfs the default directory export still fails with EINVAL one step later (Issue #54; also reported by original-el8 in the thread). "Fixes #54" should be "partially fixes" unless the 6-line fallback reaches those sites — which would also let the preflight go entirely.
Judged against AGENTS.md:188-199 ("Reject unsupported abstractions and churn", "Require focused, meaningful validation"). Details and line numbers are in scratchpad notes 11-16, which supersede notes 1-8; the previous report (#10) over-counted, and its "~+30/−1" estimate assumed only one retained test.
#3 [medium] Nit: commit_standalone reorders synchronize for no reason (churn)
helios/src/core/cache.rs:3117-3151 commit_standalone (changed by this PR at 3117-3125):
Before (main):
pub fn commit_standalone(mut self, destination: &Path) -> Result<()> {
synchronize(&self.directory)?;
if fs::symlink_metadata(destination).is_ok() { ...existing... }
...
After: the PR adds preflight_directory_publication(destination).map_err(failure)?; at 3125 and moves synchronize(&self.directory)? after it. Reordering synchronize is unrelated cleanup for this PR (AGENTS.md:170-175 "Reject unsupported abstractions and churn": unrelated refactoring must directly support the requested behaviour). Revert it: with the preflight deleted the reorder has no purpose, since the destination check at 3118-3124 already precedes the sync in either order.
Also note: commit_standalone has no distinction from export_entry for this fix — both end in rename_noreplace and both are reachable from publish_payload-adjacent code (conversion.rs:346, core.rs:990). Neither is covered by the PR's fallback, so neither is fixed by it; only the error moves earlier.
Lines saved: 1 net in cache.rs, but it removes an unrelated behavioural change (a long synchronize of the staged tree now runs after an extra probe directory create/remove).
#5 [medium] Should fix: one export runs the probe three times; capture_with_owners has one caller
Independent of whether the preflight mechanism stays, the PR wires it in four times for one export:
- ignition/preparation/model_core.py:41-42 (Python, before capture)
- heliopause/src/export/binding.rs:33-36 (inside
capture, per rank) - heliopause/src/export/core.rs:708-710 (
publish_payload) - helios/src/core/cache.rs:2358 (
export_entry) and 3125 (commit_standalone) plus helios/src/core/conversion.rs:245 (unpack_selected).
For one ignition export (model_core path) the probe runs at 1, then again at 3, then again at 4 — three create/rename/remove cycles of a .flare-rename-probe-* directory in the output parent, plus fs::create_dir_all(parent). One call site is enough for the stated purpose ("fail before capture"), and it is the earliest one; the other three are the subtraction. This also shows the check does not belong in three shared layers at once.
binding.rs:97-118 capture_with_owners + its test at 1046-1091 (~48 lines): the generic helper exists only to let the new test inject a failing capture closure. Nothing else calls it (search_code capture_with_owners → 2 hits: definition and the one call). Reverting export_capture to main's inline shape (main binding.rs:32-102) removes the closure pair, the generic, and the test, and loses no behaviour: main's ordering (capture, drain, then release owners only if drain succeeded) is preserved by the new code verbatim.
#9 [medium] Rules cited and verification checklist for the report
Rules cited (judge against these, not preference):
- AGENTS.md:170-175 "Reject unsupported abstractions and churn": no frameworks, extension points, speculative compatibility, fallback layers or config switches without a concrete requirement; refactoring must directly support the requested behaviour. Basis for items 1 and 5.
- AGENTS.md:176-181 "Require focused, meaningful validation": tests must exercise the affected behaviour; tests proving the same thing twice are not validation. Basis for item 2.
- docs/design-review.md:16-25 (principle 1, keep Helios simple) and :122-133 (principle 15, reject scope expansion) — the preflight adds a parent-creating, RNG-naming filesystem prober to the shared cache layer for a packaging concern. Basis for item 1.
- docs/design-review.md:134-149 + AGENTS.md:126-135 (required four-part PR description, claims must be honest) — "Fixes #54" is not met by the diff. Basis for item 4.
- Issue #54 "Possible changes" 1 and 2 present fallback or preflight as alternatives; the PR ships both, which is why the preflight is pure addition relative to the chosen fix.
- Reviewer original-el8 (PR #79 comment, 2026-10-26) independently identified the remaining bare
rename_noreplacesites and already flagged the double-remove concern that the PR resolved by droppingremove_file(temporary)(now archive.rs:481-483).
Verified in code: every call site's preceding destination check; rename_noreplace callers and their lack of fallback; that capture_with_owners has exactly one caller; that preflight_directory_publication has 4 production call sites plus tests; that fs::create_dir_all(parent) runs inside the "reserves nothing" probe; that blob.rs:204-211 treats EEXIST as reuse (so the hard-link fallback's EEXIST behaviour is needed and already correct).
Not verified / caveats to state honestly: no Rust build or test run was performed (macOS host, Linux-only paths, per the PR's own note); mergerfs was not available, so the EINVAL claim rests on issue #54's strace and the PR's unit tests. The probe-count-per-export claim follows call order model_core.py:42 → core.rs:709 → cache.rs:2358 for the single-host directory export; the multi-host path (host_ranks.py) reaches core.rs:709 and cache.rs:2358 instead.
#15 [medium] Nit: commit_standalone synchronize reorder is unsolicited churn (~1 line)
Head 41f1c76. helios/src/core/cache.rs:3670-3679 commit_standalone now checks the destination, runs the preflight and then synchronizes; main (main cache.rs:3669-3677) synchronizes first and then checks. Verified by reading both.
With the preflight deleted the reorder has no purpose and is unsolicited churn (AGENTS.md:188-193, "Reject unsupported abstractions and churn"). Reverting restores main exactly.
Lines saved: 1 added / 1 removed pair (net +1 in the diff).
#18 [medium] Detail: the Python preflight test asserts call order and the absence of its own subject
Head 41f1c76, file read in full (68 lines).
- :11-40
test_directory_preflight_stops_export_before_capturedoes enterexport_options(:33) and asserts call order (calls == [str(destination)], :37), no destination (:38), no staging (:39),_OPTIONSreset (:40). Butflare_heliopauseandtorchare faked at :28-31, so the probe itself is a stub namedreject; the test proves only thatmodel_core.export_corecalls the stub first. It cannot prove anything about rename support. - :43-52
test_cache_only_and_packed_exports_do_not_probe_directory_publicationis parametrized over(None,"directory")and("packed.safetensors","packed")and expectsRuntimeError"configured core cache" — i.e. it passes because_OPTIONSis unset (model_core.py:31-33 aborts before the probe). Itsunexpectedstub is dead: with a configured cache the assertion would still not distinguish probed from unprobed. ~13 lines that cannot fail on their subject. - :55-68
test_native_directory_preflight_preserves_existing_outputneeds a builtflare_heliopause, skips off Linux, and re-asserts what the three Rust tests at helios/src/core/cache.rs:4518-4587 already assert (empty parent after a probe, existing destination preserved).
Whole file goes with the preflight (see the blocking note). Nothing needs a replacement: the destination-not-replaced guarantee is already covered by helios/src/core/cache.rs:5497-5530 exported_entries_never_replace_existing_output and helios/src/core/export.rs:1917/1946.
#19 [medium] Rules cited, verification limits, and what was not run
Rules (read directly):
- AGENTS.md:165-169 — every contribution must address an explicit request or demonstrated defect; hypothetical consumers/lint alone do not establish need.
- AGENTS.md:188-193 — "Reject unsupported abstractions and churn": no fallback layers, extension points or configuration switches without a concrete requirement; refactoring must directly support the requested behaviour. (The preflight is a second fallback layer for a case
rename_noreplacealready reports.) - AGENTS.md:194-199 — "Require focused, meaningful validation": tests must exercise the affected behaviour, mocks cannot establish runtime correctness, each PR focused on one coherent outcome. (Applies to the stubbed Python test and to the duplicate archive.rs tests.)
- README.md (charter line 12 in the orientation packet): keep the runtime small. Weaker but consistent.
- Issue #54 "Possible changes" lists the hard-link fallback or a preflight as alternatives; the PR ships both.
Verified by reading at head 41f1c76: every claim in notes 11-16 — preflight call sites and their pre-existing destination checks (cache.rs:2797-2803, :3671-3677; core.rs:618-620, :627-632; conversion.rs:364-366), rename_noreplace callers with no wrapper (cache.rs:2817, :3696; export.rs:742; conversion.rs:436; edit.rs:250), capture_with_owners single caller, the duplicate test bodies, main's commit_standalone order (main cache.rs:3669-3677), BlobStore::commit treating AlreadyExists as reuse (blob.rs:204-211), the preflight creating the parent (cache.rs:4205), existing helpers token() (cache.rs:3537-3543), unique_staging/staging_token (conversion.rs:2603-2623), TempDirectory (conversion.rs:2595-2601), and pre-existing coverage of no-replacement (cache.rs:5497-5530, export.rs:1917/1946).
Not run: no cargo build/cargo test and no pytest (macOS review host; the PR itself says the Heliopause Cargo tests do not compile there because unchanged Helios code uses Linux-only APIs). mergerfs was unavailable, so the EINVAL behaviour rests on issue #54's strace and the PR's own unit tests. No filesystem-level reproduction of the probe's side effects. Say so in the report.