Skip to content

Integration tests for workflow lifecycle#255

Merged
mvillmow merged 4 commits into
mainfrom
146-auto-impl
Jun 29, 2026
Merged

Integration tests for workflow lifecycle#255
mvillmow merged 4 commits into
mainfrom
146-auto-impl

Conversation

@mvillmow

@mvillmow mvillmow commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements issue #146 by adding end-to-end integration tests that exercise the full Telemachy workflow lifecycle against an in-process ASGI stub of the Agamemnon REST API.

  • Adds tests/stub_agamemnon.py: Complete ASGI stub implementing all Agamemnon endpoints used by Telemachy
  • Adds tests/conftest.py: Shared fixtures including make_client_for() helper and client_pool lifetime fixture
  • Adds tests/test_workflow_lifecycle.py: Six lifecycle tests covering happy path, dependencies, failures, teardown policies, and CLI integration
  • Updates pyproject.toml to register the @pytest.mark.integration marker
  • Updates justfile with test-integration and test-unit recipes
  • Updates CLAUDE.md with test taxonomy documentation

Testing

All 54 tests pass (48 existing unit tests + 6 new integration tests):

  • pytest runs full suite (unit + integration)
  • pytest -m integration runs only the 6 lifecycle tests
  • pytest -m "not integration" runs only the 48 unit tests
  • just test, just test-integration, and just test-unit all work as documented

Closes #146

@mvillmow mvillmow enabled auto-merge (squash) June 3, 2026 12:42
@mvillmow mvillmow force-pushed the 146-auto-impl branch 2 times, most recently from 3d78e7a to 6c4d6c8 Compare June 29, 2026 06:42
mvillmow added 4 commits June 29, 2026 00:58
- Add tests/stub_agamemnon.py: in-process ASGI stub of ProjectAgamemnon REST API
- Add tests/conftest.py: shared fixtures for integration tests
  - make_client_for(stub) sync helper for constructing stub-bound clients
  - client_pool async fixture for managing client lifetimes
  - stub_agamemnon_factory, make_spec, write_workflow_yaml fixtures
  - load_workflow() helper to quarantine cli._load_workflow import
- Add tests/test_workflow_lifecycle.py: six integration tests covering:
  1. Happy path: single agent, single task, teardown on_completion
  2. Dependent tasks: task B blocked on task A with custom status sequences
  3. Failed dependency: task A fails, task B is skipped, workflow fails
  4. Partial provisioning failure: agent 2 fails, agent 1 is torn down
  5. Docker runtime: verifies /v1/agents/docker endpoint is used
  6. CLI load path: YAML round-trip through _load_workflow runs end-to-end

- Register @pytest.mark.integration in pyproject.toml
- Update justfile: just test (full), just test-unit (unit only), just test-integration (integration only)
- Update CLAUDE.md: document test taxonomy and stub behavior

Implements issue #146: full workflow lifecycle end-to-end against stubbed REST API.
All 54 tests pass (48 unit + 6 integration). Marker filtering verified.

Signed-off-by: mvillmow <4211002+mvillmow@users.noreply.github.com>
Signed-off-by: mvillmow <4211002+mvillmow@users.noreply.github.com>
No follow-ups within scope. All lifecycle tests pass; conftest fixtures
verified to not collide with existing tests; architectural decisions
(hook scope, coverage gates) were deliberate, not discovered gaps.

Signed-off-by: mvillmow <4211002+mvillmow@users.noreply.github.com>
Signed-off-by: mvillmow <4211002+mvillmow@users.noreply.github.com>
@mvillmow mvillmow merged commit 1a92c37 into main Jun 29, 2026
12 of 13 checks passed
@mvillmow mvillmow deleted the 146-auto-impl branch June 29, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MAJOR] §5: No integration tests verifying full workflow lifecycle

1 participant