Skip to content

WIP: R3 special-path parallel classification convergence (D1/D4/D5/D6) - #1971

Merged
caomengxuan666 merged 5 commits into
masterfrom
clean/rubash-registry-converge
Oct 28, 2026
Merged

caomengxuan666 merged 5 commits into
masterfrom
clean/rubash-registry-converge

Conversation

@caomengxuan666

@caomengxuan666 caomengxuan666 commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Redundancy-hunt R3 batch (user ruling 2026-10-28: A+B+C+D full batch). Freeze exception by user order; do not merge — main session merges on Windows CI green after review.

What converges (spelling recognition only; each group's real duties stay)

  • D1 dev_operand_fd: delegates to special_paths::fd_alias_target; the self-pid layer is kept as a rewrite to the self spelling (GNU resolves /proc/$$/fd/N through procfs); KEY= split untouched.
  • D4 fd_pipe_test: spelling via the registry; mark check + verdict matrix unchanged.
  • D5 pipe_source recognizer: all registry fd-0 spellings (was: only /dev/stdin).
  • D6 sourced_dev_fd_text + comsub quick-read: spelling via the registry — $(</proc/self/fd/N) now reaches the fd table (was: filesystem fall-through, ENOENT on Windows).

Oracle adjudication first (GNU bash 5.3.20, per-face probes)

  • /dev/fd/+3: GNU rejects on EVERY face (ENOENT / test false) — the parse-based faces were wrong, the registry is right; convergence fixes them.
  • Leading zeros (/dev/fd/00, /dev/fd/03): GNU rejects on every face (procfs canonical names). Here the literal tables match GNU and the registry is the divergent side (its own battery pins /dev/fd/03 → FdAlias(3)) → stop-hand: virtual_device_test tables, builtins/source.rs:178, trap_exec.rs fd-0 arms are NOT converged; registry defect entry is in the cluster report for the main session to file.
  • Spec anchor: redir.c _redir_special_filenames/redir_special_open intercept only without HAVE_DEV_FD (and require all_digits there); on the oracle platform the literal open + procfs decide.

Pins

Unit pins in dev_fd_operands.rs (registry family, +N rejections, self-pid layer) + six GNU-assertion pins in tests/regression.rs (r3_*).

Gates: reported in the cluster REPORT (~/workspace/clean-rubash-registry/REPORT.md); merge gate = this PR's Windows CI (goldens).

…try (R3/D1)

The operand layer re-parsed /dev/fd tails with str::parse, which
accepted /dev/fd/+3 — a spelling GNU rejects on every face (oracle
5.3.20 probes: the literal open fails ENOENT in procfs; redir.c
_redir_special_filenames/redir_special_open only intercepts without
HAVE_DEV_FD and even there requires all_digits). Delegate the
spelling judgment to special_paths::fd_alias_target.

Kept local (real duty, not duplication): the shell's own numeric-pid
spelling /proc/<pid>/fd/N, which GNU resolves through procfs — it now
rewrites to the self spelling and lets the registry judge the fd
part; foreign pids stay filesystem paths. The KEY= split layer is
untouched. Unit pins cover the registry family, the +N rejections,
and the self-pid layer.
…3/D4)

fd_pipe_test strip+parsed the /dev/fd/ and /proc/self/fd/ prefixes
itself and its parse accepted /dev/fd/+3, letting the spelling
inherit fd 3's pipe mark. GNU rejects that spelling on every face
(oracle-verified). The mark check and the verdict matrix are
unchanged; only the spelling source moves to
special_paths::fd_alias_target.

Not converged here (stop-hand, see cluster report): the
virtual_device_test fd0/fd1/fd2 literal tables differ from the
registry only on leading-zero spellings (/dev/fd/00), where the
tables match GNU and the registry is the divergent side.
…lings (R3/D5)

The recognizer copied just the /dev/stdin spelling, so the
source6.sub pipeline shape with . /dev/fd/0 or . /proc/self/fd/0
missed the fast path. Judge the word with
special_paths::fd_alias_target == Some(0). The other two fd-0
literal copies (builtins/source.rs, executor/trap_exec.rs) are
deliberately NOT converged in this batch: their only divergence
from the registry is the leading-zero family, where they match GNU
and the registry is wrong (stop-hand; registry defect entry in the
cluster report).
…e registry (R3/D6)

sourced_dev_fd_text and the comsub quick-read each strip+parsed fd
spellings locally: both accepted /dev/fd/+3 (GNU: ENOENT on every
face), and the quick-read knew only the /dev/fd/ prefix, so
$(</proc/self/fd/N) missed the fd table and fell to the filesystem
— ENOENT on Windows where GNU reads the fd (oracle-verified). Both
now ask special_paths::fd_alias_target; fall-through ladders are
unchanged.
GNU-assertion pins: comsub quick-read serves /proc/self/fd/N and
rejects /dev/fd/+3; test -p keeps the canonical pipe verdict and
rejects the +3 spelling; source rejects /dev/fd/+3 with a Text
endpoint behind fd 3; external cat operand /dev/fd/+3 reaches the
child literally (rc 1) with /dev/fd/3 as control; pipe-into-source
fd-0 spellings as fast-path controls.
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