#1 [high] Rules: AGENTS.md scope/rejection criteria and design-review principles
Charter (read_charter): "Solve the right problem in the right place... smallest footprint in shared code"; "Bring real evidence... Bug fixes need to address the root cause; don't just swallow, skip, or retry an unexplained error (#397)"; no unnecessary flags/special cases.
AGENTS.md key lines (at PR head):
- 137-151 Contribution scope & rejection criteria: must address explicit maintainer request / demonstrated defect / measured perf or memory / doc inaccuracy. "Hypothetical future consumers... alone do not establish a need."
- 153-156 Reject unapproved scope expansion.
- 158-163 Reject architectural violations: "Flags, enums, callbacks, optional paths, and temporary implementations cannot be used to bypass them."
- 165-169 Reject weakened guarantees: "Do not remove validation, suppress errors, silently substitute execution paths..."
- 170-175 "Reject unsupported abstractions and churn. Do not add frameworks, extension points, speculative compatibility, fallback layers, or configuration switches without a concrete requirement."
- 176-181 Require focused, meaningful validation: "source-text checks and mocks that bypass the behavior cannot establish runtime correctness." Keep each PR focused on one coherent outcome.
- 191-194 When reviewing a contribution that violates these criteria, identify the concrete violation and rule, and recommend rejection. Do not rescue by adding an opt-in.
- 311-317 Architecture and ownership: Helios policy separation non-negotiable.
- Model core compatibility: 405-418 preserve loading/serving.
- 458-484 Validation: choose verification by property at risk.
docs/design-review.md principles:
- 1 Keep Helios as simple as possible.
- 12 "Validate the real path and report evidence honestly" (94-102).
- 15 Reject scope expansion and weakened constraints (122-133): "Reject changes that bypass validation, conceal unsupported behavior..."
- 16 Write without hidden context (134-149).
AGENTS.md 67-135 Required PR descriptions: four questions in order (why, what changed, claimed benefit, evidence). Description must not leave answers to be guessed. AGENTS.md 38-65 Required prose review (repo-prose skill). CONTRIBUTING.md 7-20: Signed-off-by required on every commit.
#2 [high] Blocking: directory preflight never runs before preparation in any production export path
Head 06b9011. Both production export entry points pass path=None:
- single host: ignition/cli/serve.py:371
export_core(prepared, recorder, storage, None, ...)(form defaults to 'directory') - multi host: ignition/cli/serve.py:240
prepared.export(None, ...), which is host_ranks.py:460cache_only = path is Noneand then model_core-equivalent flow.
Consequences, verified in code:
- model_core.py:41-42
if not cache_only and form == 'directory': flare_heliopause.export_preflight_directory(str(path))is unreachable fromignition export(cache_only is True). - heliopause/src/export/binding.rs:34-36
if !request.sources && !request.path.as_os_str().is_empty()is also unreachable: export_core passessources=True(model_core.py:51-52) and host_ranks.py:470/686 also pass sources=True. So the per-rankexport_capturepreflight never fires. - The checks that do run all fire after capture/preparation, so #54's real cost (20 min wasted, issue body) is unchanged:
- helios/src/core/cache.rs:2358 in
export_entry— called only after the cache entry was committed (heliopause/src/export/core.rs:990, after "Commit core"); also from conversion.rs:346. - helios/src/core/cache.rs:3125
commit_standaloneand helios/src/core/conversion.rs:245unpack_selected— convert paths, after verification. - heliopause/src/export/core.rs:709 in
publish_payload— reached from binding.rs:64 aftercapture_rankreturned.
- helios/src/core/cache.rs:2358 in
So the feature's stated benefit (fail before preparation, issue #54 option 2) is not delivered on the default ignition export; on mergerfs the export still fails, only with new wording. Combined with AGENTS.md 170-175 (no speculative/partially wired paths) and 176-181 ("Do not present scaffolding or partially wired features as supported"), plus yatesdr's blocking item 2 (one check where a directory is actually published) — this is the core scope finding.
Secondary cost: export_preflight_directory (binding.rs:120-124) and the capture_with_owners extraction (binding.rs:97-118, was inline) exist only to host these two unreachable checks; they add a new public Python API surface used by nothing in production.
#3 [high] Should fix: preflight creates the destination parent as a side effect before validation
preflight_directory_publication_with (helios/src/core/cache.rs:3634-3708) ends up calling fs::create_dir_all(parent)? at :3652 and then creates a hidden .flare-rename-probe-<32 hex> directory in that parent (:3659-3665).
- In helios/src/core/conversion.rs:245 the preflight now runs before
payloads.verify()(:248) and beforeunique_staging/staging creation (:292). A conversion that fails verification, or that would have failed "core is already in directory form", now leaves newly created parent directories behind — a mutation produced by a function documented as a check ("this probe reserves nothing", :3622). - Same for
export_entry(:2358) andcommit_standalone(:3125), where the parent is the user's chosen output directory. That conflicts with the no-mutation-before-validation property those publish paths keep elsewhere (AGENTS.md 165-169 "Do not remove validation/suppress errors"; principle 12 "Validate the real path"). Fix: make the probe refuse to create the parent (return NotFound/InvalidInput if the parent is missing) or run it after the parent is known to exist, i.e. immediately before the rename it is checking for.
#6 [high] Should fix: one no-replace policy, two divergent implementations in two crates
Two no-replace primitives now exist with different policy:
- heliopause/src/export/archive.rs:472-486
install_blob_after_rename_errorfalls back for EINVAL|ENOTSUP only (no ENOSYS). - helios/src/core/cache.rs:3685-3696
preflight_directory_publicationtreats EINVAL|ENOTSUP|ENOSYS as unsupported. Same question ("does this filesystem support no-replace publication?"), two answers, in two crates.rename_noreplace(helios/src/core/cache.rs:3712-3732) remains the single primitive that the four remaining directory publication sites use (cache.rs:2371, :3143, conversion.rs:324, export.rs:742, conversion/edit.rs:250) and none of them gained a fallback or the shared classification. Per AGENTS.md 170-175 (no speculative fallback layers) and "Solve the right problem in the right place", the classification belongs once, in the primitive (rename_noreplace) or in one helper beside it, so blob and directory callers agree — and so the ENOSYS case is not silently different on the two paths.
#8 [high] core.rs preflight is post-capture and skipped in the default path
Verified in code (heliopause/src/export/core.rs):
- :686
if !cache_only && path.exists()and :695-700 duplicate the samepath.exists()check twice for the reserved message — pre-existing. - :708-710 adds
preflight_directory_publication(path)for directory form. This runs insidepublish_payload, which binding.rs:64 calls aftercapture_rankfinished (binding.rs:42-45), i.e. after all GPU capture and blob scanning. So on the standalone-destination path the probe still cannot deliver #54's "fail before preparation" benefit; it only re-words the error. Bothbinding.rs:35andcore.rs:709therefore add nothing thatexport_entry(cache.rs:2358, core.rs:990) does not already do a few hundred lines later. - In the cache-only default path (
ignition export), form is "directory" butpathis empty ("" -> cache_only at :683), so the new check is skipped entirely. This is the same finding as scratchpad entry 2 (unreachable/misordered preflight), with the third call site; needed for the final report's file-by-file coverage.
#11 [high] Should fix: description claims Fixes #54 and omits the preflight half
AGENTS.md 67-135 requires four answers in order (why / exactly what changed / claimed result / evidence) and 126-127 explicitly bans "process assurances that add no technical evidence". The PR body at head 06b9011 describes only the first commit's blob fallback ("the temporary name is removed" is stale — 30ccc0de moved cleanup to the caller, archive.rs:482-483), claims "Fixes #54" while directory publication on mergerfs still fails (only the message changes, see entry 2), never mentions the directory preflight, the new Python export_preflight_directory binding, the preflight_directory_publication API, or the broken parent-directory side effect, and reports only "a focused helper harness passed 3 tests" plus rustfmt, with the Helios suite unrun. Under this lens the description matters because the reviewer cannot tell which of the 7 files is the fix and which is scaffolding — exactly yatesdr's blocking item 3. Evidence: PR description text; contrlocal the claim in the PR body that "the temporary name is removed".
#12 [high] Research summary
Reviewed PR 79 (head 06b9011) through the architecture-and-scope lens against the charter, AGENTS.md, docs/design-review.md and CONTRIBUTING.md, reading all seven changed files in context plus their callers. Findings are in the scratchpad (entries 1–11), each with file:line.
Headline: the blob half of the PR is the right fix and is correct as written (hard-link publication with the temporary left to BlobStore::commit, matching the existing install_payload/install_legacy precedent); the directory-preflight half is scaffolding that does not deliver its claimed benefit on any production path. Blocking items: (1) both production export entry points pass path=None and sources=True, so the new model_core.py:41 and binding.rs:34-36 checks are unreachable, and every check that does run (cache.rs:2358, :3125, core.rs:709, conversion.rs:245) fires after capture or preparation — so #54's real cost (a wasted ~20-minute pass) is unchanged and "Fixes #54" is not true; (2) the probe mutates state — fs::create_dir_all(parent) at cache.rs:3652 runs before validation in unpack_selected, leaving new directories from a path that fails. Should-fix: one no-replace policy split into two divergent implementations across two crates (archive.rs:479 vs cache.rs:3687, with ENOSYS differing and rename_noreplace itself unfixed); the new filesystem requirement is undocumented next to docs/multi-host.md:275/docs/core-format-design.md:703 (not opened); and the PR description violates the mandatory four-part scheme and misstates the change. Nit: the capture_with_owners extraction exists only to test the unreachable check. I also recorded what I verified and deliberately did not report — the commit_standalone reordering is durability-safe, the probe cannot clobber user data, non-Linux behaviour is unchanged, and ring is already a runtime-core dependency — plus the evidence gap that no test drives the real renameat2 branch or mergerfs.
#13 [high] FINAL: consolidated verified findings for the report (architecture & scope lens)
PR 79, head 06b9011. Lens: architecture and scope. Rules cited: charter ("solve the right problem in the right place"; bug fixes must address the root cause, not swallow/retry — #397; "bring real evidence"); AGENTS.md 67-135 (four-part PR description), 137-151 (scope/rejection), 165-169 (no weakened guarantees), 170-175 (reject unsupported abstractions, fallback layers, churn; "refactoring must directly support the requested behavior"), 176-181 (focused meaningful validation; "Do not present scaffolding or partially wired features as supported"; mocks cannot establish runtime correctness), 191-194 (identify violation, recommend rejection, do not rescue by adding an opt-in); docs/design-review.md principles 12 and 15; CONTRIBUTING.md 7-20 (Signed-off-by).
=== Summary judgement === The blob change (heliopause/src/export/archive.rs) is the correct, minimal root-cause fix for #54 and matches existing precedent (helios/src/core/cache.rs:2583-2603 install_payload, :2608 install_legacy: hard_link, EEXIST = no-clobber, caller removes the staged link). Keep it. The bundled directory-preflight machinery is scaffolding that never runs where it was meant to, changes a published contract without documenting it, and should be dropped back to a single check where the directory is actually published (this is also the maintainer's blocking item 2 in yatesdr's 2026-11-18 review).
=== BLOCKING 1 — the directory preflight never runs before preparation, so the PR does not fix #54 ===
Files/lines: ignition/preparation/model_core.py:41-42; heliopause/src/export/binding.rs:34-36; heliopause/src/export/core.rs:708-710; helios/src/core/cache.rs:2358, :3125, :3621-3708; helios/src/core/conversion.rs:245.
Wrong: Both production export entry points pass path=None — single host ignition/cli/serve.py:371 (export_core(prepared, recorder, storage, None, ...), form defaults to 'directory'), multi host ignition/cli/serve.py:240 (prepared.export(None, ...) -> host_ranks.py:460 cache_only = path is None). So (a) model_core.py:41 refuses to run; (b) binding.rs:34 also refuses, because export_core passes sources=True (model_core.py:51-52; host_ranks.py:470 and :686 likewise) and request.path is empty; (c) core.rs:708 is skipped because path is empty (cache_only, core.rs:683) and on the standalone-destination path it runs inside publish_payload, i.e. after capture_rank returned (binding.rs:42-45); (d) cache.rs:3125/2371 and conversion.rs:245 are convert/commit paths that run after the tree is assembled.
Why it matters: on mergerfs the export still fails — after tuning, compilation, capture and blob scanning — so #54's actual cost (the issue body: a full ~20-minute preparation pass per attempt) is untouched; only the error text changes. AGENTS.md 176-181 forbids presenting a partially wired feature as supported, and 170-175 forbids speculative machinery; the PR is titled and described as the fix while adding dead code in three layers plus a new public Python function (export_preflight_directory, binding.rs:120-124) that nothing in production calls.
Fix: keep one check, placed where a directory is actually published (export_entry, commit_standalone, unpack_selected, publish_staged_directory) — or, if the goal is to fail before preparation, wire exactly one call into the real entry points (the CLI, where the destination is known) and delete the rest; state "Partially fixes #54" otherwise.
=== BLOCKING 2 — the probe mutates the filesystem before validation === File/line: helios/src/core/cache.rs:3652 (fs::create_dir_all(parent)), :3653-3665 (creates .flare-rename-probe-<32 hex>), doc comment :3621-3622 ("this probe reserves nothing"); caller helios/src/core/conversion.rs:245 runs it before payloads.verify() at :248 and before staging at :292. Wrong: A function documented and used as a precondition check creates the destination's parent directory (and a throwaway directory inside it) as a side effect. A conversion that then fails verification, or any export that fails after the check, leaves newly created directories behind; previously the "destination exists"/verification errors were produced without touching the filesystem. Why it matters: AGENTS.md 165-169 (do not weaken guarantees) and principle 12 (validate the real path); silently introducing parent directories from a failed check contradicts the publish paths' documented "a failure never exposes a partial export" property. Fix: refuse a missing parent (return NotFound) instead of creating it, or run the probe immediately before the rename it is validating, after the parent is known to exist and validation has passed.
=== SHOULD FIX 3 — one no-replace policy, two divergent implementations in two crates === Files/lines: heliopause/src/export/archive.rs:472-486 (EINVAL|ENOTSUP) vs helios/src/core/cache.rs:3685-3696 (EINVAL|ENOTSUP|ENOSYS); primitive helios/src/core/cache.rs:3712-3732 rename_noreplace, used unchanged by cache.rs:2371, :3143, conversion.rs:324, export.rs:742, conversion/edit.rs:250. Wrong: The same question — "does this filesystem support no-replace publication?" — is answered differently in two crates, and ENOSYS is treated as unsupported on one path and not the other. Neither the blob fallback nor the classification lives in the shared primitive. Why it matters: AGENTS.md 170-175 and the charter's "smallest footprint in shared code"; two policies for one operation will drift, and a filesystem answering ENOSYS gets a fallback for directories but a hard error for blobs. Fix: put the errno classification in one place (beside rename_noreplace) and have both callers use it; state the chosen set in one comment.
=== SHOULD FIX 4 — the new filesystem requirement is undocumented === Files/lines: docs/multi-host.md:275-278 (the existing same-filesystem rule); docs/core-format-design.md:703 (promised explicit preflight/export error for filesystem limits); issue #54 "Possible changes" item 2 asks for exactly this. Wrong: The change makes a standalone directory export require no-replace rename support, and no document says so; PR touches no docs. Why it matters: AGENTS.md review standards require checking which configurations are supported and stating new requirements; #54 exists because the constraint was undocumented. Fix: one sentence next to the same-filesystem rule.
=== SHOULD FIX 5 — PR description === Wrong/why/fix: Per AGENTS.md 67-135 the description must give why / exactly what changed / claimed result / evidence in order and must not contain process assurances. At 06b9011 it covers only the blob commit, says the temporary name is removed (30ccc0de moved cleanup to the caller — archive.rs:482-483), claims "Fixes #54" while directory publication on mergerfs still fails, never mentions the directory preflight, export_preflight_directory, or the parent-directory side effect, and offers only "a focused helper harness passed 3 tests" with the Helios suite unrun. Rewrite as "partially fixes", name the two halves, and state which checks ran and what remains untested.
=== Evidence gap (supports 1/5, not a separate defect) ===
The five new Rust tests (archive.rs:612-720) call install_blob_after_rename_error directly with a synthetic io::Error; nothing drives install_blob's real renameat2 branch, and no test uses an unsupported filesystem (yatesdr should-fix 5). tests/preparation/test_directory_preflight.py:28-31 replaces flare_heliopause, torch and torch.distributed in sys.modules, so it asserts call order, not behaviour — AGENTS.md 176-181 says mocks that bypass the behaviour cannot establish runtime correctness. A mergerfs (or any EINVAL-returning FUSE mount) run of ignition export would settle whether the PR actually fixes #54.
=== NIT 6 — capture_with_owners is scope churn === heliopause/src/export/binding.rs:97-118 extracts the lease/drain logic out of export_capture (behaviour preserved; test at :1044-1090). It exists only so a unit test can observe that the unreachable binding preflight returns before capture; if blocking 1 is fixed by dropping the binding check, revert to the inline form (AGENTS.md 170-175).
=== Verified and deliberately NOT reported === commit_standalone reorder (cache.rs:3117-3126) is durability-safe: synchronize(&self.directory) still precedes copy_tree (:3135) and the publish rename (:3143), staging is synced at :3139, and commit_standalone has only test callers (:4441, :4447, :4557). The probe cannot clobber user data — it only touches paths under the 0700 random directory it just created (:3653-3665, EEXIST-retry). Non-Linux behaviour is unchanged (cache.rs:3626-3630 returns Ok; binding.rs:122 becomes a no-op, consistent with the non-Linux rename_noreplace at :3735-3743). ring is already a runtime-core dependency (helios/Cargo.toml:21,42; heliopause/Cargo.toml:23), so SystemRandom adds no dependency and no "pin everything" violation. No env-var switch, no per-model branch, no new flag — the model-agnostic and explicit-configuration rules are not engaged. Pre-existing duplication of the path.exists() check in publish_payload (core.rs:686 and :695-700) is not this PR's doing. Commit signing/trailer requirements (CONTRIBUTING.md 7-20; yatesdr should-fix 6) were not re-verified against the individual commits and are outside this lens.
#15 [high] FINAL v2 (head 41f1c76): architecture & scope findings after upstream merge
PR 79, head 41f1c76 (merge of main 2026-11-27), 7 files, +468/−22. Lens: architecture and scope. Rules: charter ("Solve the right problem in the right place… smallest footprint"; "Bug fixes need to address the root cause"); AGENTS.md 155-199 (scope, weakened guarantees, unsupported abstractions/churn, focused validation), 72-140 (four-part PR description), 330-351 (keep Helios simple); docs/design-review.md principles 1, 12, 15, 16.
=== Head-state facts (all re-verified at 41f1c76) ===
Preflight call sites (5): binding.rs:35; core.rs:641; cache.rs:2804 (export_entry); cache.rs:3678 (commit_standalone); conversion.rs:316 (unpack_with). Plus the new pyfunction export_preflight_directory (binding.rs:120-124, registered :128) and model_core.py:41-42.
Bare rename_noreplace call sites with NO probe: helios/src/core/export.rs:742 (publish_staged_directory, reached from heliopause/src/export/core.rs:1014 when no cache is configured) and helios/src/core/conversion/edit.rs:250 (ignition edit).
Blob fallback: archive.rs:298-313 (EINVAL|ENOTSUP), install_blob call site archive.rs:275; blob.rs:194-213 consumes it, EEXIST → reuse, and blob.rs:216-224 owns temporary cleanup. Correct and matches install_payload/install_legacy precedent.
=== BLOCKING 1 — on ignition export, zero preflights run; #54's cost is unchanged by the directory half ===
ignition export has exactly two entry points, both passing path=None: ignition/cli/serve.py:229 (prepared.export(None, ...)) and serve.py:330 (export_core(..., None, ...)). Therefore:
- model_core.py:41-42 cannot run (cache_only, model_core.py:27);
- binding.rs:34 cannot run (sources=True from model_core.py:51-52, host_ranks.py:471 and :687, rank_group.py:111);
- core.rs:641 is skipped (cache_only, core.rs:615; core.rs:917
if !cache_only); - export_entry (cache.rs:2804) is not reached (core.rs:917-947 is the only caller on the export path and is inside
!cache_only); - commit_standalone (cache.rs:3678) has only test callers (cache.rs:5011, 5017, 5132). So the preflight machinery is unreachable from the command the issue reports, and nothing it adds reduces the ~20-minute wasted pass in #54. Fix: delete the probe half (the blob change is the fix), or if a pre-export check is genuinely wanted, put exactly one call in the CLI where the destination is known.
=== BLOCKING 2 — the directory half targets a symptom ignition export cannot produce; two publishers remain unguarded ===
In the cache-only export, the only no-replace publication is the blob install (archive.rs:275); the cache entry is published with plain fs::rename (cache.rs:3644), which mergerfs supports. So the directory probe benefits only ignition convert --form directory (unpack_with cache.rs/conversion.rs:316, or export_entry via heliopause/src/export/conversion.rs:351) and never the export in #54. Meanwhile publish_staged_directory (export.rs:742, used when no cache is configured, core.rs:1014) and ignition edit (edit.rs:250) still fail with raw EINVAL and no message. So the change adds a new, undocumented filesystem requirement in one place, leaves two other directory publishers unguarded, and fixes neither the reported failure nor the whole class.
Fix: classify the errno once inside/next to rename_noreplace (cache.rs:4265-4295) and have every caller use that, rather than a per-caller probe; or restrict the PR to the blob fallback.
=== BLOCKING 3 — one no-replace policy, two errno sets, in two crates === archive.rs:304-306 accepts only EINVAL|ENOTSUP; the probe (cache.rs:4238-4249) accepts EINVAL|ENOTSUP|ENOSYS (and converts them to Unsupported). Same question, two answers; a filesystem answering ENOSYS gets a fallback for blobs and a hard error for directories. Precedent in-tree for "unsupported means ENOSYS too": selene/src/disk.rs:1301-1311. Fix: one predicate beside rename_noreplace, used by blob and directory paths; state the set once.
=== SHOULD FIX 4 — the probe mutates the filesystem inside a "check" and reorders errors ===
cache.rs:4204-4205: fs::create_dir_all(parent); cache.rs:4206-4218 creates .flare-rename-probe-<32 hex>; the doc comment above it (cache.rs:4174-4175) says "this probe reserves nothing" and export_entry's doc (cache.rs:2790-2795) promises "a failure never exposes a partial export or replaces existing output". conversion.rs:316 runs it before payload verification (conversion.rs:323) and before the established destination exists: {output} check (conversion.rs:364-366); edit.rs:27-32 and cache.rs:2797-2803, 3671-3677 all report that error without touching the disk. Fix: never create the parent in a check (return NotFound), and run it after validation so existing error text and ordering survive.
=== SHOULD FIX 5 — new filesystem requirement undocumented; description does not match the diff === No doc file in the change. docs/multi-host.md:311-317 states the same-filesystem rule for output vs core cache and says nothing about rename support; docs/core-format-design.md:713 promises "explicit preflight/export error" for filesystem limits; issue #54 "Possible changes" item 2 asks for exactly this note. Description: still "Fixes #54", still says the temporary is removed (head leaves it to BlobStore::commit, archive.rs:309, blob.rs:216-224), covers only the blob half of a diff that is mostly directory-probe code, never mentions export_preflight_directory or the parent-directory side effect, and cites "3 tests" where the diff adds 6 archive tests + 1 binding test + 3 cache tests + a Python file. AGENTS.md 72-140 requires why/what/benefit/evidence in order, explicitly naming untested areas.
=== NIT 6 — the probe is new public API and new machinery in Helios's cache module, duplicated from existing helpers ===
preflight_directory_publication is pub in helios/src/core/cache.rs:4176 purely so heliopause (a preparation-side extension) can call it, and binding.rs:120-124 adds a Python entry point that only dead code and tests call. The probe also re-implements name generation (ring SystemRandom loop, cache.rs:4207-4211) where token() (cache.rs:3537) already exists for sibling staging names (cache.rs:2812, 3686). capture_with_owners (binding.rs:97-118) exists only so binding.rs:35's unreachable check can be observed; its test is binding.rs:1473-1520. AGENTS.md 188-193 (no speculative machinery, refactoring must directly support the requested behavior) and 330-338 (keep Helios simple).
=== DROPPED (resolved or not this PR's) ===
- The "branch does not apply to main / unpack_selected rewritten" blocker from the 2026-11-25 review is RESOLVED by 41f1c76: head now has
unpack_selectedas a one-line wrapper (conversion.rs:300-302) matching main, with the probe insideunpack_with(conversion.rs:316). - commit_standalone's synchronize reorder is durability-safe (synchronize now at cache.rs:3679, still before copy_tree and the publish rename; test-only callers).
- No new dependency (ring already in helios runtime-core, helios/Cargo.toml:21,43; heliopause/Cargo.toml:29). No flag, no env switch, no per-model branch.
- The probe cannot clobber user data (only paths under its own 0700 random directory).
- Non-Linux is a no-op (cache.rs:4179-4183), consistent with the non-Linux rename_noreplace (cache.rs:4288-4295).
Evidence gap (supports 1-3, not a separate defect): no test drives install_blob's real renameat2 branch or the probe against a real EINVAL filesystem; mergerfs was not available. A mergerfs run of
ignition exportwould settle whether #54 is fixed by the blob half alone.
#16 [high] Report of run (head 41f1c76) — blocking issues; split the PR
Architecture and scope review — PR #79 (head 41f1c76, base main)
Head after the 2026-11-27 upstream merge: 7 files, +468/−22 (archive.rs, binding.rs, core.rs, helios cache.rs, conversion.rs, model_core.py, tests/preparation/test_directory_preflight.py). Judged against the charter, AGENTS.md, docs/design-review.md.
Key findings
- Keep the blob half.
install_blob_after_rename_error(heliopause/src/export/archive.rs:298-313) is the right, minimal root-cause fix for #54's blob install, matches the tree's existing precedent (install_payload/install_legacy), and preserves no-clobber vialink's EEXIST (blob.rs:204-211) with cleanup owned byBlobStore::commit(blob.rs:216-224). - The directory-probe half cannot run from
ignition exportand cannot reduce #54's cost: the export reaches only the blob install withrenameat2(archive.rs:275); the cache entry uses plainfs::rename(cache.rs:3644). All five new probe sites and the newexport_preflight_directorypyfunction are unreachable from the command the issue reports. - Two directory publishers that do run remain unguarded:
publish_staged_directory(helios/src/core/export.rs:742, from heliopause/src/export/core.rs:1014 when no cache is configured) andignition edit(helios/src/core/conversion/edit.rs:250). - One policy, two errno sets: archive.rs:304-306 (EINVAL|ENOTSUP) vs the probe cache.rs:4238-4249 (adds ENOSYS). The shared primitive
rename_noreplace(cache.rs:4265) was left unfixed. - The probe creates the destination's parent and a throwaway directory inside a function documented "this probe reserves nothing" (cache.rs:4204-4218), and runs before verification and before the established
destination existserror (conversion.rs:316 vs :323, :364-366). - The new filesystem requirement is undocumented, and the PR description violates the mandatory four-part scheme and the "Fixes #54" claim.
- Recommendation: split. Keep archive.rs, drop the probe/scaffolding, document the requirement; if a pre-export check is wanted, one call in the CLI where the destination is known.
Full detail, line numbers, rules, dropped candidates and the evidence gap are in scratchpad entry #15.
#17 [high] Research summary
Reviewed PR #79 at its new head 41f1c76 (after the upstream merge) through the architecture-and-scope lens, re-checking every changed file in context and every prior finding. Full detail is in scratchpad entry #15; the report text is entry #16.
Verdict: blocking issues. The blob hard-link fallback (heliopause/src/export/archive.rs:298-313) is the right minimal root-cause fix for #54 and should be kept. The directory-probe half added by this PR is the problem: ignition export has only two entry points and both pass path=None, so none of the five probe call sites or the new export_preflight_directory pyfunction can execute on the reported command, and the export path never performs a no-replace directory rename (the cache entry uses plain fs::rename), so the probe cannot reduce #54's wasted preparation pass. Meanwhile the two directory publishers that do run — publish_staged_directory (export.rs:742) and ignition edit (edit.rs:250) — still fail bare on EINVAL.
Three blockers, three should-fix items and one nit: the probe mutates the filesystem (creates the destination parent and a .flare-rename-probe-* directory) inside a function documented "this probe reserves nothing", and runs before verification and before the established destination exists error in convert; one no-replace policy now has two errno sets in two crates (blob: EINVAL|ENOTSUP; probe: also ENOSYS) while rename_noreplace itself gained nothing; the new filesystem requirement is undocumented; the PR description still says "Fixes #54", still describes a temporary removal that head no longer performs, and covers only the blob half; and the probe adds public Helios cache API plus a Python entry point that only dead code calls.
One prior blocker is resolved by the merge: unpack_selected is again a one-line wrapper over unpack_with, and the probe sits inside unpack_with (conversion.rs:316). Recommendation: split the PR — keep archive.rs, drop the probe scaffolding and the capture_with_owners extraction, document the requirement, and if a pre-export check is genuinely wanted, place one call in the CLI where the destination is known.
#18 [high] Coverage table, positives and per-file outcomes at head 41f1c76
Coverage of all seven changed files at head 41f1c76, read in surrounding context (not only the diff), with callers followed.
- heliopause/src/export/archive.rs —
install_blob(:259-297, new error path at :275),install_blob_after_rename_error(:298-313),remove_temporary(:314-), tests (:436-560). Outcome: approach correct and minimal (positive); errno-set divergence → blocking 3; tests only inject synthetic errnos (evidence gap). - heliopause/src/export/binding.rs —
export_capture(:17-95, probe at :34-36),capture_with_owners(:97-118),export_preflight_directory(:120-124), registration (:126-130), new test (:1473-1520). Outcome: probe unreachable (sources=True, model_core.py:51-52) → blocking 1; new public Python API + extraction → nit 6. - heliopause/src/export/core.rs —
publish_payload(:597-1030; probe at :640-642, existence checks :618, :627-632, staging :643-647, standalone publish :917-947 via export_entry, uncached path :1013-1015 viapublish_staged_directory). Outcome: probe skipped when cache_only (:615, :640) and post-capture otherwise → blocking 1/2; the uncached branch's publisher has no probe → blocking 2. - helios/src/core/cache.rs —
export_entry(:2796-2824, probe :2804),commit_standalone(:3670-3704, probe :3678, synchronize reorder :3679),preflight_directory_publication/_with(:4174-4261),rename_noreplace(:4265-4295), siblingtoken()(:3537),publish_entry/cache rename (:3644), tests (:4515-4585). Outcome: side effect → should-fix 4; policy split → blocking 3; commit_standalone is test-only (dropped as production risk); synchronize reorder durability-safe (dropped). - helios/src/core/conversion.rs —
unpack_selectedwrapper (:300-302),unpack_with(:305-451; probe :316, verify :323, exists check :364-366, publish :436-442). Outcome: probe before validation and before an established error → should-fix 4; probe reachable only for convert → blocking 2. - ignition/preparation/model_core.py —
export_core(:16-84; cache_only :27, probe :41-42, sources=True :51-52). Outcome: probe unreachable fromignition export→ blocking 1. - tests/preparation/test_directory_preflight.py (new, 68 lines) — asserts call order with
flare_heliopause/torchmocked (:28-31) and drives the real binding only in the third test (:55-68). Outcome: mock-based, and it exists to test dead code; no separate finding beyond nit 6 and the evidence gap (AGENTS.md 194-199 forbids presenting mocks as runtime correctness).
Positives the report should state explicitly:
- The blob fallback is the correct root cause (issue #54 option 1), is nine lines, and weakens nothing:
linkgives EEXIST-based no-clobber,blob.rs:204-211already reuses an identical existing object,blob.rs:216-224owns and tolerates temporary cleanup, andreadonlysealing at blob.rs:190 carries across the shared inode. - No new dependency, no flag, no environment switch, no per-model branch: the change does not touch propagation policy or prepared metadata, so the model-agnostic and explicit-configuration rules are not engaged.
- Non-Linux behaviour is unchanged (
preflight_directory_publicationreturns Ok, cache.rs:4179-4183), consistent with the existing non-Linuxrename_noreplace(cache.rs:4288-4295).
Findings deliberately kept out: probe cannot clobber user data (only touches its own 0700 random directory); ring already a runtime-core dependency; commit_standalone reorder; pre-existing double path.exists() check in publish_payload (core.rs:618 and :627-632) predates the PR.
Open question for the maintainer: whether the directory-publication requirement should be handled inside this PR at all — recommendation is to split (keep archive.rs, drop the probe scaffolding).
#4 [medium] Should fix: new filesystem requirement is undocumented
docs/multi-host.md:275-278 states the filesystem requirement for export ("Output and core cache must be on the same filesystem for hardlinks"), and docs/core-format-design.md:703 promises an explicit preflight/export error for filesystem file-size and space limits. PR 79 adds a new requirement ("no-replace directory publication must be supported") and changes the supported matrix: a standalone directory export now fails where it previously worked on filesystems that accept RENAME_NOREPLACE but reject ... actually previously it also failed at rename; but the probe widens the failure to EISDIR-adjacent cases and adds Unsupported for ENOSYS.
No doc change is in the PR (only the 7 files listed). Per AGENTS.md 405-418/principle 13 and the review standard "Check interactions across every supported ... configuration ... verify that existing data, artifacts, and exported cores still load", and yatesdr's should-fix 7, the new requirement should be stated next to docs/multi-host.md:275. Also docs/core-format-design.md:703 is the place the issue (#54 "Possible changes" 2) points to for a documented preflight.
#7 [medium] Positive: blob hard-link fallback is sound; tests don't reach it
The blob half of the PR is architecturally right and should be kept:
- heliopause/src/export/archive.rs:477-484 does hard_link + leave temporary to the caller; blob.rs:216-224 already removes the temporary and tolerates NotFound, so the no-clobber guarantee comes from link's EEXIST (blob.rs:204-211 handles AlreadyExists by verifying the existing object).
- Precedent for hard-link publication exists in the same tree: helios/src/core/cache.rs:2583-2603 install_payload and :2608 install_legacy.
- readonly(&file) at blob.rs:190 happens before install, so the linked object is sealed; a hard link shares the inode, so sealing carries over — no new guarantee is weakened. So finding for the final report: the intended fix (issue #54 option 1) is the right approach and correct as implemented; the problem is the extra directory-preflight surface bundled with it.
Test-coverage gap (AGENTS.md 176-181 "Tests must exercise the affected behavior"): the 5 new Rust tests call install_blob_after_rename_error directly with a synthetic io::Error; none drives install_blob's real renameat2 branch (yatesdr should-fix 5), and nothing exercises mergerfs. tests/preparation/test_directory_preflight.py:28-31 replaces flare_heliopause/torch/torch.distributed in sys.modules, so it asserts call order rather than behaviour.
#9 [medium] Nit: capture_with_owners extraction is scope churn tied to the dropped check
heliopause/src/export/binding.rs:97-118 extracts capture_with_owners out of export_capture (previously inline at the old lines 29-105). Behaviour is preserved (OwnerLease retained unless drain succeeds) and binding.rs:1044-1090 adds a unit test of the extraction.
Assessment: this is not a git diff-only nit. AGENTS.md 170-175 rejects unsupported abstraction and "refactoring must directly support the requested behavior"; here the refactor exists only so a unit test can observe that the newly added preflight (binding.rs:34-36, unreachable — see entry 2) returns before capture. If the reviewer's item 2 is accepted and the binding preflight is dropped, capture_with_owners loses its only reason to exist and should revert to the inline form. Not itself a defect; scope churn to flag at nit severity.
#10 [medium] Cleared: candidates I verified and dropped
Attempted cross-checks that came up clean, so they should not be reported as findings:
commit_standalonereordering (cache.rs:3117-3126: synchronize moved after the existence check and now after the preflight) does not weaken durability —synchronize(&self.directory)(:3126) still runs beforecopy_tree(:3135) and before the publish rename (:3143); staging is synced at :3139. Only tests use commit_standalone (cache.rs:4441, 4447, 4557), so no production path changed either way. Left the definition order change unremarked.- The probe's rename-the-source-onto-a-free-target step (:3681-3682) cannot clobber user data: it only ever touches paths under the 0700 random
.flare-rename-probe-*directory it just created (:3653-3665, EEXIST-retry loop). preflight_directory_publicationreturning Ok on non-Linux (:3626-3630) keeps Windows/macOS behaviour unchanged;export_preflight_directoryon non-Linux is a no-op, consistent with the existing non-Linuxrename_noreplace(:3735-3743) which does check-then-rename.helios/Cargo.tomlalready depends onringunder theruntime-corefeature (:21, :42) andheliopauseenablesruntime-core(heliopause/Cargo.toml:23), soSystemRandomin the probe adds no dependency and no "pin everything" (AGENTS.md 170-171) violation.- No env-var behaviour switch, no per-model branch, no new flag: the change does not touch propagation policy or prepared metadata, so the model-agnostic / explicit-configuration rules are not engaged.
#5 [low] Doc finding cross-reference
Verified in code:
- PR doc/multi-host.md:275 in the "same filesystem for hardlinks" sentence.
- docs/core-format-design.md:703 promises an explicit preflight/export error for filesystem file-size/space limits; the issue #54 "Possible changes" 2 asks to record the rename requirement beside these.
- PR body only mentions "Fixes #54" and the blob fallback.