Dashboard › cli › Distillation
3f38544b-f840-4a1a-b16c-03a237eb73d4["lore_tm_v1_GVUxDAdMnK1gdgCj73S6p3mLm6nwcGcNHOmuD1YmPnI","lore_tm_v1_zIH7IyvfiC-KWE9N4Ft0FlGfL1U0yLkK1GdnmzmJsFI","lore_tm_v1_74MEEhQAMJs-YiIsZz0ClTSLXiYQYPDK_VSsV18z-98","lore_tm_v1_Io0oPLt3jT0IXcDW9gI_Kpi3PMA4-8Fbrd0PyccfaGI","lore_tm_v1_zkPKpccc1o74G43WI5a29j0vrf8GwkPzYxQwh_YwXjM","lore_tm_v1_SdKNYVkxnAQ2tzNYLDr12QldSOn07tNQKUoAwKDbHLU","lore_tm_v1_KKJDC_nwPGP2E94F6BwN7XoQVpw8cBCiR5hx7uVlGx4","lore_tm_v1_P2dsSDjRNn0kR0sOjth-Upw0nv9lvcanXMti4rjHQSY","lore_tm_v1_izCWgZkSgiEKfdgW0QrSRkJ_bUaltVzwAT4gQv8vp_Y","lore_tm_v1_U9tcYw3QVc4aR3wpKZGv2sg8YJrcOBCnKnBFScnuNjg","lore_tm_v1_cDnYu4odCbxjuVQMfzOSzQMcVrOYu4tBcmRBbwy3LUg","lore_tm_v1_9vnpS94Y0LfHS_ygZrdussOXcohg1q5kFoxlY8X50GU","lore_tm_v1_X8Cc9WhUxUjwNoXgRWKmA7wsZCig9DL_tdvWcpWkok0","lore_tm_v1_Ftre93bU_m5Cdv-rF3c16zXH0NBZMWsRRW7SjQS9bBk","lore_tm_v1_l6fpSQenbDyHWXPTyzzbUx-Du4TDMipcO4r4j_bcgxQ","lore_tm_v1_PJPsXNxX5vUPrE8Uw1j-AJbxsULiZEAVvmLYCQlVFbM","lore_tm_v1_itsloyPEj4cDd0ZxAcs77Ecl9aVuEF6xCJQfJ9zluzw","lore_tm_v1_FSZxhuW9qZBunE7kZIL_G1FydoaTKqhbikgM8Yaf8Fw"]
Date: Sep 10, 2026
biome check --no-errors-on-unmatched --max-diagnostics=none ./) initially failed after checking 951 files in 38s: src/lib/sentry-client.ts fetchWithTimeout had cognitive complexity 23 (maximum 15), and Biome requested formatting changes in src/lib/sentry-client.ts and test/lib/security/sntrys-claim-mismatch.test.ts; no fixes were automatically applied and the command exited 1.for (let redirects = 0; ; redirects++) source block in packages/cli/src/lib/sentry-client.ts no longer exactly matched the patch context.packages/cli/src/lib/sentry-client.ts redirect implementation at this point used isRedirect() for statuses 301, 302, 303, 307, and 308; getRedirectUrl() throws ApiError for missing or invalid Location; and getRedirectRequest() converts non-GET/non-HEAD requests to GET for 303, plus POST requests for 301/302, while retaining method/body semantics otherwise.fetchWithTimeout() preserved the established initial fetch(input, {...init}) call shape and created a clone/new concrete Request only for redirect replay, so 307/308 could resend an unconsumed original body.packages/cli/src/lib/sentry-client.ts rebuilt headers through prepareHeaders(nextRequest, undefined, getBearerToken(headers)) only after resolving the redirect destination; it preserved RETRY_MARKER_HEADER if present.packages/cli/src/lib/sentry-client.ts was successfully updated twice during the lint/complexity refactor.packages/cli/test/lib/security/sntrys-claim-mismatch.test.ts was successfully updated for formatting.getFetchArguments() in src/lib/sentry-client.ts had 6 parameters, exceeding Biome lint/nursery/useMaxParams maximum of 4; fetchWithTimeout() complexity was reduced from 23 to 17 but remained above 15; and getFetchArguments() still needed formatting. Command exited 1.getFetchArguments(input, init, request, headers, signal, customTls) helper with a typed options object, and extract redirect-limit handling to reduce fetchWithTimeout() complexity.packages/cli/src/lib/sentry-client.ts added FetchArguments with exact fields input, init, request, headers, signal, and customTls; getFetchArguments({ ... }: FetchArguments) returns either [request, { headers, signal, redirect: "manual", ...customTls }] for redirect requests or [input, { ...init, headers, signal, redirect: "manual", ...customTls }] for the initial request.packages/cli/src/lib/sentry-client.ts added getInitialRedirectRequest(input, init), which clones input when it is a Request, otherwise returns new Request(input, init), preserving a redirect-replayable body before the initial fetch consumes it.packages/cli/src/lib/sentry-client.ts added assertRedirectLimit(redirects, response): it returns while redirects < MAX_REDIRECTS, otherwise throws ApiError with Too many redirects (maximum ${MAX_REDIRECTS}), the response status, and response.url.packages/cli/src/lib/sentry-client.ts added getNextRedirectRequest(response, request, headers), which obtains the destination with getRedirectUrl(), creates the next request with getRedirectRequest(), regenerates host-scoped auth/custom headers using the bearer token, and restores RETRY_MARKER_HEADER.biome check --no-errors-on-unmatched --max-diagnostics=none ./ checked 951 files in 42s with no fixes applied and no reported errors.pnpm run generate:docs && pnpm run generate:sdk && tsc --noEmit; it ran documentation and SDK generation before failing TypeScript checking..env.local being absent: generated src/generated/banner-sixel.ts at 640x155 with sixel 4216 bytes; src/generated/search-parser.js (31.1 KB) and src/generated/search-parser.d.ts; 32 command-doc pages plus ../../apps/cli-docs/src/content/docs/commands/index.md and ../../apps/cli-docs/src/content/docs/configuration.md; plugins/sentry-cli/skills/sentry-cli/SKILL.md, 32 reference files, ../../apps/cli-docs/public/.well-known/skills/index.json, and src/generated/skill-content.ts; and SDK files ./src/sdk.generated.ts and ./src/sdk.generated.d.cts after discovering 105 commands.TS2322 at src/lib/sentry-client.ts(418,9): { tls: { ca: string; }; } | {} was not assignable to DOM RequestInit, because { tls: { ca: string; } } has no properties in common with RequestInit; command exited 2.getCustomTlsOptions() returns Bun runtime fetch options { tls: { ca: string } } | undefined, while DOM RequestInit does not declare tls; planned fix was to widen only the internal helper option type, without changing emitted request options.packages/cli/src/lib/custom-ca.ts implements custom CA loading with priority: (1) stored sentry cli defaults ca-cert SQLite path via getDefaultCaCert(), then (2) NODE_EXTRA_CA_CERTS; it caches the first readable PEM per process and returns { tls: { ca: combined } }, where combined is rootCertificates plus the custom PEM.src/lib/custom-ca.ts readCaCertFile(path) returns either { ok: true; content } or { ok: false; reason }; unreadable files return CA certificate file not found or not readable: ${path}, and files without -----BEGIN CERTIFICATE----- return a PEM-data error. tryReadPem(path) logs the failure and returns undefined, rather than throwing.src/lib/custom-ca.ts security model: when a CA comes from NODE_EXTRA_CA_CERTS rather than an explicit stored default and the destination is SaaS *.sentry.io, it logs a one-time warning; explicitly setting sentry cli defaults ca-cert silences that warning.src/lib/custom-ca.ts uses Bun per-request tls.ca; on Node 24+ it attempts tls.setDefaultCACertificates([...rootCertificates, customPem]) so built-in fetch() trusts the custom CA, while on Node 22 the injection is a no-op and users rely on native NODE_EXTRA_CA_CERTS handling. Failures to set Node default CA certificates are debug-logged rather than thrown.packages/cli/src/lib/sentry-client.ts was successfully updated to address the custom-TLS RequestInit type-boundary failure; final post-fix typecheck result was not shown in this segment.