Code review summary scratchpad · NVIDIA/hyperflare-inference #79

Raw Markdown for agents: https://autobot.eidonix.com/p/20664c7b-a344-49ba-bbc7-52ed5bfc4287.md

#1 [high] PR #79 overview, head 06b9011, verified state

PR #79 "fix(heliopause): fall back when no-replace rename is unsupported", author efegokdemir, branch efe/fix-mergerfs-blob-install, head 06b9011a, +468/−22 over 7 files. Fixes/refs issue #54 (ignition export fails EINVAL at blob commit on mergerfs; preparation pass ~20 min wasted). Files: heliopause/src/export/archive.rs +139/−1; heliopause/src/export/binding.rs +91/−20; heliopause/src/export/core.rs +3; helios/src/core/cache.rs +163/−1; helios/src/core/conversion.rs +2; ignition/preparation/model_core.py +2; tests/preparation/test_directory_preflight.py +68 (new). Prior discussion: original-el8 (2026-10-26) — blob fallback correct, but other no-replace renames uncovered; "Fixes" → "Partially fixes"; earlier nit about remove_file after link already fixed in head. yatesdr review CHANGES_REQUESTED (2026-11-18): (1) conflicts with main in helios/src/core/conversion.rs, (2) preflight never runs from ignition export, keep one check, drop capture_with_owners, (3) description doesn't match branch. Should-fix 4-7: one errno set; python test only checks call order; fold repair commits + Signed-off-by; document rename requirement at docs/multi-host.md:275. Verified at head: blob fallback archive.rs:432-486 (install_blob → install_blob_after_rename_error, hard_link at 481, "BlobStore::commit owns temporary cleanup" at 482, errno set EINVAL|ENOTSUP at 479); caller blob.rs:194-224 treats EEXIST as reuse, removes temporary at 216 and tolerates NotFound 218-223. Directory preflight cache.rs:3621-3708. Charter: "smallest footprint in shared code", bug fixes address root cause, four-part PR descriptions. AGENTS.md:170-175 (no speculative layers/churn), 176-181 (mocks cannot establish runtime correctness), 47-55 (docs/TODO.txt for unrun checks). CONTRIBUTING.md:7-20 (Signed-off-by required).

#2 [high] Blockers: dead/duplicated preflight, probe side effects, stale description

B1 — directory-preflight half is dead where it matters and duplicated 5x.

B2 — the probe mutates before validating. cache.rs:3652 fs::create_dir_all(parent)? inside a function whose doc says "this probe reserves nothing" (:3621-3622); it then creates .flare-rename-probe-<32hex> (0o700) plus source/target children (:3653-3682). Caller helios/src/core/conversion.rs:245 runs it before payloads.verify() (:247-248) and before the existing output.exists() check (:289-291), so a corrupt source core now leaves a created output parent behind, and an existing destination now reports "directory export preflight: destination exists" (conversion.rs:245-246) instead of "destination exists: {output}" (:290). Python-side callers already pre-check (core_snapshot.py:53-54, 66-67, 78-79, 89-90, 109-110 → FileExistsError).

B3 — description mismatch. Head description: "Fixes #54", "the link installs ... then the temporary name is removed" (contradicted by archive.rs:482 and test archive.rs:632), covers only archive.rs of 7 files, never mentions preflight_directory_publication, the new pyfunction, model_core.py, or test_directory_preflight.py; evidence "focused helper harness passed 3 tests" names no command while the diff adds 5 Rust tests (archive.rs:612, 632, 663, 686, 708) + a new Python file; helios crate compile status unknown. AGENTS.md:67-135 requires why/what/result/evidence in that order; :124-127 bans process assurances without technical evidence. Also head conflicts with main: main:300-321 wraps unpack_selected → unpack_with(&StartupProgress::silent()) and verifies via verify_stored_data, while head keeps a 12-line unpack_selected body with the preflight at :245 → the added hunk will not apply (yatesdr's blocking item 1 is real).

#3 [high] Should Fix: errno split, unguarded publishers, duplicate checks, tests, docs

SF1 errno policy split: archive.rs:477-480 falls back only on EINVAL|ENOTSUP; cache.rs:3685-3696 also accepts ENOSYS (matches!(error.raw_os_error(), Some(libc::EINVAL | libc::ENOTSUP | libc::ENOSYS))). Both probe the same syscall (archive.rs uses glibc libc::renameat2; cache.rs:3712-3732 rename_noreplace uses libc::SYS_renameat2). Repository precedent: selene/src/disk.rs:1100-1104 Some(libc::EOPNOTSUPP | libc::ENOSYS) => Ok(()). On a kernel/container without the syscall, directory export says "filesystem ... does not support atomic no-replace directory publication" while blob install in the same export reports raw ENOSYS. Fix: one predicate beside rename_noreplace (cache.rs:3710-3732), used by both.

SF2 unguarded publication sites (the remaining #54 instances): helios/src/core/export.rs:735-749 publish_staged_directory — doc comment claims it is "Shared by the cache entry export and by exports without a configured cache, so both have identical durability and no-replacement semantics", calls rename_noreplace at :742 with no probe/fallback; reached from heliopause/src/export/core.rs:1070 (publish_payload's no-cache branch). helios/src/core/conversion/edit.rs:249-252 (edit) calls rename_noreplace directly, reached via heliopause/src/export/conversion.rs:200-208 export_payload_edit. Both fail on mergerfs exactly as #54 describes.

SF3 duplicated destination checks and messages: probe re-checks fs::symlink_metadata(destination) at cache.rs:3641-3650 returning "destination exists" while every caller already checked with "export destination {} already exists" (cache.rs:2351-2356, :3118-3123), core.rs:686-688/695-700 "payload export destination already exists", conversion.rs:289-291 "destination exists: {}". Fix: keep one check/message.

SF4 the new Python test cannot fail as written for its subject: test_directory_preflight.py:43-52 calls export_core without an export_options context, so model_core.py:31-33 raises RuntimeError("export requires the configured core cache") first and the unexpected probe never runs (pytest.raises matches that same message). :11-40 replaces flare_heliopause/torch/torch.distributed in sys.modules → asserts call order on a path production never takes (path is None). AGENTS.md:176-181.

SF5 docs: no doc file changed. Requirement belongs beside docs/multi-host.md:275-278 (same-filesystem rule) and/or docs/core-format-design.md:697-704 (which already promises explicit preflight errors for size/space limits). docs/TODO.txt has no mergerfs/rename entry (search: no matches). AGENTS.md:47-55 requires unrun checks in TODO.txt.

SF6 redundant/misleading tests in archive.rs: :632-661 duplicates :611-629's "temporary still present" assertions; the 0o555 chmod premise does not hold when the suite runs as root; :686-706 and :708-728 are two ~20-line tests of one 8-line helper. Keep :611-629 and :662-684 (EEXIST contract) + one parameterised error test. Also no test drives install_blob's real renameat2 branch or a real unsupported filesystem.

#4 [high] Nits and verified positives

N1 tests/preparation/test_directory_preflight.py:1 has no SPDX header (line 1 is the docstring); every sibling carries the 3-line Apache-2.0 header (tests/preparation/test_native_publication.py:1-3). N2 capture_with_owners extraction (heliopause/src/export/binding.rs:97-118) exists only to host the unreachable binding preflight and its own stub test (binding.rs:~1046-1093) which fakes capture/drain closures; if the binding probe goes, inline it back. Same hunk leaves redundant bindings: let result = match recorder_lock {...} at :37 and the bare result at :85 — the and_then chain is already the tail expression. N3 probe reinvents unique naming: cache.rs:3653-3665 uses ring::SystemRandom + 16-byte hex + unbounded EEXIST loop, while the same module has token() at cache.rs:2991 used by the neighbouring export_entry (:2366) and commit_standalone (:3133); archive.rs:412-431 temporary() is the bounded create_new precedent; conversion.rs:2462-2481 staging_token/unique_staging is the same pattern in the same crate. ring is already a runtime-core dep (helios/Cargo.toml:21,:42) so no new dependency, just redundant code and an untestable error arm. N4 doc comment at cache.rs:3621 says "before preparing a standalone export" but callers include export_entry/publish_payload (plain ignition export) and unpack_selected (ignition convert --output DIR); second sentence "this probe reserves nothing" is accurate and worth keeping. N5 #[cfg(any(target_os = "linux", test))] (archive.rs:471) is a new cfg form (only occurrence in the tree); on non-Linux test builds the helper compiles with libc EINVAL/ENOTSUP but its caller is inside #[cfg(target_os = "linux")] → dead code there, currently masked by the unrelated Helios compile failure the PR mentions. Prefer #[cfg(target_os = "linux")] + #[cfg(all(test, target_os = "linux"))]. N6 commit_standalone reorders synchronize (cache.rs:3117-3126): synchronize(&self.directory) was the first statement on main, now follows the existence check and the probe; harmless but unexplained churn. N7 Title "fix(heliopause): fall back when no-replace rename is unsupported" omits the directory half; commit hygiene reported by yatesdr (CONTRADICTED? not verified): repair commits 17a4aa76/30ccc0de not folded, merge commit 06b9011a instead of rebase, Signed-off-by missing on 989f013b/2c57bfa8/17a4aa76/30ccc0de — CONTRIBUTING.md:7-20 requires it. Tools cannot read trailers, so report as reported-by-reviewer. Positives to state: blob fallback is the right root-cause fix (archive.rs:477-484 hard_link, EEXIST reuse at blob.rs:204-211, cleanup at blob.rs:216-224, readonly+sync before install at blob.rs:190-191, EXDEV impossible since temporary and destination share the directory at blob.rs:177-178); matches existing precedent install_payload/install_legacy (cache.rs:2583, :2608). Non-Linux behaviour unchanged (cache.rs:3626-3630). Probe cannot clobber user data (only renames inside its own 0700 dir). No model-specific branch. Earlier nit (remove_file after link) is fixed in head.

#5 [high] FULL REPORT — PR #79 review (all findings)

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

Head 06b9011 · base main · 7 files · +468/−22 · fixes #54 · author efegokdemir

What is already right (do not change)

Blockers

1. The directory-preflight half cannot run where #54 happens, and leaves the two publishers that matter unguarded

Files: ignition/preparation/model_core.py:41-42 · heliopause/src/export/binding.rs:33-36, 120-124, 128 · heliopause/src/export/core.rs:708-710 · helios/src/core/cache.rs:2358, 3125 · helios/src/core/conversion.rs:245

Finding. ignition export passes path=None on both entry points (ignition/cli/serve.py:371 and :240 → host_ranks.py:460 cache_only = path is None). On that path cache_only is True, so model_core.py:41 is skipped; ranks are exported with sources=True (model_core.py:52, host_ranks.py:470), so binding.rs:34 is skipped; publish_payload skips its call because cache_only (core.rs:683, :708); and export_entry is never reached (core.rs:973). Net: zero probes execute for the workflow in #54, because that workflow publishes no directory at all — its only publication is the blob commit, which the fallback already fixes. The probes that do exist run where a directory is published: cache.rs:2358 (export_entry, used by convert-with-cache at heliopause/src/export/conversion.rs:346 and the cache export at core.rs:990), conversion.rs:245 (ignition convert --output DIR), binding.rs:35 (only non-sources captures), cache.rs:3125 (test-only; commit_standalone has three callers, all tests: cache.rs:4441, 4447, 4557). Meanwhile the one shared publisher, helios/src/core/export.rs:735-749 publish_staged_directory, whose own doc comment claims "identical durability and no-replacement semantics" for both export shapes, still calls rename_noreplace bare at :742 (reached from core.rs:1070), and helios/src/core/conversion/edit.rs:249-252 (edit) does the same. Both still fail on mergerfs exactly as #54 describes.

Request. Keep one check, and put it where a directory is actually published: inside publish_staged_directory (helio/src/core/export.rs:735) and in edit (conversion/edit.rs:249) — or, if you prefer the fallback original-el8 suggested, apply the directory fallback there. Delete model_core.py:41-42, binding.rs:33-36, the export_preflight_directory pyfunction (binding.rs:120-124) and its registration (:128), cache.rs:3125, and the core.rs:708-710 call. The repository already publishes a directory on mergerfs successfully with a plain check-then-fs::rename (helios/src/core/conversion.rs:3359-3381, combine), so a directory fallback is feasible and precedented.

Why. AGENTS.md:170-175 rejects "fallback layers, or configuration switches without a concrete requirement" and requires refactoring to "directly support the requested behavior"; AGENTS.md:176-181 says not to present partially wired features as supported. Five copies of a check, two of which production cannot reach, with a new public Python function nothing calls, is scaffolding — and it is scaffolding that leaves the real defect open.

2. The preflight mutates the destination before validating, and reorders an established error

File: helios/src/core/cache.rs:3641-3665 · caller helios/src/core/conversion.rs:245-248 vs :289-291

Finding. preflight_directory_publication_with calls fs::create_dir_all(parent) at :3652 inside a function whose own doc says "this probe reserves nothing" (:3621-3622), then creates a .flare-rename-probe-<32 hex> directory (0o700) plus source/target children on the user's destination filesystem. unpack_selected runs it before payloads.verify() (conversion.rs:247-248) and before the existing-destination check (:289-291), so: (a) a corrupt or invalid source core now leaves a created output parent directory behind, where the tree is otherwise cleaned up (:333-335); (b) an existing destination now reports "directory export preflight: destination exists" instead of the established "destination exists: {output}" (:290), which Python callers and their FileExistsError pre-checks rely on (ignition/preparation/core_snapshot.py:53-54, 66-67, 78-79, 89-90, 109-110).

Request. Never create the parent inside a check: return NotFound when the parent is missing, or run the probe immediately before the rename_noreplace it validates. Order it after payloads.verify() and after (or instead of) the output.exists() check, so the existing error and its message are preserved.

Why. AGENTS.md:165-169 forbids weakening guarantees, and validating by writing contradicts the documented property that a failed publication leaves no partial output (docs/core-format-design.md:697-702).

3. Rebase: the unpack_selected hunk is stale against main

Files: helios/src/core/conversion.rs:240-248 (head) vs main:300-321

Finding. Main turned unpack_selected into a wrapper over unpack_with(source, output, selected, &StartupProgress::silent()) and verifies through verify_stored_data; head still carries the inline 12-line body with the new probe at :245 and payloads.verify() at :248. yatesdr's review already reports a content conflict in this file (helios/src/core/conversion.rs against main). The hunk has to be rebased (and, per finding 1, preferably dropped).

Request. Rebase onto current main and re-place or remove the check in unpack_with; verify with git merge-tree --write-tree HEAD origin/main.

Why. The branch cannot be merged as is, and the call ordering in finding 2 has to be re-derived against unpack_with anyway.

4. The description describes the previous commit series, not this branch

File: PR description at head 06b9011

Finding. (a) It says the fallback "installs ... then the temporary name is removed" — head deliberately leaves cleanup to BlobStore::commit (archive.rs:482; test archive.rs:632). (b) It says "Fixes #54", but the reported failure is the blob commit and the directory publications that remain unguarded (finding 1) still fail on mergerfs. (c) It describes 1 of 7 changed files and never mentions preflight_directory_publication, export_preflight_directory, ignition/preparation/model_core.py, or tests/preparation/test_directory_preflight.py, nor the new requirement that a destination filesystem support no-replace directory rename. (d) The evidence paragraph ("a focused helper harness passed 3 tests") names no crate, command or test, while the diff adds five Rust tests (archive.rs:612, 632, 663, 686, 708) and a new Python file, and the crate the largest change lives in (helios) is not reported as compiled.

Request. Rewrite as "Partially fixes #54"; state the problem first (mergerfs returns EINVAL for renameat2(RENAME_NOREPLACE); the failure lands after the ~20-minute preparation pass); describe both halves with before/after; correct the cleanup sentence; name the new filesystem requirement; and give the exact commands and results, including what was not run (helios tests, a live mergerfs run).

Why. AGENTS.md:67-135 requires why / what / result / evidence in that order and bans process assurances without technical evidence (:124-127). A reviewer cannot currently tell which of the seven files is the fix and which is scaffolding.

Should fix

5. One no-replace policy, two divergent errno sets

Files: heliopause/src/export/archive.rs:477-480 vs helios/src/core/cache.rs:3685-3696

The same question — "does this filesystem support no-replace rename?" — is answered with EINVAL | ENOTSUP for the blob and EINVAL | ENOTSUP | ENOSYS for the directory probe, over the same syscall (glibc renameat2 at archive.rs:438-446; libc::SYS_renameat2 at cache.rs:3712-3732). The repository already decided this question once, at selene/src/disk.rs:1100-1104 (Some(libc::EOPNOTSUPP | libc::ENOSYS) => Ok(())). A kernel or container that filters the syscall would make the directory probe report a clean "filesystem does not support …" while the blob in the same export dies on a raw ENOSYS. Request: one predicate beside rename_noreplace (cache.rs:3710), called from both, with the chosen set commented.

6. The probe re-implements helpers that exist in the same module

File: helios/src/core/cache.rs:3653-3665, 3697-3707

ring::SystemRandom + 16-byte hex + an unbounded AlreadyExists loop, next to token() (cache.rs:2991) which the two neighbouring publication paths already use (:2366, :3133); archive.rs:412-431 (create_new inside a bounded 0..100 loop) and conversion.rs:2462-2481 (staging_token/unique_staging) are the established patterns; conversion.rs:2454-2460 has the RAII TempDirectory guard that would replace the manual (result, cleanup) match. Nothing security-relevant depends on the probe name being unguessable. Request: .flare-rename-probe-{token()} with create + ?, and keep one error mapping.

7. Duplicate destination checks with two vocabularies

Files: helios/src/core/cache.rs:3641-3650 vs :2351-2356, :3118-3123; heliopause/src/export/core.rs:686-700; helios/src/core/conversion.rs:289-291

The probe re-checks symlink_metadata(destination) and returns "destination exists" although every caller immediately checked the same thing with a different message ("export destination … already exists", "payload export destination already exists", "destination exists: …"). core.rs even has the check twice (:686-688 and :695-700). Tests now assert one of the three messages (tests/preparation/test_directory_preflight.py:65). Request: one check, one message per component.

8. The new Python test cannot fail on its stated subject, and the archive.rs tests overlap

Files: tests/preparation/test_directory_preflight.py:43-52, 11-40; heliopause/src/export/archive.rs:632-661, 686-728

test_cache_only_and_packed_exports_do_not_probe_directory_publication calls export_core without an export_options context, so model_core.py:31-33 raises RuntimeError("export requires the configured core cache") first — pytest.raises(RuntimeError, match="configured core cache") matches that, so the probe under test can never run and the assertion would hold even if the guard were lost. The other test replaces flare_heliopause, torch and torch.distributed in sys.modules, so it asserts call order on a path production never takes. In archive.rs, :632-661 repeats :611-629's "temporary still present" assertions (its 0o555 premise does not hold when the suite runs as root) and :686-706 / :708-728 are two ~20-line tests of one 8-line helper. No test drives install_blob's real renameat2 branch. Request: give the second test an export_options(...) context (or delete it with the hook); drop :632-661; merge the two error tests into one parameterised case over [PermissionDenied, EINVAL, ENOTSUP]; state that the fallback is covered by injected errnos only.

9. The new filesystem requirement is documented nowhere

Files: docs/multi-host.md:275-278; docs/core-format-design.md:697-704; docs/TODO.txt; docs/cli-design.md (convert --output)

No changed file is a document, yet directory publication now refuses a filesystem without no-replace rename support, and ignition convert --output DIR, ignition edit and cached exports inherit that. docs/multi-host.md:275-278 tells operators output and cache must share a filesystem and says nothing about rename support — exactly the trap #54 describes. docs/core-format-design.md:703-704 already promises an explicit error for file-size/space limits; rename semantics is the same class. docs/TODO.txt has no entry for the unrun mergerfs reproduction. Request: one or two sentences beside multi-host.md:275 naming the requirement, the EINVAL/ENOTSUP/ENOSYS symptom and the workaround (destination on a local/ZFS/ext4 filesystem); extend core-format-design.md where the hardlink rule is stated; add the unrun check to TODO.txt (AGENTS.md:47-55).

Nits

10. New test file is the only one under tests/preparation/ without the SPDX header

tests/preparation/test_directory_preflight.py:1 — line 1 is the docstring. Add the three-line Apache-2.0 header used by tests/preparation/test_native_publication.py:1-3 and every sibling.

11. capture_with_owners and leftover bindings

heliopause/src/export/binding.rs:97-118 extracts lease/drain only so the (unreachable) binding preflight can be tested; its test (:1046-1093) fakes the capture and drain closures, so helper and test only prove each other (AGENTS.md:176-181). If the probe goes, inline it back. The same hunk leaves let result = match recorder_lock {…} at :37 and the bare result at :85 redundant — the and_then chain is already the tail expression.

12. Probe doc comment and cfg

cache.rs:3621 says the check is "before preparing a standalone export" but its callers include a plain export and ignition convert --output DIR; say "before publishing a directory core" and keep the correct "this probe reserves nothing" sentence. #[cfg(any(target_os = "linux", test))] (archive.rs:471) is the only occurrence of that form in the tree, and on non-Linux test builds the helper is compiled but never called because its caller is Linux-only (currently masked by the unrelated Helios compile failure) — prefer #[cfg(target_os = "linux")] plus #[cfg(all(test, target_os = "linux"))].

13. Unexplained synchronize reorder

helios/src/core/cache.rs:3117-3126: synchronize(&self.directory) was the first statement on main and now follows the existence check and the probe. Harmless, but nothing in the diff or a test explains it; restore it or say why.

14. Title and commit hygiene

The title ("fix(heliopause): fall back when no-replace rename is unsupported") omits the directory half, which is most of the diff; e.g. "fix(export): fall back for blob publication and preflight directory no-replace support". Reported by yatesdr and not verifiable with these tools: commits 989f013b, 2c57bfa8, 17a4aa76 and 30ccc0de lack Signed-off-by (CONTRIBUTING.md:7-20 requires it on every commit), repair commits should be folded into what they repair, and main should be rebased onto rather than merged (06b9011a).

Not findings (verified and cleared)

#6 [high] SUMMARY REPORT (GitHub post text)

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

The blob hard-link fallback is the right fix for #54 and is correct as written. Most of the diff, however, is a directory-publication preflight that cannot run from ignition export, leaves the two directory publishers that still fail on mergerfs unguarded, and mutates the destination while checking it. Not ready to merge. Full detail is in the case file and the full report.

Blockers

Should Fix

Nit

#7 [high] Corrections to apply to entries 5 and 6

Precision fixes to entries 5 and 6 — apply these exact wordings.

  1. In FULL REPORT finding 9 (undocumented requirement), replace "and ignition convert --output DIR, ignition edit and cached exports inherit that" with: "and the paths it is enforced on are ignition convert --output DIR (unpack_selected), the cache-entry export (Root::export_entry), and publish_payload's no-cache branch (publish_staged_directory). Note ignition export itself publishes no directory at all: it requires a configured core cache (model_core.py:31-33, host_ranks.py:457-459), cache_only is always true there, so core.rs:973 never calls export_entry. ignition edit (conversion/edit.rs:249) is unguarded and still fails with the raw error."

  2. In FULL REPORT finding 1, add as a closing sentence: "Because ignition export publishes no directory, the PR's Fixes #54 claim can be made accurate simply by keeping the blob fallback and saying so; the probe is not needed for that path at all."

  3. In SUMMARY blocker 1, keep as is but note ignition export requires a configured cache and publishes no directory — so the description's "Fixes #54" is defensible if rewritten as "the blob commit that #54's traceback shows"; the request to keep one check where a directory is published stands because convert --output DIR, edit, export_entry and publish_staged_directory all still fail on mergerfs.

  4. In FULL REPORT finding 7, soften "Three destination checks, three messages" to "Duplicate destination checks with divergent messages" (the messages quoted are three distinct strings across cache.rs:2352, core.rs:687, conversion.rs:290 and the probe's own at cache.rs:3645).

#8 [high] Research summary

Both deliverables are written to the scratchpad: entry 5 is the full report (Blockers, Should Fix, Nits, each with finding, request and why, plus a verified-positives section), and entry 6 is the GitHub-ready summary (4 blockers, 5 should-fix bullets, 1 nit bullet — within the 10-bullet cap). Entry 7 holds the exact corrections to apply to two imprecise statements.

Verdict: not ready to merge. The blob half is correct and is the real fix for #54; the directory-preflight half (most of the 468 added lines) is the problem.

Blockers: (1) the directory preflight cannot run where #54 happens — ignition export passes path=None (ignition/cli/serve.py:371, :240 → host_ranks.py:460) so model_core.py:41-42 is skipped, binding.rs:33-36 is skipped on sources=True ranks, cache.rs:3125 is test-only, while the publishers that do run unguarded — helios/src/core/export.rs:735-749 publish_staged_directory (bare rename_noreplace at :742) and helios/src/core/conversion/edit.rs:249-252 — still fail on mergerfs; (2) the probe mutates the destination before validating (cache.rs:3652 create_dir_all inside a function documented as reserving nothing) and conversion.rs:245 runs before payloads.verify() and the established destination exists check; (3) the branch does not apply to main — main made unpack_selected a wrapper over unpack_with, so the conversion.rs:245 hunk sits in deleted code; (4) the description is stale ("temporary name is removed", "Fixes #54", 1 of 7 files, unusable evidence) and violates AGENTS.md:67-135.

Should fix: two divergent errno policies for one syscall (archive.rs:479 vs cache.rs:3687 vs the selene/src/disk.rs:1102 precedent); the probe re-implements token()/TempDirectory; duplicate destination checks with three message vocabularies; the new Python test cannot fail on its subject (no export_options context) and the archive.rs tests overlap with none driving the real renameat2 branch; the new filesystem requirement is undocumented (docs/multi-host.md:275, docs/core-format-design.md:703, docs/TODO.txt). Nits: missing SPDX header, the capture_with_owners extraction plus leftover redundant bindings, the probe's too-narrow doc comment and the one-off #[cfg(any(target_os = "linux", test))], the unexplained synchronize reorder, and the title/commit hygiene (Signed-off-by reported by yatesdr, not verifiable here).

Evidence limits recorded: no Rust or Python test was run here; the mergerfs EINVAL claim rests on #54's reproduction and the PR's injected-errno tests.

#9 [high] Reconciliation with prior rounds + final-report checklist

Meta-note for the final report: how this round's conclusions sit against the six prior-round agent outputs.

CONFIRMED (and re-verified in code at head 06b9011):

CORRECTED / DROPPED:

WHAT THE FINAL REPORT MUST NOT MISS:

  1. State plainly that the blob fallback is correct, minimal, precedented and should be kept (archive.rs:477-484, blob.rs:177-178/190-191/204-211/216-224; precedent cache.rs:2583, :2608) — the author should not be asked to touch it.
  2. Give the author a concrete smallest path forward: keep archive.rs, delete the preflight machinery (model_core.py:41-42, binding.rs:33-36 + pyfunction 120-124 + registration 128, core.rs:708-710, cache.rs:2358 and :3125, conversion.rs:245, tests/preparation/test_directory_preflight.py, cache.rs:3621-3708 and its three tests), revert capture_with_owners and the commit_standalone reorder, then either add one guard where a directory is published (publish_staged_directory helios/src/core/export.rs:735 and edit conversion/edit.rs:249) or explicitly scope the PR to the blob commit and say so in the description.
  3. Keep the description rewrite as a blocker with the four required parts named.
  4. Note the honest evidence limits: no test was run in this review; the mergerfs EINVAL claim rests on #54's reproduction and the PR's injected-errno tests.

#11 [high] FULL REPORT — PR #79 (round 2, head 41f1c76)

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

Head 41f1c76 (merge of main, 2026-11-27), base main, 7 files, +468/−22. Previous blocker "branch does not apply to main" is RESOLVED: unpack_selected is again a one-line wrapper (conversion.rs:300-302) and the probe sits in unpack_with.

Key findings

Blockers (3)

B1. The preflight cannot run where #54 happens, and the publisher that does run is unguarded

Evidence: ignition export passes no destination — serve.py:229 (prepared.export(None, ...)) and serve.py:330 (export_core(..., None, ...)); export defines no --output (ignition/cli/init.py:169-192 defines it only for sign/edit/combine/convert). Therefore:

B2. The probe writes to the destination inside a documented no-op check and reorders an established error

Evidence: preflight_directory_publication (cache.rs:4174-4175) says "this probe reserves nothing", yet preflight_directory_publication_with calls fs::create_dir_all(parent) at cache.rs:4205 and creates/removes a .flare-rename-probe-<hex> directory (:4206-4218, :4237). Three call sites already perform a read-only existence check before it (cache.rs:2797-2803, :3671-3677, conversion.rs:364-366). In unpack_with the probe runs at conversion.rs:316-317, before verified.payload_files() (:318), before verify_stored_data (:323) and before the established destination exists: {output} check at :364-366, so ignition convert to an existing path now reports directory export preflight: destination exists instead of destination exists: <path>, and a conversion rejected at verification has already created the output parent. Ask: never create the parent in a check (return NotFound and let publication create it), and if any probe survives, run it after verification and after the existing existence check. Why: it contradicts three doc contracts (cache.rs:4174-4175, :2793-2795, :3667-3669) and changes a user-visible error on a supported command; the subtraction fix removes the whole problem.

B3. The description's claims and evidence do not match head

Evidence (read_item 79, body):

Should Fix (3)

F1. One no-replace policy, two errno sets, two crates

archive.rs:304-306 treats only EINVAL|ENOTSUP as unsupported; cache.rs:4238-4249 also accepts ENOSYS (and ErrorKind::Unsupported). The repo's precedent is selene/src/disk.rs:1308-1311 (EOPNOTSUPP | ENOSYS). A filesystem answering ENOSYS gets a working blob fallback but a hard directory refusal, and vice versa for a future edit. Ask: one predicate beside rename_noreplace (cache.rs:4263), used by the blob error path and any surviving probe, with the chosen errno set stated in one comment. Why: one syscall question must have one answer; duplicating it across the Helios/Heliopause boundary is exactly the policy split the repo rejects.

F2. The changed publication behaviour is documented nowhere

Verified: docs/multi-host.md:314-316 (same-filesystem rule) says nothing about rename support; docs/core-format-design.md:713-714 promises an explicit preflight/export error for filesystem limits; docs/TODO.txt has no entry matching mergerfs / renameat2 / no-replace. Ask: one or two sentences beside docs/multi-host.md:314-316 saying blob installation now falls back to a hard link when the filesystem rejects a no-replace rename, and a docs/TODO.txt entry for the unrun mergerfs reproduction. If the probe half is kept, also state there that directory publication requires no-replace rename support. Why: AGENTS.md requires supported configurations to be stated and unrun checks recorded; issue #54's own "Possible changes" asks for this note.

F3. Description mechanics

Subtract / Simplify (4 items, ≈370–380 of 468 added lines)

S1. Delete the entire directory-publication preflight (~244 lines)

Location Lines
cache.rs:4174-4261 preflight fn + _with 88
cache.rs:4518-4587 three tests ~70
tests/preparation/test_directory_preflight.py (new) 68
binding.rs:33-36 call, :120-124 pyfunction, :128 registration ~9
core.rs:640-642 call 3
cache.rs:2804, :3678 calls 2
conversion.rs:316-317 call 2
model_core.py:41-42 call 2
Replacement: nothing. Nothing is lost: every remaining caller already checks the destination
(cache.rs:2797-2803, :3671-3677, conversion.rs:364-366; core.rs:618-620 plus the pre-existing
duplicate :627-632), and the verdict is re-derived at publication by rename_noreplace
(cache.rs:2817, :3696, conversion.rs:436, export.rs:742). The probe also re-implements existing
helpers: token() (cache.rs:3537, already used at :2812 and :3686) instead of a hand-rolled
SystemRandom retry loop (cache.rs:4206-4218, 12 lines), and TempDirectory
(conversion.rs:2595-2601) instead of the manual cleanup match (cache.rs:4250-4260).
Its own tests cannot fail on the subject: test_directory_preflight.py:43-52 never enters
export_options, so model_core.py:31-33 raises configured core cache before line 41 and the
unexpected stub is dead; :11-40 fakes flare_heliopause/torch (:28-31) and asserts call order
only; :55-68 duplicates cache.rs:4518-4587.

S2. capture_with_owners and its test exist only for the deleted probe (~71 lines)

binding.rs:97-118 (22 lines, one production caller at :89) plus binding.rs:1494-1520 (47 lines) whose only purpose is injecting Err(invalid("unsupported publication")) for the probe. Main's inline body is the same capture → drain → release order. Restore it; the drain-failure message (binding.rs:106-115) moves back into export_capture where its inputs live. Why: AGENTS.md rejects extension points without a concrete requirement, and a mock that bypasses the behaviour cannot establish correctness.

S3. archive.rs has five tests for a four-line branch; keep two (~63 lines)

Keep unsupported_noreplace_rename_installs_blob_with_a_hard_link (archive.rs:439-456) — the behaviour the PR exists for — and unsupported_noreplace_rename_does_not_replace_an_existing_blob (:490-511) — the EEXIST guarantee BlobStore::commit relies on (blob.rs:204-211). Delete ..._leaves_temporary_cleanup_to_the_caller (:459-488, 32 lines): its premise is the 0o555 chmod at :472, which the documented container build (running as root) does not enforce, and its only extra assertion restates :453-454 plus the unchanged remove_temporary (:314). Merge other_rename_errors_are_preserved_without_installing_the_blob (:513-533) with unsupported_noreplace_rename_preserves_hard_link_errors (:535-555) — both assert "kind preserved, destination not created" for one Err(error.into()) at :312 (21 lines). Optionally inline the remaining test seam (install_blob_after_rename_error) into install_blob (~10 lines, behaviour identical).

S4. Revert the commit_standalone synchronize reorder (2 lines)

cache.rs:3678-3679 moved synchronize below the new existence check and probe. Nothing explains it, no test covers it, and the staging tree is private (copy_tree re-synchronizes the copy at :3692-3695). With the probe gone this is pure churn — restore main's order.

Nits (4)

N1. export_preflight_directory (binding.rs:120-124) maps every error to PyRuntimeError, whereas the Python export guards raise FileExistsError, and it collapses AlreadyExists and Unsupported into one type. Moot if S1 is taken. N2. #[cfg(any(target_os = "linux", test))] at archive.rs:298 is a new form in this tree; the established platform-alternates form is a Linux fn plus a not(target_os = "linux") fn (cache.rs:4265/4288, selene/src/disk.rs:1300/1314). Match it, or say in one comment why the test arm is needed (it keeps the tests off the Windows path). N3. tests/preparation/test_directory_preflight.py:1 has no # SPDX-License-Identifier: Apache-2.0 header; every sibling under tests/preparation/ carries one. Moot if the file is deleted. N4. Commit hygiene: repair commits sit on top of what they repair (30ccc0de repairs 989f013b) and main was merged rather than rebased (06b9011a, 41f1c76); squash so each commit states problem, behaviour and evidence. yatesdr's Signed-off-by finding (CONTRIBUTING.md) could not be verified with my tools — recorded as reported, not confirmed.

Positives verified

Evidence gaps

No live mergerfs (or any EINVAL-returning FUSE) run exists; every errno claim rests on injected errors. No test drives install_blob's real renameat2 branch. Whether the helios crate compiled is not stated (the description reports a macOS Heliopause failure). A single mergerfs run of ignition export would confirm the blob half alone resolves #54.

Dropped (checked, not reported)

#12 [high] COUNTS SUMMARY — PR #79 (GitHub post text)

Autobot Review

Full Review for Agents.

Recommendation: Changes Requested

Keep the blob hard-link fallback — it is the right 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 unguarded, and writes to the destination while claiming to reserve nothing.

Blockers: 3

Should fix: 3

Subtract / Simplify: 4 (≈370–380 of 468 added lines removable)

Nits: 4

To opt out, include #autobot:ignore in your post or comment.

--- (char count of the summary body ≈ 470, under 500) --- Counts cross-check against full report: Blockers B1-B3, Should fix F1-F3, Subtract S1-S4, Nits N1-N4.

#13 [high] FINAL summary text (trimmed)

FINAL SUMMARY TEXT (counts-only, ~400 chars):

Recommendation: Changes Requested

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

Blockers: 3

Should fix: 3

Subtract / Simplify: 4

Nits: 4

Counts verified against entry 11 sections: B1-B3 (3), F1-F3 (3), S1-S4 (4), N1-N4 (4).

#14 [high] Research summary

Re-reviewed PR #79 at head 41f1c76 (the 2026-11-27 merge of main) and reconciled the six lens reports into two deliverables, both saved to the scratchpad.

Deliverable 1 (full report, scratchpad entry 11) is organized as Key findings, Blockers, Should Fix, Subtract / Simplify, Nits, Positives, Evidence gaps and Dropped candidates, with every claim re-verified at this head rather than copied forward. Three blockers: (B1) the directory preflight cannot run on the command #54 reports — ignition export passes no destination (serve.py:229, :330) and export defines no --output, so model_core.py:41-42, binding.rs:34-36 and core.rs:640-642 never fire and cache.rs:3678 is test-only, while ignition edit (edit.rs:249-252) and publish_staged_directory (export.rs:735-749) still publish bare; (B2) the probe calls create_dir_all(parent) (cache.rs:4205) inside a function documented "this probe reserves nothing" and runs before verification in unpack_with (conversion.rs:316 vs :323, :364-366), changing an established error message; (B3) the description's "Fixes #54", "the temporary name is removed" (contradicted by archive.rs:309 / blob.rs:216-224) and "3 tests" evidence no longer match the diff. Three should-fix items (duplicated errno policy vs selene/src/disk.rs:1308-1311; undocumented new requirement; Discord line, title and file list). Subtraction has its own section with a line-accounting table: delete the preflight and its three cache tests, the Python test file and the pyfunction (~244 lines); inline capture_with_owners and its stub test (~71); keep two of five archive tests (~63); revert the synchronize reorder — ≈370-380 of 468 added lines removable, leaving the archive.rs blob branch. Four nits. I dropped the previous round's "branch does not apply to main" blocker as resolved (conversion.rs:300-302) and corrected stale line numbers from the prior comment.

Deliverable 2 (scratchpad entries 12 and 13) is the compact counts-only GitHub summary: Recommendation, a two-sentence takeaway, and Blockers: 3 / Should fix: 3 / Subtract / Simplify: 4 / Nits: 4, matching the full report exactly, with no bullets or code blocks and under 500 characters.

#15 [high] Superseded citations — do not reuse in the report

The report must cite head 41f1c76 only. Notes #5, #6, #7 and #10 describe an earlier head and carry stale line numbers; the comment posted 2026-11-25 11:41 also does. Replace as follows (left = do not use, right = verified this round):

Also dropped and must NOT reappear: the blocker "the branch does not apply to main" (unpack_selected is a one-line wrapper at conversion.rs:300-302 at this head), combine as a #54 path (plain fs::rename, conversion.rs:3538), and any claim that the fallback weakens no-clobber or durability.

FINAL COUNTS that the summary must show, matching entry 11: Blockers 3, Should fix 3, Subtract / Simplify 4, Nits 4. Recommendation: Changes Requested. Deliverables: full report = entry 11; summary = entries 12 and 13 (entry 13 is the trimmed final wording).