Server E2E
The Nixstasis.E2E context is the server half of the end-to-end tests. It tracks each run from start to finish, makes
sure only one run uses an environment at a time, seeds test data, stores journey results and logs, cleans up old runs,
and exports static reports.
Owns
Nixstasis.E2Einpackages/server/lib/nixstasis/e2e.exand its modules underpackages/server/lib/nixstasis/e2e/:Protocol,EnvironmentLocks,JourneySelection,ExpectationRegistry,DataPolicy,LogStore,Run,RunResult,RetentionWorker, andMetrics.- The
mix e2e.export_statictask, which renders runs into static report pages. - The shared log viewer in
packages/shared/e2e_log_viewer/(viewer.jsandviewer.css). The static export embeds it in report pages, and the LiveDashboard E2E page loads the same viewer.
Entry points
- The
/e2eroutes inNixstasisWeb.E2ERunControllerandNixstasisWeb.E2ERunResultController: list suites, list and create runs, show and cancel a run, submit and read results, and fetch a journey log. The routes and their formats are in E2E API. - Context functions:
create_run/1,list_runs_for_runner/2,get_run_for_runner/2,submit_results/2,fetch_result_log/2, andprune_retention/1. - The LiveDashboard E2E page at
/dev/dashboardin development.
Boundaries
- Enablement:
/e2eis disabled unlessNIXSTASIS_E2E_ENABLED=true, which also requiresNIXSTASIS_E2E_RUNNER_IDand aNIXSTASIS_E2E_RUNNER_TOKENof at least 32 bytes. - Runner ownership: every request carries
X-E2E-Runner-IDandAuthorization: Bearer, independent of operator roles. Runs are stamped with the authenticated runner, and only that runner can read, cancel, or submit to them. Runs created before runner ownership was added belong to:unowned, which no runner can match. Any of those that were still queued or running were cancelled, and their locks released. - Run creation:
POST /e2e/runsrequiresX-E2E-Protocol-Version, validates the protocol, environment, suite, journeys, and action expectations, runs the configured seed script, and holds an environment lock for the run. Typed errors includeenvironment_locked,protocol_mismatch,invalid_action_expectation,seed_failed,invalid_request, anddatabase_error. - Listing:
GET /e2e/runsreturns at most the 100 most recent runs owned by the caller. - Not part of the JSON:API:
/e2eis a plain controller API, because its on/off switch, protocol checks, locking, seeding, and log retention don't fit Ash's action model. - Assets: seed scripts and journey definitions load from the release
privdirectory; the server image packages the client journey YAML underpriv/e2e/journeys. - The client side is described in Client E2E Harness, and published reports in E2E Results.