Skip to content

Conversation

@Iamsdt
Copy link
Collaborator

@Iamsdt Iamsdt commented Nov 29, 2025

This pull request introduces several improvements to serialization, dependency injection, and testing infrastructure, primarily focused on the FastAPI app and its store/checkpointer services. The most significant changes are the consistent use of serialize_as_any=True for model serialization, refactoring test and fixture setup to use dependency injection (InjectQ), and the addition of minimal and isolated test files to validate OpenAPI schema and endpoint behavior.

Serialization improvements:

  • Updated all usages of model_dump and model_dump_json in agentflow_cli/src/app/routers/graph/services/graph_service.py, agentflow_cli/src/app/routers/checkpointer/services/checkpointer_service.py, and agentflow_cli/src/app/utils/parse_output.py to include serialize_as_any=True, ensuring subclass fields are preserved during serialization. [1] [2] [3] [4] [5] [6] [7]

Testing and fixture refactoring:

  • Refactored tests/integration_tests/store/conftest.py to use dependency injection (InjectQ) for setting up FastAPI test apps, replaced patching of services with DI, and added fixtures for unauthenticated app/client setups to improve test isolation and reliability. [1] [2] [3] [4]

Addition of minimal and isolated tests:

  • Added new minimal test files (test_minimal.py, test_pytest.py, test_super_minimal.py) to validate FastAPI endpoint registration, OpenAPI schema, and store router behavior in isolation, using mocks and DI. [1] [2] [3]

Test and validation updates:

  • Updated CLI and utility tests to reflect changes in configuration validation and model output, ensuring tests match current implementation and serialization logic. [1] [2] [3] [4] [5] [6]

Build and coverage commands:

  • Modified the Makefile to ensure pytest-cov is installed before running coverage tests and updated the coverage target to use the correct package name.

@Iamsdt Iamsdt merged commit 336257c into main Nov 29, 2025
1 check passed
@Iamsdt Iamsdt deleted the fix/tests branch November 29, 2025 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants