Skip to content

fix(e2e): turn Sentry off in the Workplace e2e dev server - #670

Merged
MrYuion merged 1 commit into
developfrom
fix/e2e-disable-sentry
Nov 3, 2026
Merged

MrYuion merged 1 commit into
developfrom
fix/e2e-disable-sentry

Conversation

@camreeves

Copy link
Copy Markdown
Contributor

What broke

24cc8b5 (enable Sentry by default) means every Workplace page now loads Sentry and posts envelopes to https://o437082.ingest.us.sentry.io/api/4506817038909440/envelope/. That includes the pages the e2e suite opens on localhost.

The settings specs refuse any request that leaves the local app and backend, and the Sentry POST trips both of their guards:

  • The read-only guard (apps/workplace/e2e/local/wpa-settings-readonly-legacy.fixture.ts and the per-spec copies) routes **/api/**. The Sentry URL matches that pattern, it's a POST, and it isn't to the local origin. So it's recorded as an API mutation and the test fails "read-only scenario must perform zero API mutations".
  • The browser-only harness records it as "external HTTP request" (plus the "request failed" and console error from the abort) and fails the strict teardown audit.

Since it landed:

It also means every e2e run was sending traces and error events from localhost to the placeos-dev Sentry project.

The fix

Sentry reads sentry_dsn only when the app starts, so (as the settings docs say) the off switch has to be in the build-time settings. This adds:

  • apps/workplace/src/environments/settings.e2e.ts: the Workplace build-time settings with sentry_dsn: ''
  • an e2e build configuration that swaps it in, and an e2e serve configuration that uses it
  • --configuration=e2e on the Playwright webServer command, plus the matching line in e2e/README.md

Production, mobile, staging and plain nx serve workplace are unchanged and keep Sentry on. The harness guards aren't touched, so they still catch any other request that leaves the stack.

Only Workplace's e2e runs in CI, so that's the only app changed here. Other apps' Playwright configs (concierge, stagehand and so on) will also report to Sentry if they're run locally. They can get the same configuration when they join CI.

Testing

Browser-only settings project (--project=settings-browser, TZ=Etc/UTC, CI=1), run locally:

Result
develop's serve command (control) 18 failed, 18 passed, 96 "external HTTP request" refusals. Matches CI
this branch 36 passed

The full suite against the e2e stack (workplace job) is running on this branch through a workflow dispatch: https://github.com/PlaceOS/user-interfaces/actions/runs/41740767164

🤖 Generated with Claude Code

https://claude.ai/code/session_015VtrxAzu8XnqXeQG3QbRXt

24cc8b5 turned Sentry on by default, so every Workplace page the e2e
suite loads now posts envelopes to ingest.us.sentry.io. The settings specs
refuse any request that leaves the local app and backend: the read-only
guard records the POST to /api/<project>/envelope/ as an API mutation,
and the browser-only harness records it as an external HTTP request. On
develop that failed 411 settings tests and 18 of 36 browser-only tests,
and every run sent events from localhost to the placeos-dev project.

Sentry reads sentry_dsn only when the app starts, so the off switch has
to be in the build-time settings. A new `e2e` build and serve
configuration replaces the settings file with settings.e2e.ts, which is
the Workplace settings with sentry_dsn ''. The Playwright webServer
serves that configuration. Production, mobile, staging and plain
`nx serve workplace` are unchanged and keep Sentry on.

The harness guards are left as they are: they still catch any other
request that leaves the stack.
@vercel

vercel Bot commented Nov 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
frontend-templates Ignored Ignored Nov 3, 2026 11:39pm UTC

@camreeves
camreeves requested a review from MrYuion November 3, 2026 23:39
@MrYuion
MrYuion merged commit 72fbda7 into develop Nov 3, 2026
6 of 9 checks passed
@MrYuion
MrYuion deleted the fix/e2e-disable-sentry branch November 3, 2026 23:51
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