Skip to content

Fallback when zsh shell snapshots time out#24293

Draft
saud-oai wants to merge 2 commits into
mainfrom
codex/zsh-snapshot-timeout-fallback
Draft

Fallback when zsh shell snapshots time out#24293
saud-oai wants to merge 2 commits into
mainfrom
codex/zsh-snapshot-timeout-fallback

Conversation

@saud-oai
Copy link
Copy Markdown

Summary

  • retry zsh shell snapshot capture without sourcing .zshrc when the full snapshot command times out
  • preserve the existing failure path for non-timeout errors
  • add regression coverage with a fake zsh that blocks on the initial rc-sourcing capture and succeeds only for the fallback script

Motivation

Shell snapshot capture intentionally sources .zshrc to preserve interactive command state. A slow or blocking .zshrc currently causes snapshot creation to time out entirely, leaving subsequent shell execution without a usable snapshot. This fallback preserves a login-shell baseline when interactive rc capture cannot complete, while retaining a warning for visibility.

Validation

Passed:

  • just fmt
  • CARGO_NET_GIT_FETCH_WITH_CLI=true CARGO_HTTP_TIMEOUT=600 CARGO_HTTP_LOW_SPEED_LIMIT=1 just test -p codex-core -E 'test(timed_out_zsh_user_rc_uses_login_shell_fallback_snapshot)' --status-level fail --final-status-level fail --failure-output final (includes bench-smoke)
  • CARGO_NET_GIT_FETCH_WITH_CLI=true CARGO_HTTP_TIMEOUT=600 CARGO_HTTP_LOW_SPEED_LIMIT=1 just fix -p codex-core

Attempted:

  • CARGO_NET_GIT_FETCH_WITH_CLI=true CARGO_HTTP_TIMEOUT=600 CARGO_HTTP_LOW_SPEED_LIMIT=1 just test -p codex-core --status-level fail --final-status-level fail --failure-output final
    • 2507 tests passed and 47 failed in local integration/harness paths unrelated to this change, primarily missing expected helper binaries such as codex / test_stdio_server and approval-sandbox environment expectations.

@github-actions
Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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