fix(tests): repair failing unit-tests on main (RESPX /v1/teams mock)#289
Merged
Conversation
… idempotency-key payloads)
The executor's idempotency snapshot step now calls GET /v1/teams via
AgamemnonClient.list_teams() (executor.py:118), but the integration test
RESPX router in tests/integration/conftest.py never registered that route,
so every workflow run errored with "RESPX: GET /v1/teams not mocked!" and
the unit-tests CI job (pixi run pytest, full suite) failed on main, blocking
all open PRs.
- Add the missing GET /v1/teams mock route (list_teams), mirroring
list_agents and returning {"teams": [...]} to match the real API shape.
- Update test_full_workflow.py agent-payload assertions for the
workflow-scoped idempotency keys added in #253: `name` now carries the
tlm-<hash>-<agent> key while `label` stays the human-readable name, and
the docker payload includes hostId. Assert on the stable `label`/suffix
instead of the old raw `name`.
- Remove stray .claude-followup-177.md agent artifact that leaked onto main
(failed non-required markdownlint; not referenced anywhere).
Restores the unit-tests check to green locally (148 passed, ruff + mypy clean).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: mvillmow <4211002+mvillmow@users.noreply.github.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.
Problem
The required unit-tests check has been consistently FAILING on
main(not flaky), which blocks all ~19 open PRs.Root cause: the executor's idempotency snapshot step now calls
GET /v1/teamsviaAgamemnonClient.list_teams()(executor.py:118), but the integration test RESPX router intests/integration/conftest.pynever registered that route. Every workflow run therefore errored with:The workflow then failed and the assertions failed. The CI
unit-testsjob runs the full suite (pixi run pytest --tb=short -q --cov=telemachy --cov-report=term-missing), so these integration tests run under it.This affected 6 tests across
test_error_scenarios.pyandtest_full_workflow.py.Fix
GET /v1/teamsmock route (list_teams) to the conftest RESPX router, mirroringlist_agentsand returning{"teams": [...]}to match the real API shape. (Resolves the/v1/teams not mockedfailures — the primary issue.)test_full_workflow.pyagent-payload assertions for the workflow-scoped idempotency keys added in Add workflow idempotency keys to prevent duplicate provisioning #253: the create-agent payloadnamenow carries thetlm-<hash>-<agent>idempotency key whilelabelstays the human-readable name, and the docker payload includeshostId. The tests now assert on the stablelabel/ name suffix instead of the stale rawname. (Same regression wave; fixtures weren't updated.).claude-followup-177.mdagent artifact that leaked ontomain(was failing the non-required markdownlint check; not referenced anywhere).Verification (local)
pixi run pytest --tb=short -q --cov=telemachy --cov-report=term-missing(exact CI unit-tests command) → 148 passedpixi run ruff check src tests→ All checks passedpixi run mypy src/telemachy --ignore-missing-imports→ Success, no issuesThis unblocks all open Telemachy PRs once merged. Squash-merge only.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
🤖 Generated with Claude Code