Dashboard › cli › Distillation
9b8a42be-a5b0-4350-8b71-e63f29ec64a1["lore_tm_v1__hLn05KTiU94fgwaCgUVWJHK64IUVKF_gpOAfk_OEuY","lore_tm_v1_jxEIb0dgK8fqJeTuwE8whYuc6h0BJVXU69MvCYdaSW0"]
sentry api, preserve rawApiRequest() status text; empty textual non-2xx bodies use an HTTP status/request fallback; JSON mode exposes {status, statusText, body}; binary Uint8Array successes bypass formatters and remain raw; binary errors emit only status/content-type/byte-count summaries, never bytes or JSON coercion; prompts must not block scripted runs or interleave with stdout JSON.rawApiRequest() preserves Response.statusText; API output treats every status outside 200β299 as an error, including 304. Empty or whitespace-only textual errors fall back to HTTP <status> <statusText> β <method> /api/0/<endpoint>. JSON errors preserve {status,statusText,body}; binary errors expose only status/content-type/byte-count summaries; binary successes remain raw Uint8Array.--fields to an API envelope is incorrect because it prevents expected body filtering and can break array-element selection. Filtering must apply to response.body while preserving {status,statusText,body}, support nested dot notation and array elements without mutation, and retain literal keys containing dots.api_error attributes.statusText, e.g. HTTP 404 Not Found, with regression coverage.bspatch.ts, applyPatch() βALWAYS computes SHA-256 inline and returns it β no separate verification step.β TRDIFF10 uses a 32-byte header; the control block is decompressed fully with zstdDecompressSync, while diff and extra blocks are streamed via createZstdStreamReader.bspatch.ts exposes transformPatch(oldFile, patchData, onChunk), applyPatchToFile(oldPath, patchData, destPath)βSHA-256, applyPatchToMemory(oldFile, patchData)βUint8Array, and applyPatchChainInMemory(oldPath, patches[], destPath)βSHA-256; applyPatch() remains a backward-compatible thin wrapper.loadOldBinary() copies to a temporary file using COPYFILE_FICLONE, falling back to a regular copy, then reads it into memory. cleanupPatchResources() attempts every cleanup step even after failures. Writer errors are captured through writer.on('error') to avoid ERR_UNHANDLED_ERROR on ENOSPC/EIO.TRDIFF10\x00, little-endian sign-magnitude int64 fields controlLen, diffLen, and newSize, 24-byte control tuples containing readDiffBy, readExtraBy, and seekBy, and zstd-compressed control/diff/extra blocks.MAX_OUTPUT_SIZE=2_147_483_648, MAX_NIGHTLY_CHAIN_DEPTH=30, MAX_STABLE_CHAIN_DEPTH=10, and SIZE_THRESHOLD_RATIO=0.6. OCI tags are <repo>:nightly, <repo>:nightly-<version>, and <repo>:patch-<version>; annotations include from-version=<prev>, sha256-<binaryName>=<hex>, and org.opencontainers.image.title; artifact type is application/vnd.<prefix>.patch.src/commands/issue/list.ts, buildIssueListCollapse() βalways starts with ['filtered','unhandled'],β then conditionally adds 'lifetime' and 'stats'. LIFETIME_FIELDS is new Set(['count','userCount','firstSeen','lastSeen']); human output never collapses lifetime.buildListApiOptions(json, fields) enables collapseLifetime only when json && fields !== undefined && fields.length > 0 && !fields.some(f => LIFETIME_FIELDS.has(f)). The issue detail endpoint retains count, userCount, firstSeen, and lastSeen; only issue-list output may omit them under collapse=lifetime.generateProjectStructure(), route-directory groups βalways follow groupsβ ordering semantics: groups always use the βββ prefix because standalone entries always follow groups. Standalones include manually added help.ts; the last standalone uses βββ, other standalones use βββ; both sections are alphabetically sorted.generate:docs runs exactly 4 scripts in order: 1. generate:parser β script/generate-parser.ts; 2. generate:command-docs β script/generate-command-docs.ts; 3. generate:skill β script/generate-skill.ts; 4. generate:docs-sections β script/generate-docs-sections.ts.node:sqlite is used on Node 22.15+ and node-sqlite3-wasm is the fallback on Node 18.0β22.14. The WASM driver βalways uses spread for bind parameters,β never passes undefined (defensively maps it to null), and uses a manual transaction wrapper. The standalone SEA binary must not contain the WASM driver.script/check-fragments.ts performs Checks 1β4 against actual route names and Check 5 for subcommand coverage. Check 5 accepts a heading outside fenced code or a sentry <route> <subcommand> code reference; bare sentry <route> covers the default command. It warns by default, while --strict turns warnings into errors. Run with pnpm run check:fragments.script/generate-docs-sections.ts injects 13 generated sections into 5 committed files using HTML or MDX GENERATED:START/GENERATED:END markers. --check is a dry run that exits 1 on stale output; extractPnpmVersion and extractNodeVersion throw on mismatch rather than silently falling back.FancyReporter on stderr plus Sentry structured logs through createConsolaReporter. Log level comes from SENTRY_LOG_LEVEL; buildCommand injects hidden --log-level and --verbose; all user-facing output uses consola rather than raw stderr; HandlerContext intentionally omits stderr.SENTRY_CLI_NO_TELEMETRY=1; 2. DO_NOT_TRACK=1; 3. metadata.defaults.telemetry; 4. enabled by default. Shell completions set SENTRY_CLI_NO_TELEMETRY=1 in bin.ts before imports.src/lib/custom-ca.ts prioritizes: 1. stored sentry cli defaults ca-cert; 2. NODE_EXTRA_CA_CERTS. resolve() adds the custom PEM to rootCertificates; tryReadPem() never throws; injectIntoNodeTls() uses tls.setDefaultCACertificates() on Node 24+ and is a no-op on Node 22.TLS_ERROR_PATTERNS includes local issuer, verify first cert, UNABLE_TO_VERIFY_LEAF_SIGNATURE, DEPTH_ZERO_SELF_SIGNED_CERT, and SELF_SIGNED_CERT_IN_CHAIN; it intentionally excludes CERT_HAS_EXPIRED and ERR_TLS_CERT_ALTNAME_INVALID.isSentrySaasUrl(url) is a hostname-only routing/UX check for sentry.io and *.sentry.io, accepting any protocol or port. isSaaSTrustOrigin(url) additionally requires HTTPS and the default port and is used for credential/security decisions.PrepareDifsOptions.maxZipTotalSize defaults to DEFAULT_MAX_ZIP_TOTAL_SIZE = 2GiB, acting as a cumulative uncompressed extraction budget and container cap; it is separate from per-entry maxFileSize. A value of 0 disables the budget.api-schema.json contains only 4 relevant paths: organizations/{org}/preprodartifacts/{artifact_id}/install-details/, organizations/{org}/preprodartifacts/{artifact_id}/size-analysis/, projects/{org}/{project}/preprod/size-analysis/status-check-rules/, and projects/{org}/{project}/preprodartifacts/build-distribution/latest/. A build list command requires a new server endpoint.InkUI.tearDown() follows exactly 6 guarded steps: 1. stop tip rotation; 2. detach SIGINT and call store.setRequestCancel(undefined); 3. instance.clear(); 4. instance.unmount(); 5. restore alternate screen with \x1b[?1049l; 6. call freshStdin.setRawMode(false), .pause(), and .destroy(). Every step is wrapped in try/catch; torndown prevents double unmount; a second Ctrl+C exits with 130.forwardFreshTtyToStdin(deps?) in src/lib/init/stdin-reopen.ts always returns a Disposable; repeated calls return NOOP_HANDLE. If isTTY was undefined, it is backfilled as writable/configurable true; pause and resume are replaced with no-ops to prevent Bun kqueue EINVAL.noParameterProperties rule forbids TypeScript constructor parameter properties in new classes under src/lib/**/*.ts; explicit fields must be declared and assigned in the constructor body.biome check --stdin-file-path=<file> can falsely report βcontents aren't fixed.β Authoritative checks must invoke biome check <file> directly..github/workflows/ci.yml, including NODE_VERSION_22: "22.23.1" and NODE_VERSION_24: "24.18.0"; floating values such as 22.x are disallowed because cached resolutions may miss CVE fixes.renderCompleteDashboardAsSixel uses one complete dashboard sixel canvas rather than individual sixel widgets because a sixel DCS advances the cursor and cannot safely coexist with the character framebuffer. If pixel geometry is unavailable, it returns the complete established character rendering; partial sixel replacement is forbidden.dashboard --sixel must make its opt-in invocation-scoped through the environment registry/context. It must not directly write process.env.SENTRY_DASHBOARD_SIXEL = "1" and CLI mode must not call setEnv().getCurlInstallPaths() must guard a stored installation path with existsSync(dirname(stored.path)); if stale, fall back to a process.execPath starts-with match against KNOWN_CURL_DIRS = ['.local/bin','bin','.sentry/bin'], then default to ~/.sentry/bin. Stored paths must retain priority when valid.