You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] Owner-tagged Text endpoints (heredocs) excluded from spawn delivery on all faces #2292
Text endpoints are excluded from spawn delivery whenever they are owner-tagged — heredoc bindings on ANY face fail to reach a spawned child (EBADF), while GNU delivers them. ambient_pins_for_spawn (builtin_redirects.rs) skips entries whose owner is FdOwner::Ambient (the 2026-09-29 owner-tag fix), heredoc entries are owner-tagged, and no other channel delivers them: no walk-opened entry, no {var} path. Here-string Text endpoints (not owner-tagged) deliver byte-exact, which isolates the mechanism. File endpoints deliver fine everywhere.
Scope widened 2026-10-31 by the collector on the fix cluster's probe evidence: the original filing covered the in-process faces; the same mechanism also drops heredocs on the plain exterior-command face (Discovery B below). One mechanism, one issue.
Reproducers (verified 2026-10-31 vs GNU bash 5.3.20 oracle)
B — plain exterior command (no compound, real spawn).
cat 3<<EOF <<EOF2on-threeEOF
on-stdin
EOF2
plus an fd-dump variant (ls -l /proc/self/fd; cat <&3 under sh -c): GNU's child holds fds {0,1,2,3,4} and cat <&3 prints the heredoc body; rubash's child holds only {0,1,2,4} — EBADF at slot 3.
Fix direction (authorized to the cluster, 2026-10-31)
Materialize owner-tagged Text endpoints for spawn the way #2277's {var} channel does — install the materialized endpoint at the child's slot pre-exec — skipping any slot a walk-opened or {var} binding already owns (that skip is what preserves the 2026-09-29 owner-tag rationale: no double delivery). One place in the shared spawn-delivery layer, not per-face patches.
Destination
In flight: fix-2292-text-materialize cluster (PR pending). Pins with the issue number: compound faces (group/function/script) via foreign observers, the plain exterior heredoc cell, a here-string control, and an overlap/no-double-delivery cell.
changed the title [-][bug] Ambient heredoc Text endpoints not materialized for spawned grandchildren (all in-process faces)[/-][+][bug] Owner-tagged Text endpoints (heredocs) excluded from spawn delivery on all faces[/+]on Oct 30, 2026
Defect (as widened during the fix): owner-tagged Text endpoints — heredocs bound in the shell — were excluded from spawn delivery on ALL faces: ambient_pins_for_spawn skipped FdOwner::Ambient entries (2026-09-29 owner-tag rationale) and heredocs are owner-tagged, so a child reading an ambient heredoc fd got EBADF; here-strings (untagged) and File endpoints delivered fine. Even the plain exterior face dropped them.
Fix (b411a62 + bbfc45a): (1) ambient layer — a deliver_ambient_text_endpoints pass inside apply_external_fd_delivery using the established carrier mechanism, skipping slots claimed by the command's own list / heredoc_redirects / {var} (preserves the 2026-09-29 rationale); (2) gate layer — reject_invalid_redirects records heredoc/here-string bindings in its opened overlay at list position; (3) replay layer — own_input_binding_before gains a HereDoc/HereString arm materializing via materialize_async_stdin_body. 18 regression pins in tests/issue2292_ambient_text_spawn_delivery_regressions.rs.
Verification (collector batch on the composed head, scrubbed fd environment): issue2292 pins 18/18, issue2235 control 11/11, full regression 221 passed + exactly the 6 known local stock reds (master-identical roster), lib 985/985. PR CI all green (11 jobs) on the composed head.
Adjudication note: one pin initially failed — decomposition against the GNU oracle showed its sibling-heredoc shape is defeated by the pre-existing body-correlation defect filed as #2305, not by this issue's mechanism (the same shape with a File sibling passes on both shells; a pure in-process variant fails without any spawn). The pin now tests this issue's property with a File sibling and documents the heredoc variant as #2305's; #2305 remains open in the fd wave.
Residual (filed separately): concurrent pipeline spawners still do not deliver ambient Text endpoints (no carrier lifetime across concurrent spawns) — tracked in #2308 (deferred, post-1.5.0 fd wave).
Activity
[-][bug] Ambient heredoc Text endpoints not materialized for spawned grandchildren (all in-process faces)[/-][+][bug] Owner-tagged Text endpoints (heredocs) excluded from spawn delivery on all faces[/+]test(issue2292): scope the group second-command pin to a file sibling…
caomengxuan666 commentedon Oct 31, 2026
Fixed by PR #2303 (merged, merge commit 1cdace4).
Defect (as widened during the fix): owner-tagged Text endpoints — heredocs bound in the shell — were excluded from spawn delivery on ALL faces:
ambient_pins_for_spawnskippedFdOwner::Ambiententries (2026-09-29 owner-tag rationale) and heredocs are owner-tagged, so a child reading an ambient heredoc fd got EBADF; here-strings (untagged) and File endpoints delivered fine. Even the plain exterior face dropped them.Fix (b411a62 + bbfc45a): (1) ambient layer — a
deliver_ambient_text_endpointspass insideapply_external_fd_deliveryusing the established carrier mechanism, skipping slots claimed by the command's own list / heredoc_redirects / {var} (preserves the 2026-09-29 rationale); (2) gate layer —reject_invalid_redirectsrecords heredoc/here-string bindings in itsopenedoverlay at list position; (3) replay layer —own_input_binding_beforegains a HereDoc/HereString arm materializing viamaterialize_async_stdin_body. 18 regression pins in tests/issue2292_ambient_text_spawn_delivery_regressions.rs.Verification (collector batch on the composed head, scrubbed fd environment): issue2292 pins 18/18, issue2235 control 11/11, full regression 221 passed + exactly the 6 known local stock reds (master-identical roster), lib 985/985. PR CI all green (11 jobs) on the composed head.
Adjudication note: one pin initially failed — decomposition against the GNU oracle showed its sibling-heredoc shape is defeated by the pre-existing body-correlation defect filed as #2305, not by this issue's mechanism (the same shape with a File sibling passes on both shells; a pure in-process variant fails without any spawn). The pin now tests this issue's property with a File sibling and documents the heredoc variant as #2305's; #2305 remains open in the fd wave.
Residual (filed separately): concurrent pipeline spawners still do not deliver ambient Text endpoints (no carrier lifetime across concurrent spawns) — tracked in #2308 (
deferred, post-1.5.0 fd wave).fix(startup): adopt the child's own descriptor in the __RUBASH_FD_* r…
executor: materialize heredoc Text endpoints for spawn delivery
fix: deliver ambient Text endpoints on concurrent pipeline spawners