fix: fetch the profile for telemetry only when telemetry is enabled - #240
Closed
angeloashmore wants to merge 2 commits into
Closed
fix: fetch the profile for telemetry only when telemetry is enabled#240angeloashmore wants to merge 2 commits into
angeloashmore wants to merge 2 commits into
Conversation
Every CLI invocation fired a fire-and-forget /profile request even with telemetry disabled, since the call sat outside the telemetry gates. In CI this put every spawned CLI process on user-service concurrently, which starts returning 500s at roughly eight concurrent same-user requests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wroom's settings/security/token endpoint intermittently returns 500 when the same user fires concurrent write-token creates, which the concurrent test mode did across CI matrix jobs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
angeloashmore
force-pushed
the
aa/telemetry-and-test-stability
branch
from
July 28, 2026 19:10
141041d to
fe45ddd
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fe45ddd. Configure here.
|
|
||
| it("deletes a write token", async ({ expect, prismic, repo, token, host }) => { | ||
| // Wroom 500s under concurrent same-user write-token creates; keep this sequential. | ||
| it.sequential("deletes a write token", async ({ expect, prismic, repo, token, host }) => { |
There was a problem hiding this comment.
Write-token tests still race across files
Low Severity
it.sequential only serializes tests within a file. With default file parallelism, write-token creates in token-create.test.ts can still overlap createWriteToken in token-delete.test.ts for the same E2E user, so the Wroom 500 race the comments call out can persist.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit fe45ddd. Configure here.
Member
Author
|
Folding this into #229 instead. |
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.


Resolves:
Description
The CLI fetched the user profile on every command, even when telemetry and Sentry were both disabled. Under concurrent runs against the same user, these calls can 500. The profile is now fetched only when telemetry or Sentry is enabled, and the env var overrides feed the same flags.
Also marks the write-token tests as sequential because Wroom 500s under concurrent same-user write-token creates.
Checklist
Preview
How to QA 1
Run any command with telemetry disabled and confirm no request to
/profileis made.🤖 Generated with Claude Code
Note
Low Risk
Behavior change only skips profile API calls when observability is disabled; token refresh logic is unchanged.
Overview
Startup no longer calls
/profilewhen both telemetry and Sentry are off, which avoids extra Wroom traffic and concurrent 500s when many CLI processes share the same user.telemetryEnabledandsentryEnabledare resolved once (includingPRISMIC_TELEMETRY_ENABLED/PRISMIC_SENTRY_ENABLEDoverrides) and reused for init and for gatinggetProfile→trackUser/sentrySetUser.Write-token integration tests in
token-createandtoken-deleteareit.sequentialwith a note that Wroom errors on concurrent same-user write-token creates.Reviewed by Cursor Bugbot for commit fe45ddd. Bugbot is set up for automated code reviews on this repo. Configure here.
Footnotes
Please use these labels when submitting a review:
⚠️ #issue: Strongly suggest a change.
❓ #ask: Ask a question.
💡 #idea: Suggest an idea.
🎉 #nice: Share a compliment. ↩