Repository navigation
test(agents): serve the fake herdr from a POSIX sh script - #279
Merged
Merged
Conversation
The Python fake herdr took over the 5 second listing timeout under load, so calls that should be allowed asked instead. Serve prepared JSON from a sh script and write the agent listing when live agents change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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/agents/hooksの fake herdr を Python スクリプトから POSIX sh スクリプトに置き換え,負荷時の flaky 失敗を防ぐ.変更前後
fake_herdr.shを symlink し,用意済み JSON をcatで返すlive_agents.txtから Python で組み立てset_agentsが live agents の変更時にagents.jsonを書く原因: 負荷時に Python の fake が 5 秒の一覧取得 timeout を使い切り,許可されるはずの呼び出しが ask になっていた.フルラン 1 回で 1 件,別の 1 回で 13 件失敗し,再実行では再現しなかった.
検証
uv run --frozen pytest tests/agents: 1958 passedlefthook run pre-commit: 全フック成功 (tyのcontextmanagerdeprecation 警告は既存コードで,今回の差分とは無関係)fake_herdr.shのみ (本番コード,timeout,assertion,lock の変更なし)スコープと補足
tests/agents/hooks/{conftest.py,herdr_runtime.py,fake_herdr.sh,test_herdr_ownership.py,test_herdr_ownership_workspaces.py}herdr.write_text(...)をset_agents(...)に置き換えた.live_agents.txtは従来どおり更新する.🤖 Generated with Claude Code