Repository navigation
audit(713): third nested-context pass — 56 probes, #934 faces pinned, $0-spelling normalized - #941
Merged
Merged
Conversation
… $0-spelling normalized (#713) Third pass of the nested-context inheritance audit on master d4fc195. - Harness 45 -> 56 cases: real probes for the doc-cited function fd-table and diagnostic cells (fd3-into-function, func-stderr-route — both G), plus nine probes pinning the new defect. - New defect filed as #934: the #826 contract (parse-order apply + redirection_error through the fd-2 binding in force, vendored redir.c:767-955 / redir.c:135) only landed on the { } wrapper path. Every other apply path reports a redirect OPEN failure through the real stderr — simple, function, ( ), if/while/for/case/until, pipeline stage, comsub, even persistent exec 2>file — and on the ( )/compound paths the earlier 2> open's side effects never happen (stale cap file survives; GNU truncates). Status and single emission are correct everywhere; dup-failure diagnostics already route right. - Harness now normalizes the $0 case-path spelling (D:\..., /d/..., /mnt/d/... -> <CASE>) on both streams so D1 brand noise no longer mimics or masks divergences; routing/line/message/status stay byte-compared. divergences=N is a clean signal again. - Doc: diagnostic-ownership and dup-ordering rows re-marked BUG #934; 3.1/3.2 marked FIXED; 3.3 tickets recorded closed; 3.4 added with the two faces; 6 records the run (MSYS2 GNU 5.2.37 leg — WSL unavailable to this runner; canonical WSL 5.3.0 leg to re-confirm). Run: cases=56 divergences=9, all nine #934 faces, zero regressions on the #720/#825/#826 cells. Refs #713, refs #934
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Third pass of the #713 nested-context inheritance audit on master
d4fc195c.scripts/audit/nested-context-probes.py: 45 → 56 cases. The doc-cited function cells now have real probes (fd3-into-function,func-stderr-route— both match GNU byte-for-byte). Nine new probes pin the defect found this pass.redir.c:767-955 do_redirection_internal) and report an open failure through the fd-2 binding in force (redir.c:135 redirection_error) — only landed on the{ }wrapper path. Every other apply path still reports a redirect open failure through the real stderr: simple commands, function calls,( ), theif/while/for/case/untilcompounds, pipeline stages,$( )interiors, even persistentexec 2>file. On( )/compound paths the earlier2>open's side effects are skipped too (stale cap file survives; GNU truncates — face B). Statuses and single emission are correct throughout;{ },>-before-2>ordering, and dup-failure diagnostics already agree.$0case-path spelling is normalized inside the comparison (D:\...//d/...//mnt/d/...→<CASE>), sodivergences=Nis a clean regression signal again — D1 brand noise can neither mask nor mimic a real leg. Routing, line numbers, message text and status stay byte-compared.docs/audit/context-inheritance.md: diagnostic-ownership and dup-ordering rows re-markedBUG #934with probe anchors; §3.1/§3.2 marked FIXED; §3.3's mapped tickets (redirection & fd:2>&1 >fileorder, builtin write-error routing, closed-stderr status, subshell-uncapturedcderror, bare-catsame-file #699/readbuiltin hangs forever on/dev/stdin#700/readbuiltin: empty from/dev/fd/N, and rc=0 at EOF under compound/fd redirection (while readoff-by-one) #701/set -E ERR-trap edge cases: nested subshell fire count, f() ( ) flat region, process substitution, return-in-until attribution #720) recorded closed; §3.4 documents both faces; §6 records the run.Measurement
cases=56 divergences=9— all nine are the #934 faces; zero regressions on the #720/#825/#826 cells.Oracle caveat: this run's GNU leg used native MSYS2 GNU bash 5.2.37(1) (
GNU_CMD="D:/Git/bin/bash.exe") because WSL was unavailable to the runner. All measured cells are fork-emulation semantics MSYS2 implements faithfully, and every probe is a file-form script comparison per the harness rules — but the canonical WSL GNU bash 5.3.0 leg should be re-confirmed at merge time.Test plan
RUBASH_BIN=target/debug/rubash.exe GNU_CMD="D:/Git/bin/bash.exe" python scripts/audit/nested-context-probes.py→cases=56 divergences=9(all redirection open-failure diagnostic bypasses the ordered fd table on all non-brace paths (simple / function / ( ) / compounds / pipeline / comsub / exec 2>) #934)GNU_CMD='wsl /usr/local/bin/bash'on a WSL-capable host at merge timeRefs #713, refs #934