Skip to content

matrix: Add environment mode test support#4236

Draft
backspace wants to merge 24 commits intomainfrom
matrix/tests-environment-mode-cs-10481
Draft

matrix: Add environment mode test support#4236
backspace wants to merge 24 commits intomainfrom
matrix/tests-environment-mode-cs-10481

Conversation

@backspace
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 23, 2026

Host Test Results

    1 files  ± 0      1 suites  ±0   2h 1m 35s ⏱️ - 13m 50s
2 092 tests +27  2 076 ✅ +27  15 💤 ±0  0 ❌ ±0  1 🔥 ±0 
2 092 runs  +27  2 075 ✅ +27  15 💤 ±0  1 ❌ ±0  1 🔥 ±0 

For more details on these errors, see this check.

Results for commit 45fbfde. ± Comparison against base commit fb143de.

♻️ This comment has been updated with latest results.

backspace and others added 14 commits March 23, 2026 13:29
…ent-mode-cs-10481

# Conflicts:
#	packages/matrix/docker/synapse/index.ts
#	packages/matrix/helpers/environment-config.ts
#	packages/matrix/helpers/isolated-realm-server.ts
…ent-mode-cs-10481

# Conflicts:
#	packages/matrix/docker/synapse/index.ts
…ent-mode-cs-10481

# Conflicts:
#	mise-tasks/test-services/matrix
- getSynapseURL falls back to MATRIX_TEST_CONTEXT env var so Playwright
  worker processes use the test Synapse (not the dev Synapse)
- Test Synapse temporarily overwrites the dev 'matrix' Traefik route
  (required because Playwright page.route cannot intercept WebSockets);
  teardown restores the dev route
- Test Synapse uses a separate Docker container (boxel-synapse-test-*)
  so the dev Synapse container keeps running
- global.setup waits for host app availability before starting realm server
- page.route rewrites Ember config matrixURL and redirects Matrix API calls
- setRealmRedirects redirects base/skills realm URLs to isolated test server
- Prerender BOXEL_HOST_URL points to isolated realm server (same-origin,
  no CORS issues); standby creation retries after realm server boots
- PG_POOL_MAX defaults to 5 for test processes to avoid exhausting
  Postgres connections when running alongside the dev stack

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The realm server's retrieveIndexHTML() already rewrites the Ember config's
matrixURL to match its --matrixURL flag. This means the test Synapse can
use a distinct service name (matrix-test) without colliding with the dev
Synapse — the browser gets the correct URL from the realm server's HTML.

Removes the page.route HTML/API redirect hack and the dev Synapse route
save/restore logic. Also reads matrixUrl from MATRIX_TEST_CONTEXT env var
in getSynapseURL() so Playwright worker processes use the test Synapse.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ent-mode-cs-10481

# Conflicts:
#	packages/matrix/helpers/isolated-realm-server.ts
#	packages/matrix/tests/skills.spec.ts
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Realm Server Test Results

  1 files  ±0    1 suites  ±0   12m 17s ⏱️ -35s
828 tests ±0  828 ✅ ±0  0 💤 ±0  0 ❌ ±0 
899 runs  ±0  899 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 45fbfde. ± Comparison against base commit fb143de.

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.

1 participant