Repository navigation
impl(067): the Node binding's filesystem host for liveRun (increment 2b, part 1) - #556
Conversation
AI review (findings)Reviewing the three changed files for bugs, security issues, and correctness.
The function builds file paths like let mut files: Vec<_> = reports
.keys()
.map(|name| (join(&join(out, name), "adapter.json"), bytes.clone()))
.collect();It then calls: publish_outputs(&pending, &[], |temp, path| std::fs::hard_link(temp, path))The
names.insert(name);
if names.len() > max {
names.pop_last();
}The spec says "list in byte order." This keeps the lexicographically smallest
Increment 2b description accurately describes what {"head": "0369bbb78037c6a262a025d93ed2fc64fe3fb804", "verdict": "findings", "findings": [{"path": "integrations/rustev-node/src/live_fs.rs", "line": 338, "severity": "medium", "category": "correctness", "summary": "publish_live_outputs passes empty dirs to publish_outputs while targeting paths under out/<name>/adapter.json; the subdirectories out/<name>/ are never created, so the temp-file open fails with NotFound on any first-time publication."}]}Subject: a52d38b...0369bbb, diff digest 4eaa08baf947ec545e2501b84f2e39b13236f8719fe7f22e528c8786b7ef6c2b, 1 call(s). An AI comment is not an approval. |
|
Review note: the finding on |
0369bbb to
b591df0
Compare
AI review (findings)Review of
|
AI review (findings)Looking at the three changed files:
for dir in created.iter().rev() {
report(std::path::Path::new(dir), std::fs::remove_dir_all(dir));
}
Budget accounting in When
Path traversal in Spec text matches implementation — the increment 2b description accurately describes the file's contents, the {"head": "0e7af03bb334bc08863ed431665438030e005fcf", "verdict": "findings", "findings": [{"path": "integrations/rustev-node/src/live_fs.rs", "line": 265, "severity": "medium", "category": "correctness", "summary": "rollback_outputs uses remove_dir_all on directories this function created, silently destroying any content written concurrently by another process between create_dir and rollback; remove_dir would surface that race rather than swallowing it."}]}Subject: e8f6653...0e7af03, diff digest 33fc90d19230f7c584b4c6c3138a55cf5c6ba4642864e187f9ca321c6326bd48, 1 call(s). An AI comment is not an approval. |
AI review (findings)Reviewing the three changed files for correctness, security, and consistency with governance and spec claims.
|
|
Review note: the finding on live_fs.rs:76 is a false positive. |
Spec 067 (approved), increment 2b part 1: 3.4.2 ("
outis a directory path the binding writes directly ... Inputs may be paths ... under the filesystem host"). Increment 2b is split in two to stay under the review size; part 2 addsengine.liveRun, which calls this host.Summary
integrations/rustev-node/src/live_fs.rs: arustev_surface::host::Hostover real paths forengine.liveRun, mirroring the CLI'sReads(crates/rustev-cli/src/io.rs), which the binding cannot depend on:ReadFail::Budget);listin byte order (at mostmaxnames),entry_kindwithout following links,ensure_absent, never-overwriting all-or-none publication (temporary file,fsync, hard link, rollback);Storeresolver (64 lowercase hex references only, regular files only, one byte past the maximum so oversized items are classed, never truncated);publish_live_outputs, the repeat outputseval livepublishes at the end of anevaluated_liverun (identical files accepted on resume, conflicting ones refused).O_NONBLOCKopen also closes a FIFO/device swapped in between; that residual race is documented in the module header.lib.rs: the module is#[allow(dead_code)]until part 2 calls it (as increment 1b did forlive.rs).Evidence
cargo test -p rustev-node(new:filesystem_reads_are_bounded_and_classify_links_without_following,store_resolves_regular_items_by_reference_only),cargo clippy -p rustev-node --all-targets -D warnings,cargo fmt --check,make gate: pass.