Files
correx/docs/modules/testing/test-integration.adoc
kami 9734eec63c docs: add module documentation in AsciiDoc with PlantUML diagrams
Generated by per-group subagents covering all 52 modules across:
core (18), infrastructure (10), apps (5), interfaces (3),
plugins (7), testing (9)

Documentation format:
- AsciiDoc (.adoc) files in docs/modules/<group>/
- PlantUML (.puml) files in docs/diagrams/
- .adoc files reference diagrams via include:: directives

Each doc covers: purpose, responsibilities, non-responsibilities,
key types, event flow, integration points, invariants, PlantUML
diagram, known issues, and open questions.
2026-05-26 16:59:21 +04:00

70 lines
2.9 KiB
Plaintext

= test-integration
== purpose
Integration tests that exercise end-to-end workflows spanning multiple core modules and infrastructure components. Verifies that components wire together correctly and produce the expected outcomes across subsystem boundaries.
== responsibilities
* Test the `SessionOrchestrator` end-to-end: from session start through stage transitions, tool execution, and completion
* Test the `ValidationPipeline` end-to-end: from payload submission through all validators to final validation report
* Verify that events flow correctly between subsystems (reducer -> store -> projector -> repository)
== non-responsibilities
* Does not test with a real SQLite/Postgres event store (uses in-memory store)
* Does not test real inference providers or tool executors
* Does not test UI or application layers
* Does not test network-level integration (HTTP, WebSocket)
== key types
=== SessionOrchestratorIntegrationTest
* **kind**: JUnit 5 test class
* **purpose**: Tests full orchestration lifecycle: creates a `WorkflowGraph`, starts a session via `DefaultSessionOrchestrator`, verifies stage progression, tool invocation events, and session completion.
=== ValidationPipelineIntegrationTest
* **kind**: JUnit 5 test class
* **purpose**: Tests the validation pipeline with multiple validators, verifying that each validator is invoked and that the aggregated validation report is correct.
== event flow
*inbound:* Constructed `NewEvent` instances and orchestration commands submitted to the orchestrator or validation pipeline.
*outbound:* Assertions on `StoredEvent` sequences emitted to the event store, final state from projections, and validation reports.
== integration points
* `:core:kernel` — `DefaultSessionOrchestrator`, `OrchestrationConfig`, `OrchestratorEngines`
* `:core:events` — `EventStore`, event payload types
* `:core:validation` — `ValidationPipeline`, `Validator`, validation model types
* `:core:sessions` — `DefaultSessionRepository`, `SessionProjector`
* `:core:transitions` — `DefaultTransitionResolver`, `WorkflowGraph`
* `:testing:fixtures` — mock providers, tools, compressors, repositories, and event replayers
== invariants
* Orchestrator follows the configured workflow graph — stages execute in declared order
* The event store contains all events produced during orchestration
* Validation pipeline evaluates all registered validators
== PlantUML diagram
[plantuml, test-integration, "png"]
----
include::../../diagrams/test-integration.puml[]
----
== known issues
* Tests use mocked engines, not real inference or tool execution — real end-to-end behavior is not validated
* In-memory event store may not surface ordering or persistence bugs present in production stores
== open questions
* Should integration tests include a real SQLite event store to verify write/read ordering?
* Should there be a separate integration test for the server module's HTTP and WebSocket routing?