Skip to content

Pipeline function stage drops prefix (temporary) assignments entirely #1765

Closed

Description

@caomengxuan666

Found by the fix7/carrier cluster while fixing #1620 (see ~/workspace/rubash-fix7/clusters/carrier/REPORT.md, sibling findings).

Divergence (vs GNU bash 5.3.20)

$ a=0; f() { echo $a; }; a=9 f | cat
rubash: 0
GNU:    9

Compound append prefix assignments in a pipeline function stage are dropped the same way. execute_function_pipeline_stage never applies command.assignments when building the stage's execution state, so the function body sees the outer values.

Notes

  • No carrier-marker involvement; this is the plain tempenv path for function stages (the external/builtin stage spawner was fixed under [bug] tempenv compound append loses the base value and leaks the internal __RUBASH_CA1__ marker into child environments #1620, the function stage is a separate path).
  • Careful with the adjacent GNU rule: prefix assignments before a function call in a NON-pipeline context persist after the function returns. Any fix must hold both faces.
  • Regression seed: the repro above plus append/array prefix shapes in a pipeline stage, and the non-pipeline persistence face, asserted with GNU expectations.

Destination

Dedicated fix cluster dispatched by the main session this round (fix8/fix9 pipeline-tempenv), regression tests named with this issue number.

Activity

  1. added
    bug
    on Oct 26, 2026
  2. added
    gnu-baseline
    on Oct 26, 2026
  3. added a commit that references this issue on Oct 26, 2026
  4. added a commit that references this issue on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buggnu-baseline

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions