Dashboard › cli › Distillation
77e89347-d474-426c-bf1e-74ce50b752cd["lore_tm_v1_iOOo2nd6_hfld8QOVWf7KiuVx-9gYCgT9c2j8EXQUm0","lore_tm_v1_xNGEC2vNuVvwSo2t6hruvr2s9pdgIQR0hUDqr5s6STo"]
Date: September 9, 2026
parseIssueArg(arg) must select the first non-blank trimmed line rather than allow an internal newline to reach validateResourceId./; any slash-containing input must therefore be parsed as a structured org/project/id or incomplete org/project value.\n via LINE_SPLIT_PATTERN never breaks project display names with spaces, because spaces are not newline control characters and such control characters are rejected anyway.packages/cli/src/lib/arg-parsing.ts lines 1177–1207 define parseWithDash(arg): split on the final -, uppercase the suffix, reject missing project or suffix with ValidationError, call rejectIssueCommandTokenWithNumericSuffix(arg, projectSlug, suffix), and return { type: "project-search", projectSlug: projectSlug.toLowerCase(), suffix }; lowercasing prevents uppercase short IDs such as "EASI-API-3Y4" from producing an uppercase project slug that fails API lookup, as in CLI-C8.packages/cli/src/lib/arg-parsing.ts lines 1226–1270 define parseSlashSeparatedArg(arg, idLabel, usageHint): { id: string; targetArg: string | undefined }: trim input; throw new ContextError(idLabel, usageHint, []) for empty input; return { id: trimmed, targetArg: undefined } when there is no slash; throw the same ContextError for exactly one slash (org/project, missing ID); for two or more slashes, split on the final /; throw ContextError if the extracted ID is empty; validate the ID with validateResourceId(id, idLabel); and return { id, targetArg }.parseSlashSeparatedArg() deliberately skips validation for a no-slash plain ID because callers may perform additional processing such as splitting newline-separated IDs; downstream validators including validateHexId and validateTraceId provide format-specific validation. Its extracted targetArg is subsequently validated through parseOrgProjectArg.packages/cli/src/lib/arg-parsing.ts lines 1272–1299 define the start of parseIssueArg(arg): split with LINE_SPLIT_PATTERN, trim each line, choose the first non-empty line or "", throw ValidationError("Issue identifier is empty after trimming whitespace.", "issue identifier") if none remains, then attempt URL extraction via parseSentryUrl(input).parseIssueArg() first-nonblank-line handling is bug CLI-1G1, affecting 116+ users: command substitution with extra output, an identifier followed by a note, or several newline-separated IDs previously left an internal newline and produced a cryptic "contains a newline" validation error. Unlike sentry api, which rejoins wrapped URLs for CLI-FR, issue identifiers are atomic tokens, so joining lines would create invalid data.EXIT.CONTEXT_MISSING: packages/cli/test/commands/event/view.test.ts:317 tests one-slash org/project input missing an event ID; packages/cli/test/e2e/trace.test.ts:148, packages/cli/test/e2e/project.test.ts:183, packages/cli/test/e2e/project.test.ts:192, packages/cli/test/e2e/log.test.ts:223, and packages/cli/test/e2e/event.test.ts:72 expect EXIT.CONTEXT_MISSING; packages/cli/test/commands/span/view.test.ts:211 tests org/project/spanId missing a trace ID and expects a trace-focused ContextError for CLI-1GP; packages/cli/test/commands/span/list.test.ts:100 tests no arguments selecting project mode; packages/cli/test/e2e/bundle.test.ts:166 and :183 note that cli defaults with no arguments reads current defaults from SQLite and should succeed; packages/cli/test/lib/sdk-positionals.test.ts:7 notes snapshots diff failed because its second positional is required; packages/cli/test/commands/agent-conversation/view.test.ts:7 documents throwing when no arguments are provided and :268 tests it; packages/cli/test/commands/release/deploy.test.ts:144 tests throwing with no arguments; packages/cli/test/commands/log/view.test.ts:255 tests one-slash org/project input missing a log ID; packages/cli/test/lib/api-scope.test.ts:53 contains "event:read is required. Try obtaining event:read scope."; packages/cli/test/lib/error-reporting.test.ts:294 uses new ContextError("Event ID", "sentry event view <id>", []); packages/cli/test/lib/errors.test.ts:136 expects "Project is required.", :144 and :180 expect "Resource is required.", and :715–717 tests that ContextError has exit code EXIT.CONTEXT_MISSING.