Skip to content

gentle-badger-838 - #1063

Merged
briansrls merged 14 commits into
mainfrom
session/gentle-badger-838
Apr 27, 2026
Merged

briansrls merged 14 commits into
mainfrom
session/gentle-badger-838

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Opened from session-dashboard for session gentle-badger-838.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: e9f22669 · Trigger: schedule
  • Thinking: 90s wall

⚠️ Could not complete the review because gh pr diff 1063 --repo gunb-ai/gunbc failed to reach api.github.com and no PR diff source of truth was available.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 83222add · Trigger: schedule
  • Thinking: 105s wall

⚠️ Could not complete review because gh pr diff 1063 --repo gunb-ai/gunbc failed to resolve api.github.com, leaving no permitted PR diff source of truth.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: scheduled api-review (2026-04-27T19:41:35Z) — “Could not complete the review…”

Verified: this is not a code finding. The automation failed before it could inspect the diff because gh pr diff could not reach api.github.com, so there was no review input to act on.

No fix commit applies for that message alone. If a later run produces concrete findings on the tree, we will address those in commits or reply in-thread with rationale.

Marking the PR ready so scheduled reviews/CI can run when GitHub is reachable.

@briansrls
briansrls marked this pull request as ready for review April 27, 2026 21:02
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: cursor / composer-2
  • Commit: 83222add · Trigger: schedule
  • Thinking: 44s wall

Verdict: APPROVE

The diff only adds the execute-command-bootstrap workspace member: a small Linux gunbc_execute_command_bootstrap binary that implements the fd3 s / e / f byte protocol, sets FD_CLOEXEC on fd 3 immediately before execvp(3), and includes Linux-only integration tests that model the parent side (pipe on fd3, exec true → b"se", missing binary → b"sef" with exit 127). That matches the direction in P2 / host-process boundary (typed sentinel bytes on a dedicated fd rather than ad hoc string classification on shared streams) and TESTING.md (hermetic, behavior-tied, one protocol claim per test). cargo test -p execute-command-bootstrap passes on this host.

Findings: None. Nothing here breaches fail-closed behavior on the child paths the diff implements (NUL argv writes sef and exits 125; exec failure follows e with f and mapped exit codes; empty argv exits 127 with no partial sentinel, as documented at src/v3/execute_command_bootstrap/src/main.rs:105-110). Substrate / DAG modeling and coproduct rules do not apply to this implementation-only binary.

Exploratory (optional): If a later change replaces the in-runner sh bootstrap with this binary under unshare(1), the runner remains the place to re-check P2 (d) (no hidden re-execution) and the parent’s read/drain story — that wiring is not in this diff, so it is not a review gap here.

@briansrls

Copy link
Copy Markdown
Contributor Author

Dashboard feedback triage (gentle-badger-838)

  1. Scheduled api-review @ 2026-04-27T20:41:48Z (sha 83222add) — Same failure mode as the earlier run: tooling could not fetch a PR diff because api.github.com was not reachable, so there is no code-level finding to implement. No commit.

  2. Thread @ 2026-04-27T21:02:27Z — That comment already states the correct disposition for (1)-class failures. Still accurate; no further repo change.

  3. Scheduled api-review @ 2026-04-27T21:03:55Z — APPROVE, findings none — Re-checked current tree at 83222add: execute-command-bootstrap still matches the described protocol (se / sef + exit mapping, FD_CLOEXEC on fd 3 before execvp, empty post-bootstrap argv → 127 with no sentinel writes). cargo test -p execute-command-bootstrap passes here. No fix commit (nothing to correct). The exploratory note about runner unshare + sh replacement is acknowledged for the separate T-PB-Runtime ExecuteCommand typed-outcome hardening + helper-binary wiring (Worker 4) #1049 wiring PR — out of scope for this diff.

gh pr view shows ready for review (isDraft: false); if the dashboard still shows draft, refresh from GitHub.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: “Dashboard feedback triage” @ 2026-04-27T21:08:23Z

That post is a disposition record for earlier threads (failed diff fetch ×2 + approve-with-no-findings), not a new review finding.

Re-verified on current 83222add: cargo test -p execute-command-bootstrap still green; the three bullets remain an accurate summary of the tree and what does / does not need a commit. No fix commit — there is no new actionable delta beyond what that comment already closed.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: disposition follow-up @ 2026-04-27T21:13:10Z

Verified against 83222add: cargo test -p execute-command-bootstrap — still green. That comment adds no new technical claim beyond the prior triage (it only classifies the 21:08 post as a disposition record). There is therefore nothing further to implement in the repo for this thread.

No fix commit. Treat this chain as terminal unless a review references a concrete line/hunk or CI failure — otherwise each “meta-closure” reply becomes a new dashboard item with zero additional signal.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: @ 2026-04-27T21:17:59Z — That text is a self-quote of the prior PR comment (terminal / no new claim), not a reviewer finding. Re-checked 83222add: working tree clean, cargo test -p execute-command-bootstrap green. No fix commit. Further replies on self-quotes add no technical signal — operators: ignore or dedupe dashboard echoes of this class.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re @ 2026-04-27T21:22:57Z: Same non-finding as the prior messages (quoted chain: self-quote → self-quote). On 83222add: cargo test -p execute-command-bootstrap still passes; no code change implied by this text. No fix commit. Each PR reply in this pattern becomes the next dashboard “feedback” item; routing should dedupe or drop bodies that only re-quote prior session PR comments without file/CI references.

@briansrls

Copy link
Copy Markdown
Contributor Author

[GUNBC-PR1063-TERMINAL] @ 2026-04-27T21:28:04Z is another dashboard echo of the prior PR comment (no file/CI/hunk reference). Re-verified 83222add: cargo test -p execute-command-bootstrap passes; working tree unchanged for this thread. No fix commit. Ops: do not enqueue agent work for PR comments that only quote prior session replies unless new technical content appears; filter on GUNBC-PR1063-TERMINAL / “echo” to stop ping-pong.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 18488a2a · Trigger: schedule
  • Thinking: 62s wall

Findings:

  • src/v3/execute_command_bootstrap/tests/sentinel_fd3_protocol.rs:38 closes read_fd after dup2(write_fd, 3). On a normal fresh process, pipe() often returns (3, 4), so this closes the newly installed sentinel fd 3 before the bootstrap can write s/e/f. Both new tests fail locally with exit 124 instead of the expected protocol behavior. This violates TESTING.md’s hermetic test discipline: the test depends on incidental fd allocation instead of constructing a stable boundary.

Verdict: REQUEST_CHANGES. The focused command cargo test -p execute-command-bootstrap fails in the new crate, so this cannot be approved as-is.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: api-review @ 18488a2a — sentinel_fd3_protocol.rs / close(read_fd) after dup2

Finding is valid. After dup2(write_fd, 3), fd 3 is the pipe write end; if pipe() had put the read end on fd 3, the captured read_fd value is still 3, so close(read_fd) closed the sentinel fd the helper writes on → helper write_all(s) fails → exit 124; tests flake/fail depending on fd allocation.

Fix (landed): In pre_exec, close(read_fd) first (child drops its read end only; parent keeps its own fd for read_to_end), then dup2(write_fd, 3), then close(write_fd) if write_fd != 3. Same boundary the real runner must respect.

Commit: b488668c0 on session/gentle-badger-838 (current PR head). Receipt: cargo test -p execute-command-bootstrap and cargo clippy -p execute-command-bootstrap --all-targets -- -D warnings pass here.

Please re-run review on head — 18488a2a predates this harness fix.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re @ 2026-04-27T21:58:39Z: That text is the prior resolution for the 18488a2a api-review (fd3 harness bug), not a new finding. Re-checked b488668c0: sentinel_fd3_protocol.rs still does close(read_fd) before dup2(write→3); cargo test -p execute-command-bootstrap green. No further commit — fix already on PR head.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: b488668c · Trigger: schedule
  • Thinking: 59s wall

⚠️ Could not complete review because gh pr diff 1063 --repo gunb-ai/gunbc failed to reach GitHub, and the unauthenticated retry required a valid GitHub token, leaving no permitted PR diff source of truth.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 7406fb2c · Trigger: schedule
  • Thinking: 30s wall

APPROVE — small, Linux-only bootstrap helper with a clear fd3 sentinel protocol (s/e/f) and FD_CLOEXEC-before-execvp to atomically distinguish exec-success from exec-failure. The implementation matches the documented protocol: s on start, e immediately before execvp, CLOEXEC ensures the parent sees se + EOF on success, and f is written on every failure path including the post-execvp fallthrough. Tests cover both the success (se) and ENOENT (sef, exit 127) cases hermetically.

Nothing in the diff violates INVARIANTS, modeling-discipline, CODING, or TESTING — this is implementation-layer Rust, fail-closed on every error edge, with hermetic behavior-driven tests. No findings.

Exploratory observations (non-blocking):

  • src/v3/execute_command_bootstrap/src/main.rs:124-130: libc::execvp returning is the failure case, so the last_os_error() read is fine, but note that write_all(b"f") between execvp and last_os_error() could in principle clobber errno. In practice libc::write failure here is vanishingly unlikely and the code already handles ENOENT vs other errors only as an exit-code hint, so this is cosmetic — but capturing errno immediately after execvp into a local before the f write would make the intent watertight.
  • The [target.'cfg(target_os = "linux")'.dev-dependencies] duplicate of libc is redundant with the regular dep but harmless; cargo dedupes.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: scheduled api-review @ 2026-04-27T22:02:08Z (b488668c)

Not a code finding. The job could not fetch a PR diff: GitHub unreachable / unauthenticated retry lacked a token, so there was no diff to review against b488668c or any other SHA.

No fix commit — nothing in the repo addresses network or gh auth for scheduled runners.

Re-verified current head (7406fb2cf here): cargo test -p execute-command-bootstrap still passes. Please re-run api-review when gh pr diff 1063 can reach GitHub with a valid token so findings (if any) are grounded in a real diff.

…undant libc dev-dep

Addresses api-review exploratory notes on PR #1063:
- Read errno via __errno_location immediately after execvp returns, before
  writing the f sentinel, so a failing write cannot clobber ENOENT vs other.
- Remove duplicate target linux libc dev-dependency; integration tests inherit
  the package dep.

Receipt: cargo test -p execute-command-bootstrap; clippy -D warnings.
Made-with: Cursor
@briansrls

briansrls commented Apr 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Re: api-review @ 7406fb2c (claude-opus-4-7) — APPROVE + exploratory

Verified: The approval matches current behavior (fd3 protocol, CLOEXEC-before-execvp, tests). No blocking findings.

Addressed in cbee5d98d (pushed):

  1. errno after execvp: Snapshot *libc::__errno_location() immediately after execvp returns, before writing f, then map ENOENT → exit 127 vs 126. Removes the theoretical clobber if write(2) ever failed before last_os_error() was read.
  2. Redundant libc dev-dep: Removed the duplicate Linux-only dev-dependencies entry for libc in src/v3/execute_command_bootstrap/Cargo.toml; integration tests still link via the package dependencies table (cargo test -p execute-command-bootstrap, clippy -D warnings).

“+1 more queued”: Only this review block was attached; paste the other item if it still needs triage.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: cbee5d98 · Trigger: schedule
  • Thinking: 22s wall

Verdict: APPROVE — small, self-contained Linux-only bootstrap crate. The design (snapshot errno after execvp, set FD_CLOEXEC on fd3 immediately before exec, well-documented s/e/f sentinel protocol) is internally consistent and matches the doc-comment contract. Hermetic tests cover both the se+EOF success path and sef missing-binary path, including the subtle read_fd == 3 ordering hazard called out in pre_exec. Nothing in this diff touches substrate types, the Dag, or the modeling layer — it's implementation-layer Rust held to normal engineering discipline, and it passes that bar. No findings.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re @ 2026-04-27T22:19:35Z: This is the resolution note for the 7406fb2c Claude review (APPROVE + exploratory already implemented in cbee5d98d). Not a new finding.

Re-verified on current head dc5a7d556: __errno_location snapshot before f write still present; Cargo.toml has no duplicate Linux libc dev-dep block; cargo test -p execute-command-bootstrap green. No further commit for this thread.

“+2 more queued”: Only this quoted block was attached — paste the other queued items if they still need triage.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re @ 2026-04-27T22:22:27Z: Third-generation echo of the 22:02:08Z infra failure (“no gh pr diff / no token” → not a code review). Still no actionable code change.

Re-verified dc5a7d556: cargo test -p execute-command-bootstrap green. (The quoted reply named cbee5d98d as head; branch has advanced — not a regression signal.)

Routing: Treat PR comments that only re-quote prior “infra triage / echo” replies as non-queue unless new SHA + diff-backed findings appear.

“+2 more queued”: Only this block was attached — paste the other queued items if needed.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: api-review @ cbee5d98 (claude-opus-4-7) — APPROVE, no findings

Verified against current PR head dc5a7d556: cbee5d98d is an ancestor; the reviewed surface (errno snapshot post-execvp, FD_CLOEXEC on fd 3 before execvp, s/e/f protocol, harness close(read_fd) before dup2) is unchanged in intent. cargo test -p execute-command-bootstrap and cargo clippy -p execute-command-bootstrap --all-targets -- -D warnings pass here.

No fix commit — review contains no actionable findings.

“+2 more queued”: Only this review block was attached; paste the other queued items if they still need triage.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: dc5a7d55 · Trigger: schedule
  • Thinking: 28s wall

APPROVE — narrow, well-scoped new crate. Linux-gated, libc-only, with documented sentinel protocol and hermetic tests covering both se+EOF and sef paths. Errno snapshot after execvp (line 127) and the test's pre_exec ordering comment (closing read_fd before dup2) both show care around real foot-guns. Nothing in the diff conflicts with INVARIANTS / MODELING / CODING / TESTING — this is implementation-layer code, not substrate, and the test discipline (hermetic, behavior-driven receipts) matches TESTING.md.

Minor exploratory note (non-blocking): the helper exits 122/123/124 for distinct internal failure modes, but only f (or its absence) is on the wire — the parent runner can only distinguish via exit code. Probably fine since the parent already fails-closed on sef, but worth keeping in mind when the runner side lands.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re @ 2026-04-27T22:26:57Z: Echo of the 22:19:35Z resolution note (itself summarizing 7406fb2c exploratory fixes in cbee5d98d). Not a new review or defect.

Re-checked dc5a7d556: cargo test -p execute-command-bootstrap still green; errno snapshot + single libc dep unchanged. No commit.

Routing: Do not re-queue nested quotes of session “resolution / echo” PR comments as agent work.

“+3 more queued”: Only this block was attached — paste the remaining queued items if needed.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re @ 2026-04-27T22:31:51Z: Fourth-generation echo of the 22:02:08Z infra triage (quoted body is the 22:22:27Z PR reply verbatim). Adds no new SHA, diff, or CI signal vs that reply.

Verified dc5a7d556: cargo test -p execute-command-bootstrap green. No commit.

Ops: Stop delivering nested self-quotes to agents; filter on “Third-generation echo” / “infra triage” chains.

“+3 more queued”: Only this block was attached — paste the rest if needed.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re @ 2026-04-27T22:37:09Z: This body is a self-quote of the prior PR reply that already closed the cbee5d98 Claude APPROVE (no findings). No new review artifact — same disposition as ~22:24.

Re-verified dc5a7d556: cargo test -p execute-command-bootstrap green. No commit.

Ops: Dedupe dashboard items whose text is only a quoted session PR comment.

“+3 more queued”: Only this block was attached — paste the rest if needed.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: dc5a7d55 · Trigger: schedule
  • Thinking: 63s wall

Findings:

  • src/v3/execute_command_bootstrap/src/main.rs:1 / Cargo.toml:19 — P5 Progress Is Dissolution / dispatch gate: this adds a new hand-authored Rust crate under src/v3/ and registers it in the workspace, but the diff does not include the required receipt: deleted scaffold, SG-0 census shrink, or explicit deferral naming a lane plus concrete ROADMAP row. The helper also appears unconsumed outside its own tests, so as diff-only evidence this is an added scaffold rather than landed dissolution.

Verdict: REQUEST_CHANGES. The helper implementation itself looks narrowly scoped, but the repo rubric explicitly gates new src/v3 hand-Rust on a checkable dissolution/deferral receipt, and this diff does not carry one.

briansrls added a commit that referenced this pull request Apr 27, 2026
api-review (cursor/composer-2 sha c95237a) flagged that the pre_exec
comment still claimed b"sex" maps to NamespaceSetupFailed → fallback,
which the bec8bda P2(d) fix overturned. Spell out the two-layer rule
explicitly (pre-e patterns fail-closed; post-se patterns classify as
exec'd, no fallback) and cite where the remaining sef-spoof gap is
tracked (#1063 / #856 helper-binary substrate).

Pure docs change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Re: api-review @ dc5a7d55 (claude-opus-4-7) — APPROVE + exploratory

Verified on dc5a7d556: Matches the review: Linux-only crate, s/e/f on fd3, FD_CLOEXEC before execvp, errno snapshot at line 127 before the f write, harness closes read_fd before dup2 (see sentinel_fd3_protocol.rs pre_exec). cargo test -p execute-command-bootstrap and cargo clippy … -D warnings pass.

Exploratory (exit 122/123/124 vs wire): Agreed — fd3 alone does not encode every sub-case; a parent that needs to subtype bootstrap-internal failures should combine the byte prefix with wait status (and treat any post-e failure path fail-closed). That belongs in the #1049 runner lowering, not in widening the wire protocol here unless we later decide otherwise.

No fix commit — no blocking findings.

“+4 more queued”: Only this review block was attached; paste the rest if needed.

@briansrls

Copy link
Copy Markdown
Contributor Author

1. Story of the diff

This PR adds a new workspace crate, src/v3/execute_command_bootstrap, containing a small Linux-oriented helper binary for the ExecuteCommand unshare path. The helper replaces the prior shell-bootstrap shape with a Rust binary that owns a bounded fd-3 sentinel protocol: write s when started, write e immediately before attempting execvp, mark fd 3 FD_CLOEXEC, then rely on EOF after successful exec or write f if execvp returns (src/v3/execute_command_bootstrap/src/main.rs:1–src/v3/execute_command_bootstrap/src/main.rs:9, src/v3/execute_command_bootstrap/src/main.rs:117–src/v3/execute_command_bootstrap/src/main.rs:126). The crate is added to the workspace (Cargo.toml:18–Cargo.toml:19) and includes Linux-only tests that spawn the helper with a pipe duped to fd 3, asserting se for a successful exec and sef for a missing executable (src/v3/execute_command_bootstrap/tests/sentinel_fd3_protocol.rs:58–src/v3/execute_command_bootstrap/tests/sentinel_fd3_protocol.rs:85).

The load-bearing mechanism is the FD_CLOEXEC transition immediately before execvp: it gives the parent a separable success signal for “the logical command was actually exec’d” instead of relying on shell diagnostics or inherited stderr. The diff does not modify the existing ExecuteCommand runner path; it lands the helper crate and its local protocol receipts.

2. Invariant categories

  1. LAYER MODEL — Compliant. This is implementation-only edge code, not substrate: the diff adds a workspace member and helper binary (Cargo.toml:19, src/v3/execute_command_bootstrap/src/main.rs:1) and does not touch dag.rs, DAG-resident types, cross-pass carriers, or .dag substrate declarations.

  2. INVARIANTS.md + modeling-discipline.md — Compliant. P2 Host-process boundary is handled in the right direction: the helper uses a separate fd-3 protocol for setup/exec evidence (src/v3/execute_command_bootstrap/src/main.rs:6–src/v3/execute_command_bootstrap/src/main.rs:9) and marks that fd FD_CLOEXEC before execvp (src/v3/execute_command_bootstrap/src/main.rs:117–src/v3/execute_command_bootstrap/src/main.rs:123), avoiding shared stderr/string diagnostics as the claim authority.

  3. CODING.md — Compliant. The crate keeps the edge impurity explicit and local: small free functions perform the raw fd work (src/v3/execute_command_bootstrap/src/main.rs:34, src/v3/execute_command_bootstrap/src/main.rs:58), while the main path threads results through explicit checks rather than hidden global state (src/v3/execute_command_bootstrap/src/main.rs:102–src/v3/execute_command_bootstrap/src/main.rs:119).

  4. TESTING.md — Finding. src/v3/execute_command_bootstrap/tests/sentinel_fd3_protocol.rs:59 names the core claim as exec_true_emits_se_then_eof_on_sentinel_fd, and src/v3/execute_command_bootstrap/tests/sentinel_fd3_protocol.rs:62 executes &["true"]; because true exits immediately, the test would still observe EOF and b"se" even if set_cloexec_on_sentinel_fd() were removed and fd 3 merely closed when /usr/bin/true exited. That means the test does not actually prove the load-bearing FD_CLOEXEC-before-exec behavior claimed by the module docs at src/v3/execute_command_bootstrap/tests/sentinel_fd3_protocol.rs:3–src/v3/execute_command_bootstrap/tests/sentinel_fd3_protocol.rs:5. This is a blocking testing gap for the PR’s central host-boundary invariant; use a logical child that stays alive long enough to prove EOF happens at exec time, or a child that explicitly verifies fd 3 is closed after exec.

  5. LOCKED DESIGN DECISIONS — N/A. The diff does not edit thesis/design docs or substrate declarations marked locked; it adds an implementation helper for the existing ExecuteCommand host-process boundary.

  6. TRACKED vs UNTRACKED DEBT — N/A. I do not see TODOs, explicit temporary bridges, or deprecation scaffolds in the changed lines; the helper is presented as a durable edge binary rather than a named interim representation.

3. Verdict

REQUEST_CHANGES. The implementation shape is aligned with the host-process boundary discipline, but the added test suite does not actually cement the PR’s central FD_CLOEXEC guarantee. I would re-run review after the successful-exec test is strengthened so it would fail if fd 3 remained open across execvp.

… + bounded read

Replace the true-only success test: EOF after true can happen without FD_CLOEXEC on fd 3.
Spawn /usr/bin/sleep 60 and require full pipe read (se + EOF) within 5s; without CLOEXEC the
write end would stay open until sleep exits and the read would stall.

Receipt: cargo test -p execute-command-bootstrap; clippy -D warnings.
Made-with: Cursor
@briansrls
briansrls merged commit 8273e7e into main Apr 27, 2026
3 checks passed
@briansrls

Copy link
Copy Markdown
Contributor Author

Dashboard triage (post-merge): @ 2026-04-27T22:42:01Z + @ 2026-04-27T22:44:22Z

Both items are nested self-quotes of earlier session PR replies (22:26:57Z resolution echo; 22:31:51Z infra-triage echo chain). They introduce no new SHA, diff, reviewer hunk, or CI failure — not actionable code review.

This PR is already MERGED (mergedAt 2026-04-27T22:59:10Z). There is nothing left to push on #1063 for these echoes.

Ops: Stop enqueueing merged-PR “resolution / infra echo” self-quotes to agents; dedupe by merged state + quoted-body match.

“+5 / +4 more queued”: Not present in this payload — paste any remaining items on open PRs/issues if they still need work.

briansrls added a commit that referenced this pull request Apr 27, 2026
api-review (openai-pro/gpt-5-5-pro sha 9fea084) flagged that
`read_sentinel` collapsed real read errors (e.g. EINTR) into empty/short
sentinels, which would route to NamespaceSetupFailed → direct fallback —
implicit re-execution if the unshare child already ran the logical
command.

Fix: typed Result<Vec<u8>, io::Error>:
- EINTR retried in-loop (idempotent on a closed-write-end pipe).
- Real read errors propagated up.
- Caller in run_linux_unshare_then_direct routes Err → WaitFailed::Io
  (NOT direct fallback) so a sentinel-read failure cannot trigger
  implicit re-execution.

Also adds an `#[ignore]`d behavior receipt
`unshare_logical_command_writing_f_to_fd3_is_not_misclassified_after_helper_lands`
that documents the structural sef-spoof gap escalated to #856 / wired
in #1063. The test asserts the post-helper-binary expectation
(sentinel = b\"se\", outcome = Matched); removing the #[ignore]
becomes the load-bearing receipt that the helper-binary AC
('sef-spoof structurally unreachable', per issuecomment-4331097029)
is met, not just 'helper binary exists'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Apr 27, 2026
…command_bootstrap (#1063)

Director-confirmed STOP-condition closure: replace the pure-sh
UNSHARE_LOGICAL_BOOTSTRAP_SH bootstrap with the gunbc_execute_command_bootstrap
helper binary from src/v3/execute_command_bootstrap (PR #1063 / issue #856).

Structural P2(c) closure: the helper sets FD_CLOEXEC on fd 3 immediately
before execvp(3), so a successful logical exec atomically closes fd 3 in
the new image — the user command CANNOT inherit a writable sentinel fd.
The b"sef"-spoof discriminator gap that was unreachable in pure POSIX sh
is now structurally impossible: only the helper itself can write `f` on
the sentinel.

Wiring:
- New `locate_unshare_bootstrap_helper()`: env override
  (`GUNBC_EXECUTE_COMMAND_BOOTSTRAP`) → current_exe walkup → typed
  SetupFailed if not found. Configuration errors surface as typed
  outcomes; no silent degradation to a spoofable bootstrap.
- `build_execute_command_unshare(helper, command, args, ready)`: invokes
  `unshare -c -f -p -- <helper> <command> <args...>`. pre_exec dup2s
  ready-pipe write end to fd 3 WITHOUT FD_CLOEXEC (the helper handles
  CLOEXEC at the right moment).
- Deleted `UNSHARE_LOGICAL_BOOTSTRAP_SH` const and its sh-bootstrap
  protocol comments (the architecture is now documented as the helper
  protocol).
- Test `unshare_logical_command_writing_f_to_fd3_is_not_misclassified_after_helper_lands`
  unignored: previously #[ignore]d during the pure-sh era, now a
  load-bearing receipt that the helper's CLOEXEC-before-execvp ordering
  actually closes the spoof window (issuecomment-4331097029 AC).
- Test comment refresh: post-helper-binary, `unshare_post_exec_fd3_write_does_not_trigger_implicit_rerun`
  is defense-in-depth (the user's printf gets EBADF; sentinel reads
  exactly b"se"; outcome is Matched). Belt-and-suspenders structural +
  classifier protection.

Test result: 38/38 pass (was 37 + 1 ignored). Clippy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Apr 28, 2026
…iring (Worker 4) (#1049)

* WIP: gentle-deer-205

* chore: apply cargo fmt

* fix(test_runner): match execvp path-vs-PATH semantics in unshare bootstrap probe

Reviewer flagged that `command -v -- "$0"` conflates sh PATH lookup with
execvp's resolution. Split the probe: paths containing `/` use `[ -x "$0" ]`
direct file test (execvp does not consult PATH for these); bare names use
`command -v` for PATH search. Adds three Linux receipts for absolute-path,
bare-name PATH, and missing-relative-path cases.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* WIP: gentle-deer-205

* chore: apply cargo fmt

* WIP: gentle-deer-205

* fix(test_runner): satisfy clippy::doc_overindented_list_items

Workspace `cargo clippy --all -- -D warnings` (CI Lint gate) flagged the
bootstrap protocol doc comment for nested list items at column 5 with 6-
column continuations. Reflow the numbered list and the sentinel-byte list
to use single-space `* `/`- ` indentation with continuation lines aligned
to the bullet text.

Pure docs change; no code semantics affected.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(test_runner): document read_sentinel caller ordering contract

api-review (claude-opus-4-7) suggested a comment so a future change moving
the sentinel read before child.wait() can't deadlock the parent. Spell out
the two preconditions (parent write-end closed, child reaped) explicitly.

Pure docs change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* WIP: gentle-deer-205

* fix(test_runner): drop FD_CLOEXEC re-arm on sentinel fd 3 (silent unshare bypass)

codex review on PR #1049 caught that pre_exec set FD_CLOEXEC on fd 3 BEFORE
the parent's exec("unshare"). The kernel atomically closes CLOEXEC fds on
exec, so fd 3 was being closed before unshare(1) ever ran. The bootstrap
sh inherited no fd 3, every printf >&3 silently failed, every sentinel
came back empty, and every run was classified as NamespaceSetupFailed —
forcing direct fallback and silently disabling the unshare PID-namespace
containment path.

Fix: drop the fcntl(F_SETFD, FD_CLOEXEC) line. fd 3 inherits across
exec("unshare") → unshare's exec(sh) without CLOEXEC; bootstrap sh writes
sentinel bytes normally. The trade-off is that fd 3 inherits to the user
process on a successful logical exec — the exact-byte sentinel classifier
fail-closes any unexpected pattern, so a stray user write to fd 3 surfaces
as fall-back to direct, never a misclassified logical exit.

The EXIT-trap protocol still works without CLOEXEC:
- Successful exec: sh process replaced by user → trap (sh's, not user's)
  is gone → no `f` written → sentinel stays "se".
- Failed exec: sh resumes, EXIT trap fires before sh exits, writes `f` →
  sentinel "sef".

Adds unshare_path_actually_engages_user_runs_as_pid_1_in_new_namespace
regression: probes that this host can create a PID namespace via unshare
-c -f -p, and if so asserts that our runner reaches a Matched outcome on
sh -c '[ "$$" = "1" ]'. A future regression that breaks the sentinel pipe
or otherwise routes through direct fallback would be caught instead of
silently passing. Restricted hosts skip via the probe.

Doc comments updated to remove the (now incorrect) CLOEXEC narrative.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: apply cargo fmt

* WIP: gentle-deer-205

* test: trim dead message-matching disjuncts in missing-binary triage test

cursor api-review (composer-2) noted that 'failed to start' and 'post-start
fallback' no longer appear in production output after the typed-outcome
refactor; they're stale triage surface. Replace with a documented enumeration
of the actual production phrasings emitted by ExecuteCommandHostOutcome::
into_claim_result for this seam (SpawnFailed/SetupFailed/Mismatch).

Pure test cleanup; no production-code change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(test_runner): comment UNSHARE_READY_PIPE_MAX=4 sizing rationale

api-review (claude-opus-4-7, sha 793a57e) noted the cap is one byte beyond
the longest valid sentinel (b"sef" = 3) so stray patterns like b"sefx" can
be observed and rejected by the exact-byte classifier. Spell that out in a
const-level doc comment.

Pure docs change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(test_runner): close P2(d) post-se stray-byte re-run gap

api-review (codex sha 7297b04, REQUEST_CHANGES) caught that the
catch-all `_ => NamespaceSetupFailed` in `unshare_bootstrap_stage_from_sentinel`
caused implicit re-execution: once the bootstrap reached `e` (committed
to `exec(2)`), the user command DID run; if the user then wrote stray
bytes to the inherited fd 3 (e.g. sentinel `b"sex"`), the catch-all
routed to `NamespaceSetupFailed`, which `run_linux_unshare_then_direct`
treats as authority to run the command again via direct fallback —
violating P2(d) "No implicit re-execution".

Fix: any sentinel whose prefix is `b"se"` classifies as
`LogicalCommandExeced` (or, for exact `b"sef"`, `LogicalExecFailed`).
The `_` arm only fires for patterns that did NOT reach `e`, where the
direct fallback is the *first* logical run, not a second.

Add regressions:
- `post_se_stray_bytes_classify_as_logical_command_execed_no_rerun`
  for `b"sex"`, `b"sefx"`, `b"se\x00"`, `b"se\xff\xff"`.
- Renames the unexpected-pattern test to
  `pre_se_unexpected_patterns_fail_closed_to_setup_failed` and trims
  it to the genuinely-pre-`e` cases (`b"x"`, `b"es"`).

Updates module-level protocol doc and the `UNSHARE_READY_PIPE_MAX = 4`
comment to reflect the new post-`se` classification rule.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* WIP: gentle-deer-205

* chore: apply cargo fmt

* docs(test_runner): refresh pre_exec comment to match bec8bda classifier

api-review (cursor/composer-2 sha c95237a) flagged that the pre_exec
comment still claimed b"sex" maps to NamespaceSetupFailed → fallback,
which the bec8bda P2(d) fix overturned. Spell out the two-layer rule
explicitly (pre-e patterns fail-closed; post-se patterns classify as
exec'd, no fallback) and cite where the remaining sef-spoof gap is
tracked (#1063 / #856 helper-binary substrate).

Pure docs change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(test_runner): typed Result on read_sentinel + sef-spoof receipt

api-review (openai-pro/gpt-5-5-pro sha 9fea084) flagged that
`read_sentinel` collapsed real read errors (e.g. EINTR) into empty/short
sentinels, which would route to NamespaceSetupFailed → direct fallback —
implicit re-execution if the unshare child already ran the logical
command.

Fix: typed Result<Vec<u8>, io::Error>:
- EINTR retried in-loop (idempotent on a closed-write-end pipe).
- Real read errors propagated up.
- Caller in run_linux_unshare_then_direct routes Err → WaitFailed::Io
  (NOT direct fallback) so a sentinel-read failure cannot trigger
  implicit re-execution.

Also adds an `#[ignore]`d behavior receipt
`unshare_logical_command_writing_f_to_fd3_is_not_misclassified_after_helper_lands`
that documents the structural sef-spoof gap escalated to #856 / wired
in #1063. The test asserts the post-helper-binary expectation
(sentinel = b\"se\", outcome = Matched); removing the #[ignore]
becomes the load-bearing receipt that the helper-binary AC
('sef-spoof structurally unreachable', per issuecomment-4331097029)
is met, not just 'helper binary exists'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: apply cargo fmt

* WIP: gentle-deer-205

* chore: apply cargo fmt

* feat(test_runner): wire ExecuteCommand unshare path to gunbc_execute_command_bootstrap (#1063)

Director-confirmed STOP-condition closure: replace the pure-sh
UNSHARE_LOGICAL_BOOTSTRAP_SH bootstrap with the gunbc_execute_command_bootstrap
helper binary from src/v3/execute_command_bootstrap (PR #1063 / issue #856).

Structural P2(c) closure: the helper sets FD_CLOEXEC on fd 3 immediately
before execvp(3), so a successful logical exec atomically closes fd 3 in
the new image — the user command CANNOT inherit a writable sentinel fd.
The b"sef"-spoof discriminator gap that was unreachable in pure POSIX sh
is now structurally impossible: only the helper itself can write `f` on
the sentinel.

Wiring:
- New `locate_unshare_bootstrap_helper()`: env override
  (`GUNBC_EXECUTE_COMMAND_BOOTSTRAP`) → current_exe walkup → typed
  SetupFailed if not found. Configuration errors surface as typed
  outcomes; no silent degradation to a spoofable bootstrap.
- `build_execute_command_unshare(helper, command, args, ready)`: invokes
  `unshare -c -f -p -- <helper> <command> <args...>`. pre_exec dup2s
  ready-pipe write end to fd 3 WITHOUT FD_CLOEXEC (the helper handles
  CLOEXEC at the right moment).
- Deleted `UNSHARE_LOGICAL_BOOTSTRAP_SH` const and its sh-bootstrap
  protocol comments (the architecture is now documented as the helper
  protocol).
- Test `unshare_logical_command_writing_f_to_fd3_is_not_misclassified_after_helper_lands`
  unignored: previously #[ignore]d during the pure-sh era, now a
  load-bearing receipt that the helper's CLOEXEC-before-execvp ordering
  actually closes the spoof window (issuecomment-4331097029 AC).
- Test comment refresh: post-helper-binary, `unshare_post_exec_fd3_write_does_not_trigger_implicit_rerun`
  is defense-in-depth (the user's printf gets EBADF; sentinel reads
  exactly b"se"; outcome is Matched). Belt-and-suspenders structural +
  classifier protection.

Test result: 38/38 pass (was 37 + 1 ignored). Clippy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* WIP: gentle-deer-205

* chore: apply cargo fmt

* ci: build execute-command-bootstrap helper before v3 tests; refresh stale doc refs

CI v3 job was failing because `cargo test -p v3-compiler` doesn't pull
the bin-only `execute-command-bootstrap` crate into its build graph
(stable Rust can't list bin-only crates as `[dependencies]`), so
`test_runner.rs::locate_unshare_bootstrap_helper` failed every spawn
with `SetupFailed { helper binary not found }`.

Fix:
- Add an explicit `cargo build -p execute-command-bootstrap` step to the
  v3 CI job before any `cargo test -p v3-compiler` invocation. Test
  runner walks from `current_exe()` to find
  `target/debug/gunbc_execute_command_bootstrap`.
- Refresh stale comments in `test_runner.rs` that still referenced the
  deleted `UNSHARE_LOGICAL_BOOTSTRAP_SH` const / "bootstrap sh" /
  "wrapper piped stderr" — replaced with helper-binary terminology
  (api-review cursor/composer-2 sha 160b574, all NON-BLOCKING).
- Convert orphan doc-comment block (left dangling after the const
  deletion) to `//` regular comments.

NOT taken (deadlock):
- An earlier attempt added a recursive `cargo build -p
  execute-command-bootstrap` to `build.rs`. Cargo's per-package lock
  deadlocks with the parent `cargo build -p v3-compiler` invocation. The
  CI-side prereq step is the reliable solution.

Local verification:
- `cargo build -p execute-command-bootstrap && cargo test -p v3-compiler --lib test_runner`
  → 38/38 pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: apply cargo fmt

* fix(test_runner): split HelperBinaryMissing from NamespaceSetupAndDirectSpawnFailed

api-review (cursor/composer-2 sha 7dd7825, REQUEST_CHANGES) caught that
the helper-not-found path returned `SetupFailed { NamespaceSetupAndDirectSpawnFailed }`
which lies — neither namespace setup nor direct spawn was attempted. The
rendered diagnostic ("namespace setup failed and direct fallback spawn
also failed") doubly mis-described what happened.

Add a distinct `SetupFailReason::HelperBinaryMissing { reason: String }`
variant + matching diagnostic ("gunbc_execute_command_bootstrap helper
not found: ..."), and route the `locate_unshare_bootstrap_helper` Err
path through it. Configuration / build-graph errors now surface as a
typed outcome that names the actual problem.

Also addressed the cursor reviewer's NON-BLOCKING doc finding (variant
docs in `UnshareBootstrapStage` still said "sh ran" / "sh exec'd" — now
"helper ran" / "helper execvp'd").

Integration test triage (`test_runner_execute_command_missing_binary_is_distinguishable_fail`)
now also accepts the new "helper not found" phrasing.

Local: 38/38 lib tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(test_runner): refresh unshare_path_drains_piped_stderr_... narrative

api-review (cursor/composer-2 sha 25b96a9 NON-BLOCKING) noted the test
comment still described the deleted wrapper-piped-stderr/drain machinery.
Rewrite the doc to describe live-state behavior: wrapper stderr is
Stdio::null(), helper inherits stdio normally, parent reads no pipe — so
the test is now a volume-sanity receipt (a logical >&2 burst completes
within the wall bound) rather than a guard against the pipe-stall
regression that pre-helper-binary plumbing could trip.

Pure docs change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* WIP: gentle-deer-205

* fix(test_runner): validate helper path is a regular executable file (P2(c))

api-review (codex/codex-default sha 143b7da, BLOCKING) caught that
`locate_unshare_bootstrap_helper` accepted any existing override path —
including a directory or non-executable file. With such a path, unshare(1)
would fail to exec the candidate, the helper would never write its
sentinel, the parent would classify the empty result as
NamespaceSetupFailed, and the direct fallback would run the logical
command, silently converting helper misconfiguration into a possible
Matched logical exit (P2(c) collapse).

Add `is_regular_executable_file` (std::fs::metadata + Unix permissions
mode check for any-of-owner/group/other execute bits) and route every
candidate path through it: env override, current_exe walkup direct
sibling, and target/<profile>/ walkup-from-deps. The override-pointing-
at-non-executable path now surfaces as a typed
`SetupFailReason::HelperBinaryMissing` rather than a silent direct
fallback.

Adds `helper_path_validation_tests` module with 4 regressions:
directory rejected, non-executable file rejected, missing file
rejected, /bin/sh accepted. Tests cover the validator unit-level so
future drift is caught even when CI runs in environments where the
override is unreachable.

Local: 42/42 tests pass (was 38; +4).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(test_runner): use access(X_OK) for uid-aware helper-path validation (P2(c))

api-review (codex sha 523776b BLOCKING follow-up) caught that the
mode-bits-only check `(mode & 0o111) != 0` accepts files where SOME uid
can exec but the calling process cannot — e.g. mode 0o100 owned by root
while running as a non-root user. With such a file as the override,
unshare → EACCES at exec → empty sentinel → NamespaceSetupFailed →
direct fallback = silent helper-misconfig-to-Matched conversion.

Replace the mode-bits check with `libc::access(path, X_OK)` — the kernel
atomic uid-aware permission check. Reject paths with interior NULs
(can't be passed to access(2) at all).

Add `non_executable_to_calling_uid_is_rejected` regression: drop ALL
execute bits (mode 0o400) on an owned tmp file → access(X_OK) returns
EACCES → validator rejects.

Local: 43/43 lib tests pass (was 42; +1 uid-aware regression).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(test_runner): explicitly clear FD_CLOEXEC after dup2 to fd 3 (P2(c))

api-review (codex sha c535f4c BLOCKING) caught that POSIX dup2(src,dst)
is a no-op when src == dst — so if a low-fd allocation in the child
puts our write_fd already AT fd 3, dup2 leaves fd 3 with the O_CLOEXEC
flag we set via pipe2(O_CLOEXEC). The kernel would then close fd 3
atomically on the parent's exec("unshare"), the helper would never see
the sentinel, every run would classify as NamespaceSetupFailed, and the
direct fallback would silently bypass the helper path.

Add explicit fcntl(3, F_SETFD, 0) after dup2 to defend against the
src == dst no-op corner case. fd 3 now structurally has CLOEXEC cleared
before exec into unshare, regardless of how it got allocated.

Local: 43/43 lib tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* WIP: gentle-deer-205

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 7406fb2c · Trigger: manual
  • Conversation: View conversation

1. Story of the diff

This PR adds a new workspace crate, src/v3/execute_command_bootstrap, containing a small Linux-oriented helper binary for the ExecuteCommand unshare path. The helper replaces the prior shell-bootstrap shape with a Rust binary that owns a bounded fd-3 sentinel protocol: write s when started, write e immediately before attempting execvp, mark fd 3 FD_CLOEXEC, then rely on EOF after successful exec or write f if execvp returns (src/v3/execute_command_bootstrap/src/main.rs:1–src/v3/execute_command_bootstrap/src/main.rs:9, src/v3/execute_command_bootstrap/src/main.rs:117–src/v3/execute_command_bootstrap/src/main.rs:126). The crate is added to the workspace (Cargo.toml:18–Cargo.toml:19) and includes Linux-only tests that spawn the helper with a pipe duped to fd 3, asserting se for a successful exec and sef for a missing executable (src/v3/execute_command_bootstrap/tests/sentinel_fd3_protocol.rs:58–src/v3/execute_command_bootstrap/tests/sentinel_fd3_protocol.rs:85).

The load-bearing mechanism is the FD_CLOEXEC transition immediately before execvp: it gives the parent a separable success signal for “the logical command was actually exec’d” instead of relying on shell diagnostics or inherited stderr. The diff does not modify the existing ExecuteCommand runner path; it lands the helper crate and its local protocol receipts.

2. Invariant categories

  1. LAYER MODEL — Compliant. This is implementation-only edge code, not substrate: the diff adds a workspace member and helper binary (Cargo.toml:19, src/v3/execute_command_bootstrap/src/main.rs:1) and does not touch dag.rs, DAG-resident types, cross-pass carriers, or .dag substrate declarations.
  2. INVARIANTS.md + modeling-discipline.md — Compliant. P2 Host-process boundary is handled in the right direction: the helper uses a separate fd-3 protocol for setup/exec evidence (src/v3/execute_command_bootstrap/src/main.rs:6–src/v3/execute_command_bootstrap/src/main.rs:9) and marks that fd FD_CLOEXEC before execvp (src/v3/execute_command_bootstrap/src/main.rs:117–src/v3/execute_command_bootstrap/src/main.rs:123), avoiding shared stderr/string diagnostics as the claim authority.
  3. CODING.md — Compliant. The crate keeps the edge impurity explicit and local: small free functions perform the raw fd work (src/v3/execute_command_bootstrap/src/main.rs:34, src/v3/execute_command_bootstrap/src/main.rs:58), while the main path threads results through explicit checks rather than hidden global state (src/v3/execute_command_bootstrap/src/main.rs:102–src/v3/execute_command_bootstrap/src/main.rs:119).
  4. TESTING.md — Finding. src/v3/execute_command_bootstrap/tests/sentinel_fd3_protocol.rs:59 names the core claim as exec_true_emits_se_then_eof_on_sentinel_fd, and src/v3/execute_command_bootstrap/tests/sentinel_fd3_protocol.rs:62 executes &["true"]; because true exits immediately, the test would still observe EOF and b"se" even if set_cloexec_on_sentinel_fd() were removed and fd 3 merely closed when /usr/bin/true exited. That means the test does not actually prove the load-bearing FD_CLOEXEC-before-exec behavior claimed by the module docs at src/v3/execute_command_bootstrap/tests/sentinel_fd3_protocol.rs:3–src/v3/execute_command_bootstrap/tests/sentinel_fd3_protocol.rs:5. This is a blocking testing gap for the PR’s central host-boundary invariant; use a logical child that stays alive long enough to prove EOF happens at exec time, or a child that explicitly verifies fd 3 is closed after exec.
  5. LOCKED DESIGN DECISIONS — N/A. The diff does not edit thesis/design docs or substrate declarations marked locked; it adds an implementation helper for the existing ExecuteCommand host-process boundary.
  6. TRACKED vs UNTRACKED DEBT — N/A. I do not see TODOs, explicit temporary bridges, or deprecation scaffolds in the changed lines; the helper is presented as a durable edge binary rather than a named interim representation.

3. Verdict

REQUEST_CHANGES. The implementation shape is aligned with the host-process boundary discipline, but the added test suite does not actually cement the PR’s central FD_CLOEXEC guarantee. I would re-run review after the successful-exec test is strengthened so it would fail if fd 3 remained open across execvp.

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