You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Review comments addressed:
#1: issue/list.ts FRESH_ALIASES — verified no conflict, only log/list.ts
has f: 'follow' and it doesn't use FRESH_ALIASES
#2: cacheHeuristic 0.1 vs CLEANUP_PROBABILITY — different semantics,
not shared (RFC heuristic vs probabilistic cleanup trigger)
#3: Simplified parallel() — replaced custom wrapper with p-limit's
built-in .map() method (cacheIO.map(items, fn)) at all 3 call sites
#4: evictExcessEntries/deleteExpiredEntries — run both in parallel via
Promise.all() since they operate on disjoint file sets
#5: Added Sentry instrumentation — withCacheSpan() helper in telemetry.ts,
cache.lookup and cache.store spans in response-cache.ts with URL attrs
***SentryAPI: eventsrequireorg+project, issueshavelegacyglobalendpoint**: SentryAPIscoping: Eventsrequireorg+projectinURLpath (\`/projects/{org}/{project}/events/{id}/\`). Issues use legacy global endpoint (\`/api/0/issues/{id}/\`) without org context. Traces need only org (\`/organizations/{org}/trace/{traceId}/\`). Two-step lookup for events: fetch issue → extract org/project from response → fetch event. Cross-project event search possible via Discover endpoint \`/organizations/{org}/events/\` with \`query=id:{eventId}\`.
* **Sentry CLI authenticated fetch architecture with response caching**: \`createAuthenticatedFetch()\` in \`sentry-client.ts\` wraps native \`fetch()\` with auth injection, 30s timeout, retry with backoff (max 2), 401 refresh, and HTTP span tracing. Response caching (src/lib/response-cache.ts) integrates BEFORE auth/retry via \`http-cache-semantics\` (RFC 7234) with filesystem storage at \`~/.sentry/cache/responses/\`. URL-based fallback TTL tiers: immutable (1hr), stable (5min), volatile (60s), no-cache (0). Only GET 2xx cached. \`--fresh\` flag and \`SENTRY\_NO\_CACHE=1\` bypass cache. Cache cleared on login/logout via \`clearAuth()\` → \`clearResponseCache()\`. Corrupted \`CachePolicy\` entries trigger cache miss with best-effort cleanup.
638
+
* **Sentry CLI authenticated fetch architecture with response caching**: \`createAuthenticatedFetch()\` in \`sentry-client.ts\` wraps native \`fetch()\` with auth injection, 30s timeout, retry with backoff (max 2), 401 refresh, and HTTP span tracing. Response caching (src/lib/response-cache.ts) integrates BEFORE auth/retry via \`http-cache-semantics\` (RFC 7234) with filesystem storage at \`~/.sentry/cache/responses/\`. URL-based fallback TTL tiers: immutable (24hr), stable (5min), volatile (60s), no-cache (0). URL patterns stored as \`Record\<TtlTier, RegExp\[]>\`. Only GET 2xx cached. \`--fresh\` flag (with exported \`FRESH\_ALIASES\` constant shared across all 15+ command files) and \`SENTRY\_NO\_CACHE=1\` bypass cache. Cache entries store \`expiresAt\` for O(1) cleanup. All cache I/O parallelized with concurrency limiter (max 8). Cache cleared on login/logout via \`clearAuth()\` → \`clearResponseCache()\`. Corrupted \`CachePolicy\` entries trigger cache miss with best-effort cleanup.
* **Sentry CLI has two distribution channels with different runtimes**: Sentry CLI ships two ways: (1) Standalone binary via \`Bun.build()\` with \`compile: true\`. (2) npm package via esbuild producing CJS \`dist/bin.cjs\` for Node 22+, with Bun API polyfills from \`script/node-polyfills.ts\`. \`Bun.$\` has NO polyfill — use \`execSync\` instead. \`require()\` in ESM is safe (Bun native, esbuild resolves at bundle time).
0 commit comments