Complement treats a homeserver as a black box: deploy real instances, create
high-level test clients, and validate protocol behavior by domain. cotest
applies the same pattern to Arkret.
- Complement deployment helpers map to
ArkretServerandTestServerGroup.cotestnow supports both host-spawned local processes and Docker-backed SUT instances under the same harness. - Complement client helpers map to
TestActorClient, shared HTTP assertions, and selectedarkret-rust-sdkhelpers. - Complement's domain-oriented test packages map to
src/scenarios/*.rs. - Complement federation coverage maps to
federation_readiness,federation_contract, andfederation_collaboration. - Complement's out-of-repo discipline maps to keeping reusable logic in
src/and leavingtests/as wrappers only. - Complement's base-image workflow maps to
COTEST_SUT_IMAGEplus docker/coland.Dockerfile and scripts/build-coland-image.ps1, including Docker cache controls for CI builds. - Complement's result-formatting story maps to
scripts/run-server-conformance.ps1,
which emits raw logs, redacted HTTP transcripts, and Markdown/JSON summaries
under
artifacts/.
Complement typically expects a prebuilt homeserver image selected through
COMPLEMENT_BASE_IMAGE, then uses internal/docker/builder.go and
internal/docker/deployer.go to create deployment-scoped Docker resources.
cotest now mirrors that model like this:
- Image build entrypoint:
scripts/build-coland-image.ps1
builds
cotest-coland:latest. - Image source:
docker/coland.Dockerfile
compiles
colandtogether with the siblingarkret-rust-sdkcheckout. - Build context control:
E:\Works\arkret\.dockerignorelimits Docker context to the trees needed for the SUT image, instead of sending the entire workspace. - Runtime selector:
COTEST_SUT_MODE=process|dockerchooses either localcargo runor container-backed execution. - Multi-server deployment:
TestServerGroup::multicreates an isolated Docker bridge network indockermode so federated scenarios run in one controlled runtime boundary.
This is intentionally simpler than Complement's blueprint-image machinery:
cotest currently builds one source-based coland image and uses runtime
configuration plus host-side actor setup to shape each test.
Complement runs Go tests on the host while homeservers live in containers, and
optionally pretty-prints go test -json output with gotestfmt.
cotest now has the same separation of concerns:
- host-side
cargo test - SUT spawned as either child process or Docker container
- one script entrypoint for execution: scripts/run-server-conformance.ps1
- persisted result artifacts:
artifacts/runs/server-conformance/<timestamp>-<profile>/for authoritative logs, transcripts, summaries, JUnit, coverage/gate/gap reports, CI-profile and secret-scan reports, and service logs; stable mirrors live atartifacts/latest/server-conformance/andartifacts/latest/joint-e2e/
The Markdown summary is the primary human-readable report. That gives cotest
an explicit result surface comparable to Complement's formatter pipeline,
without making users reconstruct the run from terminal scrollback.
In addition to runtime results, cotest now has an offline fixture-driven
conformance surface in src/conformance/,
which consumes the spec-owned machine-readable artifacts under
arkret-spec/spec/v1/artifacts: schemas, registries, profiles, OpenAPI, non-HTTP
bindings, and fixtures. Complement does not need this exact layer because
Matrix homeserver behavior is mostly expressed directly through networked
black-box tests; Arkret benefits from keeping protocol vectors and server
scenarios side by side.
- Service and framework surface: health, server description, supported operations, unknown routes, bad JSON, wrong methods, and standard error envelopes.
- Account and social graph: register, login, logout, session checks, duplicate handling, and contact edge cases.
- Collaboration and policy: space lifecycle, membership, permissions, sync projection, and private plaintext policy enforcement.
- Events and sync: event submission, idempotency, dependency conflicts, read paths, event sync, directory/index parameter handling, and expanded event reads.
- Identity, authz, and realtime: identity resolution/log/receipts, grant and policy document lifecycle, presence/typing, push rules, and WebRTC signaling.
- Delivery and media: keys, to-device delivery, blob upload/download, range requests, anti-enumeration/privacy guards, and payload preservation.
- Federation: readiness checks, public contract validation, and end-to-end cross-server collaboration behavior.
- Extension gaps: executable coverage for missing applet/agent route surfaces so gaps remain visible without leaving ignored placeholder tests behind.