Dashboard › cli › Distillation
2c7eb94a-7cfc-44a9-a248-e7de55c00955["lore_tm_v1_kOYOarBc-3D_VAOMwxtHmfExj1k3PdCR49XviH1mfuk","lore_tm_v1_aTiF6ZNrvDhD1qWFlM1ZtX9g4kZ4SR0V4IQXaBMz8z0","lore_tm_v1_jtMbQO36X8kgr5Cdx7fBpa8dFpOu9TTEQF3-0E6pKao"]
wasm-pack test --node compiles its own JavaScript glue and does not test the published --target web artifact. Required two-layer testing is: 1. wasm_bindgen_test plus wasm-pack test for bulk behavior, 2. an artifact smoke test that runs npm pack, installs into a temporary directory, imports @sentry/symbolic, and asserts the API loads.Object shadowing is #[wasm_bindgen(js_name = "ObjectFile")] plus #[wasm_bindgen(js_class = "ObjectFile")], while retaining the Rust struct name Object.src/lib/scan/ performance/correctness constraints: whole-buffer regex.exec is 12Γ faster per file but approximately 1.6Γ slower across 10,000 files because early exit at maxResults through mapFilesConcurrent.onResult wins; literal prefiltering is a file-level indexOf gate, not per-line verification; per-line verification breaks cross-newline patterns and Unicode length-changing toLowerCase; hasTopLevelAlternation plus skipGroup must call skipCharacterClass; wake-up synchronization must use a latched pendingWake flag rather than let notify=null; await new Promise(r=>notify=r); and mapFilesConcurrent filters null but not [], so no-op files must return null.collectGlob and collectGrep must not forward maxResults to the iterator; they must drain uncapped and set truncated=true.min(8, max(2, availableParallelism())); matches are transferred as Uint32Array quads through postMessage for approximately 40% better performance; new Worker(new URL(...)) hangs in SEA binaries, so workers must use Blob plus URL.createObjectURL; each worker has a FIFO pending queue; ref()/unref() must be idempotent and unref only when inflight reaches 0; workers can be disabled with SENTRY_SCAN_DISABLE_WORKERS=1.rename() is POSIX-only: on Windows, an open destination can cause EPERM or EBUSY. JSDoc must qualify the truncation-race guarantee as βon POSIX systemsβ; the Windows fallback is non-atomic writeFile, and win32-x64 is a shipped target.node_modules symlink can produce an esbuild βHost version X does not match binary version Yβ failure when sibling worktrees differ by branch or lockfile. Fix: remove the symlink and run pnpm install in the worktree root; shared node_modules is safe only when both worktrees use the same branch/lockfile.zstd-sys v2.0.16+ supports wasm32-unknown-unknown through wasm-shim/, mapping malloc/free/memcpy and related C functions to rust_zstd_wasm_shim_* functions backed by Rust allocation. build.rs enables this automatically unless the no_wasm_shim feature is used.zstd-sys require clang, lld, and LLVM (sudo apt-get install -y clang lld llvm on Ubuntu). Both the CI wasm-build job and the build.yml npm-package job that runs make npm must install them; the latter previously installed only binaryen and the wasm32-unknown-unknown Rust target.ruzstd was considered as a pure-Rust zstd alternative but rejected by maintainer Dav1dde because it is significantly slower than zstd-sys.@sentry/symbolic 13.4.0 exported API includes Archive (objects(), peek(), fileFormat, objectCount), ObjectFile (debugId, codeId, arch, fileFormat, hasDebugInfo, hasSources, hasSymbols, hasUnwindInfo, kind, debugSession()), DebugSession (files(), sourceByPath()), SourceBundleWriter (writeObject(), collectIl2cppSources setter, isEmpty), and SourceFileDescriptor (type, contents, url, path, sourceMappingUrl, debugId).@sentry/symbolic 13.4.0 does not expose ObjectLineMapping::from_object, BCSymbolMap parsing, UuidMapping plist parsing, or embedded Portable PDB extraction; these omissions prevent BCSymbolMap and IL2CPP DIF creation without native tooling.@sentry/symbolic release flow to be: 1. check out origin/master in ~/Code/getsentry/symbolic, 2. run cd symbolic-wasm && bash build-npm.sh, which compiles WASM, runs wasm-opt, packs the tarball, and runs a 3-assertion smoke test, 3. temporarily pin the CLI package.json to a local file: tarball and run tests, typecheck, and lint, 4. revert the file: pin before committing and wait for the craft release through getsentry/publish, 5. update package.json to a semver pin only after the version appears on npm.npm view @sentry/symbolic dist-tags.latest; merge does not imply publish, as PR #997 merged June 24 while npm still exposed 13.4.0. A local file: tarball pin must never be committed, and the smoke test must pass 3/3 assertions including βdebug session enumerates referenced source files.βobject.has_sources() reports only embedded sources. Detection of any source must use whether debug_session.files().next().is_none(). The core enumeration sequence is Archive::parse(&data) β archive.objects() β object.debug_session()?.files() β FileEntry.abs_path_str() β debug_session.source_by_path(abs_path) β SourceFileDescriptor; PE files with embedded PDBs additionally require pe.embedded_ppdb().--limit > API_MAX_PER_PAGE (100) must fetch successive pages until the requested count is reached or pagination ends, with perPage = Math.min(flags.limit, API_MAX_PER_PAGE). Required helpers are buildPaginationContextKey, resolveCursor, advancePaginationState, hasPreviousPage, and !!nextCursor; sending larger per_page values is prohibited because the API silently caps them and returns fewer items.buildCommand() with docs.brief, docs.fullDescription, output.human, optional jsonTransform/jsonExclude, parsed flags, and an async-generator func(this: SentryContext, flags). Commands yield new CommandOutput(data) and may return a hint; route aliases are automatic: listβls, viewβshow, deleteβremove/rm, and createβnew.NODE_VERSION_22="22.23.1" and NODE_VERSION_24="24.18.0"; 22.23.0 was vulnerable, with the fix in 22.23.1 through nodejs/node#64004. Each of ci.yml, release.yml, sentry-release.yml, and docs-preview.yml must define both constants in a top-level env: block with rationale and reference them as ${{ env.NODE_VERSION_22 }} or ${{ env.NODE_VERSION_24 }}.["22","24"] for job names, while setup uses ${{ matrix.node == '24' && env.NODE_VERSION_24 || env.NODE_VERSION_22 }}. eval-skill-fork.yml lacks setup-node and must add the step explicitly.NODE_VERSION_20: "20.20.2" as the WASM-SQLite floor, NODE_VERSION_22: "22.23.1", and NODE_VERSION_24: "24.18.0"; the package builds on Node 22 and smoke-tests across the matrix so fallback behavior is exercised.{ [overallSha1]: { name, debug_id?, chunks: string[] } }, matching proguard.ts and dart-symbols.ts; debug_id is advisory because the server reparses it. Each file is chunked as raw bytes through hashBuffer, and selectBundledObject chooses the first object with debug info, falling back to the first object.projects/${org}/${project}/files/difs/assemble/, DEFAULT_MAX_DIF_SIZE=2GB, DEFAULT_MAX_WAIT=300s, and --wait controls polling until assembly completes. ZIP scanning, BCSymbolMap/dsymutil, Xcode derived-data, and IL2CPP mapping are deferred because they require native tooling unavailable in WASM.docs/pnpm-lock.yaml, orphaned when PR #1254 moved docs from docs/ to apps/cli-docs/; Group Bβadd active transitive vulnerability fixes through root package.json pnpm.overrides entries shaped "<pkg>@<range>": "<fixed>", e.g. "shell-quote@<1.9.0": "1.9.0", and verify with pnpm why; Group Cβhandle extra pnpm audit CVEs not reported by Dependabot, such as @ai-sdk/provider-utils@<=3.0.97 LOW CVE-2026-8769, through package upgrades in separate scope.chore/fix-dependabot-alerts-YYYY-MM-DD, label dependencies, and commit message chore: fix N dependabot alerts via pnpm overrides; precedents are PR #1130 and PR #1322.classifySilenced() in error-reporting.ts maps: OutputErrorβ'output_error'; ContextErrorβ'context_missing'; all AuthError reasons (not_authenticated, expired, invalid)β'auth_expected'; ApiError status greater than 400 and less than 500β'api_user_error'; ApiError satisfying isSearchQueryParseError()β'api_query_error'; TypeError satisfying isNetworkError()β'network_error'; otherwise null, meaning captured.recordSilencedError() must be wrapped in try/catch because metric emission must never block error handling.CHANGELOG.md entries under ## Unreleased to always match the bold **Features** style, not ### Features, despite Dangerβs example. Entry format is - WASM: expose \Method()` for <description>. (#NNNN)`; this convention was established by PR #997 and PR #1004.write_object_with_filter_and_provider taking filter F and provider P: Fn(&str) -> Option<impl Read>, with public methods delegating; 2. removal of SharedCursor (Rc<RefCell<Cursor<Vec<u8>>>>) in favor of Cursor::new(Vec::new()) plus into_inner(); 3. non-destructive contents.get(path).map(|v| v.as_slice()) instead of contents.remove(path); 4. tests using unwrap() rather than returning Result; 5. smoke-test.mjs, build-npm.sh wiring, and a ci.yml wasm-smoke job.4d29224558f27174fef90e81d5c7e80fd388249f25cb48cfc4c5eb316e3b067b.symbolic-debuginfo/tests/ not to return Result; use unwrap() so stack traces identify the assertion location. If needed, a module-level alias may be type Result<T, E = Box<dyn std::error::Error>> = std::result::Result<T, E>;, but test bodies should still prefer unwrap().symbolic-wasm/npm/smoke-test.mjs to pack a tarball, install it in a temporary directory, resolve WASM through the exports map, and spawn node --test on package-smoke.test.mjs; that test imports the installed package and uses initSync. Test files are excluded from package.json files[]; build-npm.sh runs the smoke test instead of bare npm pack; ci.yml has a wasm-smoke job; and cd symbolic-wasm/npm && npm test runs the suite.idle.ts, not in centralized evictSession() logic in pipeline.ts. idle.ts imports evictSession as evictGradientSession from @loreai/core, deleteSessionAuth and clearAuthStale from ./auth, deleteSessionCosts from ./cost-tracker, deleteBillingPrefix from ./cch, and clearWarmupAuthDisabled from ./cache-warmer.startIdleScheduler uses onEvict?: (sessionID: string) => void, while the branch uses onEvictSession?: (sessionID: string) => boolean. Upstream pipeline.ts inline eviction cleans five Maps: headerSessionIndex, ltmSessionCache, ltmPinnedText, stableLtmCache, and cwdWarned; merges should adopt the upstream per-function approach and add any missing cleanup calls.pipeline() into createWriteStream() rather than buffering the complete payload, to avoid memory peaks and preserve backpressure.ApiError when rethrowing so classifySilenced() can silence HTTP 401β499 responses. Use new ApiError(msg, error.status, error.detail, error.endpoint) with a terse message because ApiError.format() appends detail and endpoint; wrapping in generic CliError loses status and causes errors such as 403 responses to be captured.field to ValidationError; omitting it collapses unfielded errors into one fingerprint. Fingerprint-rule changes are not retroactive, so new groups must be manually merged into canonical old parents; ApiError fingerprinting keys on api_status + command.extractEmbeddedPpdb), IL2CPP mappings (createIl2cppLineMapping), and source bundles in src/lib/dif/scan.ts and src/lib/dif/index.ts must be caught per object, logged at debug level, and swallowed so they never abort the surrounding scan/upload. PeekResult.format is never 'unknown'; peekHeader returns null for unknown formats. Nested ZIP archives are never recursively scanned, regardless of scanZips.SENSITIVE_ARGV_FLAGS = new Set(['token', 'auth-token']) in src/cli.ts; redactArgv() must replace those values with [REDACTED] before every telemetry call, and raw process.argv must never reach telemetry.src/commands/cli/setup.ts uses bestEffort(stepName, fn) around nonessential post-install actions; failures call warn(stepName, error) and captureException(error, { level: 'warning', tags: { 'setup.step': stepName } }) and must never crash setup. runConfigurationSteps() applies this independently to all 4 steps.$SENTRY_INSTALL_DIR, 2. ~/.local/bin if it exists and is in PATH, 3. ~/bin if it exists and is in PATH, 4. ~/.sentry/bin. The welcome message appears only on fresh installs, not upgrades.symbolic-il2cpp integration tests belong in symbolic-il2cpp/tests/ and use symbolic-testutils = { path = "../symbolic-testutils" } as a dev dependency. Tests should open fixtures through ByteView::open(fixture("...")) and parse real objects through Object::parse(&view)?; a mock ObjectLike unit test was rejected because too many methods would need implementation.from_object_with_provider_empty_without_sources and from_object_with_provider_parses_source_info tests.withTracingSpan from src/lib/telemetry.ts and named-import captureException from @sentry/bun with level: 'warning'. withTracingSpan uses onlyIfParent: true; user-visible fallbacks use log.warn(), not log.debug().trace/list, trace/view, log/view, api.ts, and help.ts bypass telemetry because they import buildCommand directly from @stricli/core rather than ../../lib/command.js.const func = await cmd.loader(); func.call(mockContext, flags, ...args) with mocked stdout, stderr, cwd, and setContext; .call() language-server type warnings caused by the loader union are false positives when tsc --noEmit passes.normalizeSlug replaces _ with - but does not lowercase; Bun mockFetch() replaces globalThis.fetch and should use a unified URL-dispatching mock; mock.module() pollutes the module registry for subsequent files and therefore belongs in test/isolated/ run by test:isolated; Bun.spawn should be replaced by direct property assignment in beforeEach/afterEach.node-sqlite3-wasm bundling must externalize the dependency in build scripts, include the .wasm file in the package.json files list, and supply a locateFile override for WASM path resolution.wizard-runner.ts sends large shared context (dirListing, fileCache, existingSentry) through initialState, not inputData, to avoid the D1 per-row size limit documented in getsentry/cli-init-api#98.wizard-runner.ts uses MAX_RESUME_RETRIES = 3 and RETRY_BACKOFF_MS = [2000, 4000, 8000]; resumeWithRetry() invokes tryRecoverCurrentRunState() when isStepAlreadyAdvancedError() identifies a βwas not suspendedβ HTTP 500.__complete path to silently return no results and exit with code 0 if completion lookup fails; shell completion must never crash or emit an error..lore.md changes to be staged explicitly with git add .lore.md, never git add -A, and committed on the PR branch with a chore message such as chore: update .lore.md (background knowledge compaction). .lore.md must never be stashed; rebase conflicts must be staged one explicit path at a time.typeof api === 'function', especially newer APIs like zlib.zstdCompress, to prevent import-time crashes on older Node versions./home/byk/Code/getsentry/cli-pr-1558 points to /home/byk/Code/getsentry/cli/.git/worktrees/cli-pr-1558; current branch is fix/agent-conversation-reference-root-cause, upstream origin/pr-1558 is gone, and HEAD is bbaa7b3b722b87f1bccfe84063269cbbcabe2741.apps/cli-docs/src/fragments/commands/agent-conversation.md; packages/cli/plugins/sentry-cli/skills/sentry-cli/SKILL.md; references alert.md, cli.md, explore.md, feedback.md, init.md, issue.md, monitor.md, org.md, project.md, release.md, replay.md, repo.md, team.md, trace.md, and trial.md under packages/cli/plugins/sentry-cli/skills/sentry-cli/references/; packages/cli/script/check-fragments.ts; packages/cli/script/generate-command-docs.ts; packages/cli/script/generate-skill-markdown.ts; packages/cli/script/generate-skill.ts; packages/cli/src/commands/agent-conversation/list.ts; packages/cli/src/commands/agent-conversation/view.ts; packages/cli/src/lib/command.ts; packages/cli/src/lib/introspect.ts; packages/cli/src/lib/list-command.ts; packages/cli/src/lib/mutate-command.ts; packages/cli/test/commands/agent-conversation/list.test.ts; packages/cli/test/lib/command.test.ts; packages/cli/test/lib/introspect.property.test.ts; packages/cli/test/lib/introspect.test.ts; and packages/cli/test/script/generate-skill-markdown.test.ts.