Skip to content

test: extend let readonly diagnostic routing pin with five binding-surface cells (Refs #2641) - #3304

Merged
caomengxuan666 merged 2 commits into
masterfrom
pin/2641-extra-cells
Nov 11, 2026
Merged

caomengxuan666 merged 2 commits into
masterfrom
pin/2641-extra-cells

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

What this is

A regression-lock extension for the let readonly diagnostic routing
covered by #2641. The behavioural repair itself landed with #2968
(squash d9555905): the arithmetic evaluation-order drain's Readonly
arm now emits through the fd-2-bound diagnostic channel instead of a
raw eprintln!, and the original twelve-cell pin
(tests/issue2641_let_readonly_redirect.rs) came in with that change.

This PR adds five cells to the same pin file, covering binding
surfaces the original cells do not reach. Each shape was measured
against the GNU bash 5.3.20 oracle and against current master before
being pinned:

  • comsub_capture_redirect — x=$(let "R=2" 2>&1) captures the
    diagnostic into the substitution value; process stderr stays empty.
  • function_callsite_redirect — the redirection sits on the function
    call (f 2>&1), not inside the body.
  • compound_assign_redirect — let "R+=1" 2>&1.
  • unquoted_operand_redirect — let R=2 2>&1.
  • multi_operand_redirect — let "R=2" "3+4" 2>&1: the remaining
    operand still evaluates, the status stays 1, one diagnostic.

Evidence

  • Probe matrix (16 shapes: the issue's eleven plus these five)
    run on the GNU 5.3.20 oracle and on a master d9555905 build:
    identical stream placement, statuses and values on every shape
    (modulo the program-name prefix, which follows the invocation
    name).
  • Pin stem on the final head: 17/17 (12 pre-existing + 5 new).
  • Neighbour stems: issue2707 18/18, issue3078 19/19.
  • Lib tests: head vs base failure name sets identical.
  • -D warnings on own targets, cargo fmt --check,
    scripts/check-marker-literals.py, and
    scripts/check-utf8-boundary-hygiene.sh all clean.

What this PR deletes

Nothing. It is test-only: one file, +84/−0, no product code, no
existing expectations changed.

Refs #2641

…-surface cells

Measured against the GNU bash 5.3.20 oracle and current master
before pinning: comsub capture, function call-site redirect,
compound assignment, unquoted operand, and multi-operand shapes
all route the readonly diagnostic through the bound fd 2.

Refs #2641
@caomengxuan666
caomengxuan666 marked this pull request as ready for review November 11, 2026 01:26
@caomengxuan666
caomengxuan666 merged commit 2992837 into master Nov 11, 2026
11 checks passed
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