Skip to content

spec(069): the Node binding's filesystem host opens inputs without blocking (amends 006, 027 and 067) - #569

Merged
bartekus merged 1 commit into
mainfrom
spec/069-node-nonblocking-open
Nov 8, 2026
Merged

bartekus merged 1 commit into
mainfrom
spec/069-node-nonblocking-open

Conversation

@bartekus

@bartekus bartekus commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Spec 069 for #566, ratified by the owner on 2026-11-08 (A-89). It amends 067 (3.4.2 and the residual race in its implementation record), 027 (the Node binding's filesystem host) and 006 (3.3.1's non-blocking open, which moves to a shared home).

  • Gap: the Node binding's liveRun filesystem host (integrations/rustev-node/src/live_fs.rs) opens inputs and store items with the standard library's blocking open, so a regular file swapped for a FIFO between the metadata check and the open blocks the call. The CLI closes that window with O_NONBLOCK (006 3.3.1).
  • Change specified: rustev_cli::io::open_input moves unchanged into rustev_surface::host::open_input (Unix-only libc dependency, no unsafe); the CLI calls it; the Node host opens inputs with it and store items with it plus O_NOFOLLOW.
  • Tests specified: Unix tests put a FIFO with no writer at an input path and a store item and require a refusal within 10 seconds instead of a block; a rustev-surface test pins the open on a FIFO and a symbolic link.
  • Decision record: A-89 added to docs/decisions/00-founding-decisions.md.

Spec only; the implementation follows in its own pull request. Increments: one (implementation and tests in a single change).

Verification

  • make gate passes; spec-spine couple against origin/main passes.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the two changed files against governance context and the diff.

docs/decisions/00-founding-decisions.md — A-89 records owner ratification of spec 069 on 2026-11-08 with quote "I approve all of them." The entry is internally consistent with the spec text at "Decisions at approval" (same quote, same date, same target cycle). The entry's scope description matches the spec content. No contradiction detected.

specs/069-node-host-nonblocking-open/spec.md — Checking frontmatter and body:

  • id matches directory name ✓
  • status: approved + implementation: pending is a valid "work order" per the contract lifecycle table ✓
  • amends: [006, 027, 067] — three amends targets consistent with the body's section 3.4 description of what changes in each ✓
  • extends entries cover the four affected units: crates/rustev-surface/ and integrations/rustev-node/ under 027, crates/rustev-cli/ under 006, and Cargo.lock under 001. The 067 amend is conceptual (closing a race noted in 067's implementation record), not a new unit claim, so its absence from extends is consistent ✓
  • depends_on correctly lists all specs this spec builds on ✓

Technical soundness: Section 2.1 correctly notes that OpenOptionsExt::custom_flags is a safe API, keeping #![forbid(unsafe_code)] valid. O_NONBLOCK on a FIFO with no writer returns at once (ENXIO/ENODEV), so the 10-second test bound in 3.3.1 is conservative but correct. O_NOFOLLOW on a symlink returns ELOOP, mapping to Inaccessible, consistent with the observable negative cases table. No security defect in the approach.

Obligations I-1, I-2, R-1 are consistent with the normative sections they anchor.

{"head": "20533f0c025a84812ef10c5105d11df5bb292d1c", "verdict": "no-findings", "findings": []}

Subject: e457670...20533f0, diff digest ae7f30f639e1a57b05cdd38b7fccbb7e27a02f76d5e57729efe3fae87d68dab2, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception November 8, 2026 19:05 — with GitHub Actions Inactive
@bartekus
bartekus added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit c40b37e Nov 8, 2026
26 checks passed
@bartekus
bartekus deleted the spec/069-node-nonblocking-open branch November 8, 2026 19:56
bartekus added a commit that referenced this pull request Nov 8, 2026
…ocking; spec 069 complete (#570)

## Summary

Implements spec 069 (#566; spec merged in #569). Stacked on #575, the
dependency-only change (`rustev-surface` takes `libc` on Unix), which
the policy-isolation guard requires to be its own pull request. Spec 069
becomes `implementation: complete`.

- **Shared open:** `rustev_surface::host::open_input` is the CLI's
former `open_input`, moved unchanged (read-only; Unix `O_NONBLOCK`, plus
`O_NOFOLLOW` with `no_follow`; plain open elsewhere). The `libc`
dependency arrives in #575; `rustev-cli` keeps its now-unused `libc`
entry until a later dependency-only change, and re-exports the function,
so its callers and tests are unchanged.
- **Node host:** `integrations/rustev-node/src/live_fs.rs` opens
document inputs through `open_regular` (non-blocking, check on the
handle) and store items through `open_item` (non-blocking, no-follow),
closing the FIFO swap race 067's record left to #566.
- **Tests:** `rustev-surface` `open_tests` (FIFO opens at once; a link
is refused with `no_follow`) and `rustev-node`
`a_fifo_reached_by_the_open_is_refused_without_blocking` (input and
store item refused within 10 s; linked store item refused), Unix only.
- **Mutation seeds:** the three CLI seeds whose hunks sat in the moved
function now name `crates/rustev-surface/src/host.rs`.
- **Verification:** 069 joins `VERIFIED_SPECS` and the `node-live`
acceptance group.

## Verification

- `make gate` and `spec-spine couple` pass.
- `cargo test` for `rustev-surface`, `rustev-node` and `rustev-cli`,
clippy and fmt: run locally in parallel with CI; results follow in a
comment.

This branch was previously deployed

1 inactive deployment
statecraft-review-exception — 20533f0c Deployed Nov 8, 2026 by bartekus via review-exception #3841
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant