fix(tests): update test expectations to match upstream code changes - #18895
Closed
liuhao1024 wants to merge 4 commits into
Closed
fix(tests): update test expectations to match upstream code changes#18895liuhao1024 wants to merge 4 commits into
liuhao1024 wants to merge 4 commits into
Conversation
- test_server.py: add steer/queue to expected commands list - test_gateway_service.py: update TimeoutStopSec from 90 to 210 - test_update_gateway_restart.py: add counter-based find_gateway_pids to handle survivor sweep - test_concurrent_interrupt.py: add _tool_guardrails, _append_guardrail_observation, update function signatures - test_dockerfile_pid1_reaping.py: adapt to new Dockerfile COPY structure - test_teams.py: add microsoft_teams.common.http/client mocks to sys.modules These changes align test expectations with upstream code changes in run_agent.py, hermes_cli/main.py, and the new Dockerfile structure.
Change _find_call_count threshold from <= 2 to <= 1 so that the survivor sweep (second find_gateway_pids call) returns an empty list, preventing SIGKILL of PIDs already killed via SIGTERM.
1. test_session_create_drops_pending_title_on_valueerror: Lazy session creation (c5b4c48) defers DB row to first message, so pending_title is no longer cleared during agent build. Update assertion to match. 2. test_dotenv_wins_over_os_environ: Commit 2ef1ad2 changed _seed_from_env to prefer .env over os.environ. Rename test and update assertion to match new behavior.
Contributor
Author
CI Status Updatecheck-attribution: ✅ PASS (with test: 2 remaining failures in
Summary: This PR is in better shape than upstream main. The 2 remaining test failures are not caused by this PR's changes. Changes in this PR:
|
This was referenced May 3, 2026
Contributor
|
Thanks for the CI-maintenance work. This is an automated hermes-sweeper review; current
Closing as implemented on main. |
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.
What does this PR do?
Fix 10 CI test failures caused by upstream code changes that outpaced their test expectations.
Related Issue
N/A
Type of Change
Changes Made
tests/acp/test_server.py — add
steerandqueueto expected available commands list (added in recent TUI updates).tests/gateway/test_teams.py — add
microsoft_teams.common.http.clientmock modules tosys.modulesso the Teams adapter import chain resolves.tests/hermes_cli/test_gateway_service.py — update
TimeoutStopSecassertion from 90 to 210 to match the systemd unit template change.tests/hermes_cli/test_update_gateway_restart.py — replace static
find_gateway_pidsreturn values with counter-based side effects. The upstream code now callsfind_gateway_pidstwice (initial kill + survivor sweep); the counter ensures the survivor sweep returns an empty list so SIGKILL doesn't double-hit already-terminated PIDs.tests/run_agent/test_concurrent_interrupt.py — add
_tool_guardrailsand_append_guardrail_observationstubs to_Stubclass; updateslow_toolandpolling_toolsignatures to acceptmessagesand**kwargs(new parameters added to_invoke_tool).tests/tools/test_dockerfile_pid1_reaping.py — adapt assertions to the new Dockerfile structure (
COPYdirectory +RUN cpinstead of individualCOPYlines).How to Test
pytest tests/ -q— all tests should passChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture and workflows — or N/A