Skip to content

Preserve zsh tied PATH exports in shell snapshots - #34293

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/297cfae3368230c7f6fe5ef84f0a10b35a2c802c
Jul 20, 2026
Merged

Preserve zsh tied PATH exports in shell snapshots#34293
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/297cfae3368230c7f6fe5ef84f0a10b35a2c802c

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 20, 2026

Copy link
Copy Markdown

Preserve zsh tied PATH exports in shell snapshots

Why

zsh prints tied scalar/array exports such as PATH and path with -T
metadata. The snapshot filter rejected that syntax, so commands available only
through the configured PATH could not be resolved from a restored snapshot.

What changed

  • Recognize writable tied exports and retain them in zsh shell snapshots.
  • Skip readonly exports so restoring a snapshot does not make variables such as
    PATH immutable.

Testing

Added macOS coverage for restoring a tied PATH, handling entries with spaces,
deduplicating path entries, excluding readonly tied exports, and resolving a
command available only through the restored snapshot.

## Why

zsh prints tied scalar/array exports such as `PATH` and `path` with `-T`
metadata. The snapshot filter rejected that syntax, so commands available only
through the configured `PATH` could not be resolved from a restored snapshot.

## What changed

- Recognize writable tied exports and retain them in zsh shell snapshots.
- Skip readonly exports so restoring a snapshot does not make variables such as
  `PATH` immutable.

## Testing

Added macOS coverage for restoring a tied `PATH`, handling entries with spaces,
deduplicating path entries, excluding readonly tied exports, and resolving a
command available only through the restored snapshot.

GitOrigin-RevId: 297cfae3368230c7f6fe5ef84f0a10b35a2c802c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/297cfae3368230c7f6fe5ef84f0a10b35a2c802c branch from ee181fb to 2deed3f Compare July 20, 2026 08:29
@copyberry
copyberry Bot merged commit 2deed3f into main Jul 20, 2026
32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/297cfae3368230c7f6fe5ef84f0a10b35a2c802c branch July 20, 2026 08:31
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.