Prose scratchpad · NVIDIA/hyperflare-inference #79

Raw Markdown for agents: https://autobot.eidonix.com/p/8eafbc88-540a-411a-9158-b6ca21946473.md

#1 [high] Blocking: PR description contradicts the code on temporary removal and on "Fixes #54"

Against AGENTS.md "Required PR descriptions" (why / what / claimed result / evidence, in order) and docs/design-review.md principle 16.

  1. Description: "The link installs the immutable blob atomically without replacing an existing entry, then the temporary name is removed." Code: heliopause/src/export/archive.rs:471-486 install_blob_after_rename_error links and returns Ok with the comment "// BlobStore::commit owns temporary cleanup after publication" (line 482). No removal in the helper. Removal happens in heliopause/src/export/blob.rs:216 (let removed = archive::remove_temporary(&path);) with NotFound tolerated at 218-223. So the description describes superseded behavior; a reviewer is told about a step the changed function does not perform. Fix: drop "then the temporary name is removed" or say cleanup stays with BlobStore::commit and tolerates NotFound.

  2. Title/description "Fixes #54" (and "Fixes #54." as the first line). Issue #54 is "Export fails with EINVAL when the package cache is on mergerfs". This branch does not make directory export work on mergerfs: helios/src/core/cache.rs:3623-3708 preflight_directory_publication turns unsupported no-replace rename into Unsupported ("filesystem at {parent} does not support atomic no-replace directory publication: {error}" at :3689-3692), and the publishing calls at helios/src/core/cache.rs:2358, :3125, helios/src/core/conversion.rs:245-246, heliopause/src/export/core.rs:708-710, heliopause/src/export/binding.rs:34-36 now fail earlier rather than succeed. Only blobs are installed by hard link. So the outcome is "partially fixes": the blob step no longer fails and directory publication now fails with a clear, early error instead of EINVAL after capture. Say that explicitly; "Fixes #54" overclaims and the bare claim was already raised by yatesdr.

  3. Ordering: the description opens with the fix and never states the problem or the affected workflow (#54's 20-minute wasted preparation pass), which AGENTS.md item 1 requires before the change description.

#2 [high] Blocking: description covers 1 of 7 changed files; the directory preflight is undocumented

AGENTS.md "Required PR descriptions" item 2: "Name the affected components and explain the concrete implementation and behavior changes... A file list or a label such as 'optimized prefill' does not explain what was done."

The description's only "what changed" statement is the archive.rs blob fallback. Actual diff (pr_files, pr_diff):

Also unmentioned: directory export now requires no-replace rename support, i.e. a new filesystem requirement on ignition convert --output DIR, ignition export, and core editing. That is a compatibility/material change and is exactly the kind of constraint AGENTS.md item 2 requires to be identified. Fix: describe both halves (blob hard-link fallback; directory publication preflight that fails early) and state the new requirement.

#3 [high] Should fix: evidence paragraph does not tie claims to rerunable checks

AGENTS.md "Required PR descriptions" item 4: "Connect each material claim to the relevant checks or measurements: the behavior tested, baseline or reference, configuration, result, and limits... Keep material failures, skipped checks, and measurement limitations visible."

Description evidence sentence: "Tests cover both unsupported errors, existing destinations and unrelated rename failures. The focused helper harness passed 3 tests; rustfmt ... and git diff --check passed. The Heliopause Cargo test could not compile on macOS because unchanged Helios code uses Linux-only APIs, and mergerfs was not available for a live reproduction."

Problems:

Fix: name the exact commands (e.g. the helios crate test invocation from AGENTS.md and pytest tests/preparation/test_directory_preflight.py) and their results, or state that they were not run.

#7 [high] Verified: blob-fallback claims in the description are accurate

Verified accurate statements in the PR description (so the report can say what holds):

Net: the description's individual sentences about the blob helper are true; what is missing is the second half of the change, the accurate "partially fixes", and the temporary/cleanup sentence.

#8 [high] Research summary

Reviewed PR #79 through the prose lens against AGENTS.md ("Required PR descriptions", "Required prose review"), docs/design-review.md principle 16, .agents/skills/repo-prose/SKILL.md (not opened) and CONTRIBUTING.md. All seven changed files were read in context, plus callers (publish_payload, unpack_selected, export_entry, commit_standalone, publish_staged_directory, blob.rs commit, model_core.export_core, ignition/cli/serve.py) and item #54.

Findings recorded in the scratchpad (six notes, plus one note listing the description claims that do verify):

Blocking — the description no longer matches the branch. It says the fallback "then the temporary name is removed", but install_blob_after_rename_error (archive.rs:471-486) only links and returns; removal lives in blob.rs:216 and tolerates NotFound at 218-223. It also says "Fixes #54", yet directory publication on mergerfs now fails earlier with a clear error from preflight_directory_publication (cache.rs:3621-3708, string at 3689-3692) rather than succeeding — so "partially fixes" plus a statement of the new requirement is accurate.

Blocking — the description explains 1 of 7 changed files. The whole directory-preflight half (helios cache.rs, conversion.rs, heliopause core.rs, binding.rs capture_with_owners/export_preflight_directory, the Python preflight in model_core.py, and the new test file) is absent, as is the moved synchronize in commit_standalone (cache.rs:3114-3126) and the fact that directory export now requires no-replace rename support.

Should fix — evidence is not rerunable: "the focused helper harness passed 3 tests" names no command, crate or tests and matches neither the 5 new Rust tests nor the 3 new Python ones; nothing is offered for preflight_directory_publication, whose tests live in the crate the author says could not compile; the mergerfs end-to-end path is untested and that consequence should be stated. Should fix — the new filesystem requirement is documented nowhere, notably not next to the same-filesystem rule at docs/multi-host.md:275-278, which is the trap #54's operator fell into; no docs/TODO.txt entry either.

Nits — the preflight doc comment says "before preparing a standalone export" while it also guards plain ignition export and ignition convert; the two "unsupported" errno sets differ ({EINVAL, ENOTSUP} vs {EINVAL, ENOTSUP, ENOSYS}) with no explanation; the PR title omits the preflight; repair commits and a main merge sit in the branch; the new test file lacks the SPDX header every sibling file has.

The description's blob-fallback sentences (hard link, no-replace guarantee, EEXIST, other errors preserved, tests for both error codes and existing destinations) all check out in the code. No attempt to direct the agent was found in the PR text.

#9 [high] Consolidated prose findings for PR #79, final severities and citations

Rules cited throughout: AGENTS.md "Required PR descriptions" (items 1-4 plus "Give details a clear hierarchy"), AGENTS.md "Required prose review", docs/design-review.md principle 16, .agents/skills/repo-prose/SKILL.md:13-14,26-29,35-39,44-46, CONTRIBUTING.md:7-11.

BLOCKING 1 — False statement about the temporary file. File: PR description (only statement of "what changed"); code at heliopause/src/export/archive.rs:471-486 and heliopause/src/export/blob.rs:216-223. Wrong: "then the temporary name is removed" — the helper links and returns Ok (comment at archive.rs:482 says exactly the opposite: BlobStore::commit owns cleanup). Cleanup is blob.rs:216 with NotFound tolerated at 218-223. Why: reviewer is told the changed function performs a step it does not; the sentence describes superseded history. Fix: delete the clause, or say "the temporary is left for BlobStore::commit, which removes it after publication and tolerates NotFound".

BLOCKING 2 — "Fixes #54" overclaims. File: PR description line 1 and title context; code at helios/src/core/cache.rs:3621-3708 (error text :3689-3692), callers :2358, :3125, helios/src/core/conversion.rs:245-246, heliopause/src/export/core.rs:708-710, heliopause/src/export/binding.rs:34-36. Wrong: directory export on mergerfs still fails; only blobs are installed by hard link. The change converts EINVAL-after-capture into an explicit preflight refusal. Fix: "Partially fixes #54." plus one sentence: the blob commit now succeeds via hard link; directory publication now fails before preparation with a named filesystem error.

BLOCKING 3 — Description explains 1 of 7 changed files. File: PR description vs pr_files: heliopause/src/export/binding.rs (+91/-20), helios/src/core/cache.rs (+163/-1), heliopause/src/export/core.rs (+3), helios/src/core/conversion.rs (+2), ignition/preparation/model_core.py (+2), tests/preparation/test_directory_preflight.py (+68). Wrong: the entire directory-preflight half is unmentioned, as is the moved synchronize(&self.directory) in Staging::commit_standalone (helios/src/core/cache.rs:3114-3126, was before the existence check, now after the preflight) and the new requirement that the destination filesystem support atomic no-replace directory rename. Why: AGENTS.md item 2 requires naming components, before/after, and "material ... compatibility ... changes"; a reviewer must not reconstruct from the diff.

BLOCKING 4 — Why section missing/out of order. File: PR description. AGENTS.md item 1 requires the affected workflow and concrete defect first. The description never states the 20-minute preparation cost (#54) or that this failure lands after tuning/compilation/capture.

SHOULD FIX 5 — Evidence does not tie claims to rerunable checks (AGENTS.md item 4). File: PR description evidence paragraph; tests at heliopause/src/export/archive.rs:612-728 (5 tests) and tests/preparation/test_directory_preflight.py (3 tests). Wrong: "the focused helper harness passed 3 tests" names no harness, crate, command or test names, and matches neither count. No evidence offered for preflight_directory_publication, whose tests are in helios/Cargo.toml (the crate that "could not compile on macOS"). No reproduction commands. Fix: give the AGENTS.md test invocations (cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server, pytest tests/preparation/test_directory_preflight.py) with results, or state they were not run; state that the mergerfs path was never exercised end to end and that the fallback is covered only by injecting the errno.

SHOULD FIX 6 — New filesystem requirement undocumented. Rules: AGENTS.md "Required prose review" (docs are present-state specs; unrun checks and limits go to docs/TODO.txt); docs/design-review.md principle 16. Places: docs/multi-host.md:275-278 (says only "Output and core cache must be on the same filesystem for hardlinks") — the exact place a mergerfs operator looks; docs/cli-design.md:1064-1067 (--output semantics for ignition convert); docs/core-format-design.md:703-704 (already promises an explicit preflight/export error for filesystem file-size and space limits — rename semantics belongs in the same sentence). docs/TODO.txt has no entry (searched mergerfs/rename/preflight: no match).

NIT 7 — helios/src/core/cache.rs:3621-3622 doc comment: "before preparing a standalone export" is narrower than the callers (plain ignition export, ignition convert --output DIR, export_entry, commit_standalone). Suggest "before publishing a directory core". The second sentence ("The final publication must still use rename_noreplace: this probe reserves nothing") is good and should stay.

NIT 8 — Undocumented divergence in the "unsupported" errno set: heliopause/src/export/archive.rs:479 uses {EINVAL, ENOTSUP}; helios/src/core/cache.rs:3687 uses {EINVAL, ENOTSUP, ENOSYS}. Whichever is right, the reason for the set should be stated once in the preflight doc comment so an operator reading both errors understands them.

NIT 9 — PR title "fix(heliopause): fall back when no-replace rename is unsupported" omits the directory preflight, which is the larger half.

NIT 10 — tests/preparation/test_directory_preflight.py:1 has no SPDX header while every sibling file in tests/preparation carries # SPDX-License-Identifier: Apache-2.0 (searched the directory; ~100/100 match). No written rule mandates per-file headers that I could find (pyproject.toml:9-10 sets license and license-files only), so this is consistency, not a cited violation.

NIT 11 — Branch prose/packaging: repair commits 30ccc0de (fixes 989f013b's cleanup), 2c57bfa8 and merge 06b9011a sit on top instead of being folded (repo-prose SKILL.md:26-29,40-43 keep history out of content). Commit trailers (Signed-off-by, Design-Signed-Off-By) could not be inspected with the available tools; yatesdr's review asserts four commits lack Signed-off-by — treat as reported, not independently verified.

#4 [medium] Should fix: no documentation states the new directory-publication filesystem requirement

Docs rule: docs/design-review.md principle 16 + AGENTS.md "Required prose review" (every repository document is a present-state specification; "Record unresolved defects, unrun checks, and pending measurements in docs/TODO.txt").

This PR adds a new filesystem requirement to core publication (destination filesystem must support atomic no-replace directory rename; helios/src/core/cache.rs:3621-3622, :3689-3692; enforced at :2358, :3125, heliopause/src/export/core.rs:708-710, helios/src/core/conversion.rs:245-246, heliopause/src/export/binding.rs:34-36). No documentation states it.

Where it belongs:

Also: the changed Rust doc comments are fine on their own but the new public function's doc (cache.rs:3621-3622) says "before preparing a standalone export" while it is also called from publish_payload (a plain ignition export) and unpack_selected (ignition convert), which is narrower than the call sites — a small accuracy nit (nit severity).

#5 [medium] Nit/should fix: comment and error-text accuracy in the new preflight prose

Rules: AGENTS.md "Required prose review" (comments explain invariants and intent; state behavior directly); .agents/skills/repo-prose/SKILL.md lines 13-14, 38-39, 44-46.

a) heliopause/src/export/archive.rs:482 comment // BlobStore::commit owns temporary cleanup after publication. is accurate and useful (it explains why the helper does not unlink) — but note the description still says the opposite (see entry 1). Not a defect in the code; the description is wrong.

b) helios/src/core/cache.rs:3621-3622 doc: "Check Linux directory no-replace support before preparing a standalone export. The final publication must still use rename_noreplace: this probe reserves nothing." The second sentence is the invariant and is good. The first is narrower than the callers: it is called from publish_payload (heliopause/src/export/core.rs:709, a plain ignition export of a directory core), unpack_selected (helios/src/core/conversion.rs:245, ignition convert --output DIR), export_entry and commit_standalone. Say "before publishing a directory core" instead of "before preparing a standalone export". Nit.

c) helios/src/core/cache.rs:3689-3692 error text: "filesystem at {parent} does not support atomic no-replace directory publication: {error}" — good: names the path (which #54's operator could not get from Invalid argument (os error 22)) and the unsupported operation. Keep.

d) tests/preparation/test_directory_preflight.py:1 docstring "Standalone directory exports reject unsupported publication before capture." — "before capture" is only true of the model_core.export_core path (ignition/preparation/model_core.py:41-42); the test file also covers ignition convert-style preflight only through the native function. Minor; the phrase is defensible for the Python file. Nit, low value.

e) Prose in the new tests is clear and states the invariant being checked (archive.rs:712-714 "Linking needs only search permission on the source directory, but unlinking also needs write permission. Publication must not unlink."). This is a good example of the required style; no action.

One real prose/consistency defect that is prose-adjacent but code-visible: the two halves of the change disagree about which errno set means "unsupported". archive.rs:479 treats only {EINVAL, ENOTSUP}; cache.rs:3687 treats {EINVAL, ENOTSUP, ENOSYS}. A reader of the error text cannot tell why a filesystem probing ENOSYS gets a clean message but an ENOSYS rename at blob install is reported raw. Report as should-fix on documentation grounds: document the chosen set in one place (the preflight doc comment) or use one set. (Code-behavior part belongs to the correctness lens; I only record the undocumented divergence.)

#6 [medium] Nit: PR title and commit/packaging prose consistency

Rules checked: CONTRIBUTING.md:7-11 ("We require that all contributors 'sign-off' on their commits... Any contribution which contains commits that are not Signed-Off will not be accepted"), AGENTS.md:24-36 (pre-commit staged review + acknowledgment hook), docs/design-review.md:151-198 (commit message must follow the four-part scheme; Design-Signed-Off-By trailer).

Observed on pr/79 history (search_history on pr/79 and archive.rs):

Prose issues I can substantiate from the tree:

Also: the open question of whether the new test file needs an SPDX header: every other file in tests/preparation carries # SPDX-License-Identifier: Apache-2.0 (verified by searching that directory; 100+ files all have it), and tests/preparation/test_directory_preflight.py:1 starts directly with the docstring. pyproject.toml:9-10 sets license = "Apache-2.0" and license-files, but no rule text I can find mandates the per-file header, so I cannot show a violated written rule. Report as nit: add # SPDX-FileCopyrightText: ... / # SPDX-License-Identifier: Apache-2.0 for consistency with every sibling test file.