Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

fix(arg-parsing): Handle space-separated event IDs from agents - #1530

Merged
jared-outpost[bot] merged 2 commits into
mainfrom
seer/fix/cli-1ht-space-ids
Sep 4, 2026
Merged

jared-outpost[bot] merged 2 commits into
mainfrom
seer/fix/cli-1ht-space-ids

Conversation

@sentry

@sentry sentry Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

This PR fixes a ValidationError: Invalid Event ID: contains a space. that occurred when AI agents provided multiple event IDs separated by spaces as a single argument to commands like sentry event view.

The root cause was that the splitNewlineArg utility function, used by expandNewlineArgs, only split input strings on newline characters (\n). When agents provided space-separated IDs (e.g., "org/project/id1 org/project/id2"), the entire string was passed as a single argument to validateResourceId, which correctly rejected it due to the presence of spaces.

The solution modifies splitNewlineArg to split on any whitespace (/\s+/) instead of just newlines. This ensures that space-separated, tab-separated, and newline-separated IDs are all correctly parsed into individual arguments, preventing the validation error. The JSDoc for the function has also been updated to reflect this change.

Fixes CLI-1HT

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@vercel

vercel Bot commented Sep 3, 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 Sep 4, 2026 9:06am UTC

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0272632. Configure here.

Comment thread packages/cli/src/lib/arg-parsing.ts Resolved
@BYK BYK added the jared Trigger the Jared agent to work on stuff label Sep 4, 2026
@BYK BYK self-assigned this Sep 4, 2026
@BYK

BYK commented Sep 4, 2026

Copy link
Copy Markdown
Member

Jared, take over the PR, make CI green and merge

biome's useTopLevelRegex flagged the inline /\s+/ in splitNewlineArg.
@sentry
sentry Bot requested a review from betegon September 4, 2026 09:13
@jared-outpost
jared-outpost Bot merged commit 03a19b6 into main Sep 4, 2026
33 checks passed
@jared-outpost
jared-outpost Bot deleted the seer/fix/cli-1ht-space-ids branch September 4, 2026 09:15

This branch was successfully deployed

1 active deployment
Preview — 70e649af Deployed Sep 4, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

jared Trigger the Jared agent to work on stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant