Skip to content

unset 'a[@]' leaves stale typed cell: ${#a[@]} disagrees with the mirror #651

Closed

Description

@caomengxuan666

Split out of the #616 battery (indexed_diff case 12), its own concern (unset path, not write path).

declare -a a=(p q); unset "a[@]"; echo "${#a[@]}"; declare -p a

GNU: 0 + declare -a a=(). rubash: 2 + declare -a a=() — the mirror is flushed but ${#a[@]} reads the stale IndexedArray cell (the #638 class, indexed edition: boundness/count disagreeing with the value the mirror shows). The unset path must sync/drop the cell the way the write path does (sync\_typed\_indexed\_element family). Found while mapping the #616 write path; not bundled with it.

Activity

  1. caomengxuan666 commented on Oct 16, 2026

    @caomengxuan666
    MemberAuthor

    Fix is up as PR #659 (branch fix/issue651-unset-flush on d4c11fc). One-line cell sync in the flush arm; battery 12/22 -> 22/22. Regression file tests/issue651_unset_flush.rs (5 tests).

  2. caomengxuan666 commented on Oct 16, 2026

    @caomengxuan666
    MemberAuthor

    Fix is up as PR #659 (branch fix/issue651-unset-flush on 6134802). One-line cell sync in the flush arm; battery 12/22 -> 22/22. Regression file tests/issue651_unset_flush.rs (5 tests).

  3. caomengxuan666 commented on Oct 16, 2026

    @caomengxuan666
    MemberAuthor

    Landed as #659 (squash-merged 23badf8). Battery 12/22 -> 22/22.

  4. added
    bug
    area:expansion
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:expansionbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions