Repository navigation
test(cli): Fix env- and Node-dependent test failures, drop ~/src/sentry path - #2457
Open
sentry-junior[bot] wants to merge 2 commits into
Open
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dcramer
reviewed
Nov 21, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes three things that trip up agents and people working in this repo.
Telemetry credential tests depend on
SENTRY_SPOTLIGHT. The root.env.localsetsSENTRY_SPOTLIGHT=1. With it set, the SDK adds its Spotlight integration, and that forces integration setup even in the disabledinitSentry(false, …)call. The test helper's ownclient.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 stubsSENTRY_SPOTLIGHToff 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
resolveStableDeltatest 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 throwsunexpected 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 waybspatch.test.tsbuilds 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.mdanddocs/contributing/tool-responses.mdstill reference~/src/sentry.via @dcramer.
--
View Session [Sentry]