Skip to content

docs(ledger): GNU suite 83/83 — nameref residual proven to be GNU's own coproc reap race - #506

Merged
caomengxuan666 merged 1 commit into
masterfrom
docs/nameref-suite-83of83
Oct 12, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
docs/nameref-suite-83of83

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

What

Closes the last ledger gap: 82/83 + 1 residual → 83/83 suites pass (README �Compatibility at a Glance�, EN + zh), with the residual attributed by proof, not assertion.

The residual, exactly

x

/
63
/
declare -a r=()
declare -r ROVAR="42"
declare -r ROVAR="42"
third_party/bash/tests/nameref11.sub
third_party/bash/tests/nameref11.sub
declare -n ref="x"
declare -r RO_PID
declare -r RO="x"
declare -r RO2="a"
2
2
2 line 52:

declare -r RO RO_PID; coproc RO { :; }; declare -p RO_PID; wait; declare -p RO RO_PID

Recorded baseline: stdout diff gnu.out rb.out = 159a160 > declare -r RO_PID; GNU has one extra stderr line (line 52: declare: RO_PID: not found). GNU C source (execute_cmd.c:2365/2409-2414 coproc_setvars → readonly refusal before binding; execute_cmd.c:2450 coproc_unsetvars at reap time) gives the line no non-racy answer: whether the coproc child is reaped before the pre-wait declare -p RO_PID is a pure latency race that GNU does not define.

Proof (docs/nameref-suite-residual-gnu-race-20261012.md)

GNU 5.3.0 vs itself, fresh process per run, same machine:

context SLOW (rubash�s bytes) FAST (baseline�s bytes)
ext4 /tmp, 60 runs (2026-10-12) 60/60 0
drvfs /mnt/d (harness fs), 60 runs (2026-10-12) 1/60 59/60
frozen harness, 2026-10-12 run 1 nameref measured 0 —
frozen harness, 2026-10-12 run 2 — nameref measured 1 (159a160, byte-identical to the 09-30 baseline)
  • GNU FAST-vs-SLOW diff is exactly the baseline delta (11a12 > declare -r RO_PID standalone; 159a160 in harness form).
  • Where GNU is deterministic (ext4), its stdout and stderr are byte-identical to rubash�s — rubash emits the deterministic side of GNU�s own coin (CreateProcess coproc child can never win a race decided within one builtin dispatch).
  • Path (a) rejected in the doc: winning the race would need sub-ms spawn+reap or eager NAME_PID unbinding while the coproc lives — contradicting GNU�s alive-case behavior locked by [bug] declare -r RO PID + coproc on readonly name: rubash leaves the _PID var visible to declare -p (GNU does not) #352 regression tests.

Also recorded (2026-10-12 full re-run on 764b9dd)

Verification

env -u WINUXSH_ROOT -u RUBASH_ROOT -u __RUBASH_SHELL_ROOT \
  wsl bash scripts/true-baseline.sh     # 62 zero + audited families + nameref 1

Docs-only change (README.md, README.zh-CN.md, one new evidence doc). No merge — owner review.

…proven to be GNU's own coproc reap race

The single residual stdout line (nameref11.sub:52, 'declare -r RO_PID'
visible after coproc) is GNU Bash 5.3.0's own timing race, not a rubash
divergence:

- GNU vs itself, fresh process per run: 60/60 SLOW on ext4, 59/60 FAST /
  1/60 SLOW on the harness's drvfs filesystem — GNU flips against itself
  on exactly the recorded baseline delta
- where GNU is deterministic (ext4), its stdout AND stderr are
  byte-identical to rubash's; rubash emits the deterministic side
- inside the frozen harness the line flips with GNU's coin: 2026-10-12
  run 1 measured nameref 0, run 2 measured nameref 1 (159a160, identical
  to the 2026-09-30 baseline artifacts)

Also records the 2026-10-12 full-suite re-run on origin/master 764b9dd
(62 suites 0 raw diff; remaining raw diffs all inside the standing
audited env/platform families, A/B byte-equal between 41de831 and
764b9dd) and the WINUXSH_ROOT host-pin scrub the harness now requires
for reproducible measurements on this machine.

Evidence: docs/nameref-suite-residual-gnu-race-20261012.md
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