Repository navigation
fix(esa): keep user zsh startup files out of esa bats tests - #250
Merged
Merged
Conversation
zsh -c read ~/.zshenv, which exports EDITOR=nvim and prepends PATH, so the editor-opening tests launched the real Neovim instead of the editor stub. Without a terminal Neovim waited forever, hanging zsh.bats at test 11 in the agent sandbox while CI, which has no such .zshenv, passed. Run zsh -f so the tests only see their stubs. Closes #244 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Headless Neovim in the bats suite writes nvim.log to the working directory when the agent sandbox denies its server socket and state directory. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 task done
furedea
added a commit
that referenced
this pull request
Nov 13, 2026
…466) agent-config を v0.1.4,agent-harness を v0.9.14 に更新し,コマンド承認の削減と Pi・Codex の秘密パス関連の修正を取り込む. | 入力 | 変更前 | 変更後 | | --- | --- | --- | | agent-config | `9e2843c`(v0.1.3) | `2ab23eb`(v0.1.4) | | agent-harness | `b365277`(v0.9.13) | `83caaa9`(v0.9.14) | | 主な変更 | 中身 | | --- | --- | | furedea/agent-config#187 | `&&` でつないだコマンドや,jq・head などで絞り込むパイプ付きの gh・herdr コマンドを,1 つずつ判定して承認なしで通す | | furedea/agent-config#188 | furedea リポジトリのレビュー返信と,変更を伴わない GraphQL クエリを許可する | | furedea/agent-harness#239, #245 | Pi の srt の denyRead に秘密パスのポリシーを適用する.リポジトリルート基準で解決し,曖昧なパターンは拒否する | | furedea/agent-harness#240, #244 | Codex のガード対象パス判定の端のケースと UNC のプロジェクトルートを修正する | | furedea/agent-harness#238, #247, #248, #250 | プロバイダ登録表からの導出,エラーメッセージの改善,テストコードへの clippy 適用 | ## 検証 - [x] `nix build .#darwinConfigurations.mba.system --no-link` が成功 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: furedea <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
概要
tests/esa/zsh.batsが agent sandbox 内で test 11 以降に進まず,Stop hook の検証が毎ターン 300 秒でタイムアウトしていた問題を修正する.Closes #244
原因
_esa_editを呼ぶ最初のテスト).Hook の記録でもok 10の直後で停止していた.zsh -cで起動しており,zsh が~/.zshenvを読む.この.zshenvはEDITOR=nvim/VISUAL=nvimを強制し,PATHも前置するため,テストの editor スタブが上書きされていた.esa.pyは実体の Neovim を tty なしで起動し,Neovim は入力を待ち続けた.lsofで,python の stdout パイプを共有するnvimプロセスが worktree を cwd として残っていることを確認した.sandbox がサーバソケット作成を拒否した記録(server_start: Failed to start server: operation not permitted)も cwd のnvim.logに残っていた.~/.zshenvが無いためスタブが使われ,通過していた.変更
tests/esa/zsh.batsのzsh -cをすべてzsh -f -cに変更し,ユーザの起動ファイルを読まずにスタブだけを使うようにした.テストの内容と件数は変えていない.nvim.logを作るため,リポジトリ直下の/nvim.logを.gitignoreに追加した.確認
bats tests/esa/zsh.bats(sandbox 内): 21 件すべて成功,約 5 秒bats tests/ --recursive(sandbox 内,stdin は開いたままのパイプ): 64 秒で完走しハングなし.失敗した 13 件はtests/ssh-agent/sign_ssh.bats,tests/zsh/ssh_agent.batsの Unix ソケット bind 拒否とtests/nvim/lspmux.batsの~/.local/state/nvim/lsp.log書き込み拒否で,いずれも sandbox の制限により即時失敗するもので今回の変更とは無関係uv run --frozen pytest: 1877 件成功🤖 Generated with Claude Code