Skip to content

test(cli): Fix env- and Node-dependent test failures, drop ~/src/sentry path - #2457

Open
sentry-junior[bot] wants to merge 2 commits into
mainfrom
fix/agent-friction
Open

sentry-junior[bot] wants to merge 2 commits into
mainfrom
fix/agent-friction

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Fixes three things that trip up agents and people working in this repo.

Telemetry credential tests depend on SENTRY_SPOTLIGHT. The root .env.local sets SENTRY_SPOTLIGHT=1. With it set, the SDK adds its Spotlight integration, and that forces integration setup even in the disabled initSentry(false, …) call. The test helper's own client.init() then sets up integrations a second time, so Dedupe's processor is registered twice and the second copy drops every error event as a duplicate of itself. Logs and transactions aren't deduped, so only the error-event tests broke. The helper now stubs SENTRY_SPOTLIGHT off and restores it after each test. This isn't a timing problem, so the flush timeouts stay as they are.

Stable delta test breaks on Node 24. The mocked resolveStableDelta test built its fake TRDIFF10 patch as a bare header with no zstd frames. Node 22 decompresses an empty buffer to an empty buffer, but Node 24 throws unexpected end of file, so the test never reached the SHA-256 mismatch it asserts. The patch is now built from real empty zstd frames, the same way bspatch.test.ts builds its patches.

AGENTS.md assumes ~/src/sentry. Workflow step 2 now says to validate against the getsentry/sentry source, without assuming a local path. It still says to trust source over docs or client params.

Follow-up, not in this PR: docs/contributing/api-patterns.md and docs/contributing/tool-responses.md still reference ~/src/sentry.

via @dcramer.

--

View Session [Sentry]

…ry path

The telemetry credential tests failed whenever SENTRY_SPOTLIGHT=1 was set,
which the root test script loads from .env.local. Spotlight makes the SDK
set up integrations in the disabled init, so the helper's second init()
registered Dedupe twice and every error event was dropped. Stub the
variable off in the helper.

The stable delta mocked test built its fake TRDIFF10 patch with no zstd
frames. Node 24 throws when decompressing an empty buffer, so the test hit
'unexpected end of file' instead of the SHA-256 check. Build the patch
from real empty zstd frames.

AGENTS.md pointed at ~/src/sentry, which most
checkouts do not have. Name the getsentry/sentry source instead.

Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cli Ready Ready Preview Nov 21, 2026 4:18am UTC
sentry-local Ready Ready Preview Nov 21, 2026 4:18am UTC

Request Review

@sentry-junior
sentry-junior Bot marked this pull request as ready for review November 21, 2026 04:14
@sentry-junior
sentry-junior Bot requested a review from dcramer November 21, 2026 04:14
@github-actions github-actions Bot added the risk: low PR risk score: low label Nov 21, 2026
Comment thread AGENTS.md Resolved

This branch was successfully deployed

2 active deployments
Preview – sentry-local — 2a772238 Deployed Nov 21, 2026 by vercel[bot]
Preview – cli — 2a772238 Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant