Repository navigation
fix(executor): sync the typed cell on unset a[@] flush (#651) - #659
Merged
Merged
Conversation
declare -a a=(p q); unset "a[@]"; echo "${#a[@]}" printed 2 while
declare -p showed a=(). The flush arm rewrote the mirror but left the
structured cell, so the ${#a[@]} fast path shadowed the removal — the
#638 dual-store class on the unset path (arrayfunc.c:1180-1200 flushes
every element). One line: sync the cell empty, like the element-unset
path already does.
Verification: new 22-case GNU differential 12/22 -> 22/22 (counts AND
renders AND keys AND re-append landing); new
tests/issue651_unset_flush.rs (5 tests, incl. the assoc no-op guard);
focused suites green; full serial failure-set gate vs d4c11fc identical
targets (NEW=0/DISAPPEARED=0; 3/1 part_080 coproc flake passing in
isolation); niubash A/B identical apart from the known load-flaky
timing test (fail-then-pass back-to-back on one tree).
caomengxuan666
force-pushed
the
fix/issue651-unset-flush
branch
from
October 16, 2026 10:11
c08f928 to
83e0bd1
Compare
caomengxuan666
added a commit
that referenced
this pull request
Oct 28, 2026
…calize's verbatim form (niubash#659) act1_host_drives_session_through_state_views_only compared views.cwd() against a raw std::fs::canonicalize result — on Windows that is the extended-length \\?\ form, i.e. the pin encoded the #659 regression's shape as the contract. GNU's cwd is a getcwd string and never carries the prefix, and the field now stores that form; compare against executor::path::strip_verbatim_prefix of the canonical path instead. The raw canonical value stays as the filesystem-identity yardstick for the printed-pwd comparison.
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.
fix(executor): sync the typed cell on
unset "a[@]"flush (#651)What
declare -a a=(p q); unset "a[@]"; echo "${#a[@]}"printed2whiledeclare -pshoweda=(). The flush arm rewrote the mirror but leftthe structured cell, so the
${#a[@]}fast path shadowed the removal —the #638 dual-store class on the unset path
(
arrayfunc.c:1180-1200flushes every element).Fix
One line: sync the cell empty in the flush arm, exactly like the
element-unset path below it already does. No other reader changes (all
fold through the cell or the mirror consistently once they agree).
Verification
(counts AND renders AND keys AND re-append landing).
tests/issue651_unset_flush.rs(5 tests, incl. the assoc no-opguard pinned byte-exact as both shells agree).
gate vs master: target sets identical (NEW=0/DISAPPEARED=0); test-level
3 NEW / 1 DISAPPEARED all in the known-nondeterministic
part_080coproc family (all four pass in isolation on branch).
6295367, only rubash[patch]switched): failure sets identical apart from the known load-flaky 50x
timing-ratio test (fails then passes back-to-back on the branch tree).
GNU owner:
arrayfunc.c:1180-1200 unbind_array_element.