Skip to content

fix(cloudflare): Upload built Worker and SPA assets - #1400

Merged
BYK merged 1 commit into
mainfrom
fix/cloudflare-upload-built-assets
Oct 5, 2026
Merged

BYK merged 1 commit into
mainfrom
fix/cloudflare-upload-built-assets

Conversation

@BYK

@BYK BYK commented Oct 4, 2026

Copy link
Copy Markdown
Member

Why

The first exact-version production deployment uploaded source public/ assets instead of Vite's built SPA. That directory has no index.html; candidate root smoke returned 404 before promotion, and the workflow recovered the previous version.

Change

  • Upload using the generated dist/sentry_mcp/wrangler.json Worker config and dist/client assets, checking both exist first.
  • Add a regression for the version-upload inputs and update deployment docs.

Validation

  • pnpm run tsc, pnpm run lint, pnpm run test:ci-projects (28 passed), pnpm --filter @sentry/mcp-cloudflare run test (431 passed), docs/generated checks, and Wrangler dry run passed.
  • Full pnpm run test timed out after ten minutes while the CLI suite was running; exact-head CI will run the full gate.

Co-Authored-By: GPT-6 Sol <agent@openai.com>
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Oct 4, 2026
@BYK
BYK merged commit ecf0896 into main Oct 5, 2026
29 checks passed
@BYK
BYK deleted the fix/cloudflare-upload-built-assets branch October 5, 2026 06:47
mr-danya pushed a commit to mr-danya/sentry-mcp that referenced this pull request Oct 6, 2026
…ons, dataset list (getsentry#1400)

## Documentation Audit Report (2026-08-10)

Weekly automated audit of the Sentry CLI repository comparing
documentation against implementation.

---

## Changes in This PR

### 1. AGENTS.md — Zod → Valibot migration drift (HIGH IMPACT)

PR getsentry#1389 (merged 2026-08-07) removed all remaining Zod usage and
migrated to Valibot. However, AGENTS.md was not updated, leaving AI
agents with incorrect guidance that would produce non-compiling code.

**Fixed:**
- Renamed "Zod Schemas for Validation" → "Valibot Schemas for
Validation"
- Rewrote code examples to use the Valibot API (`object`, `string`,
`optional`, `InferOutput`, `safeParse`)
- Fixed import example from `import { z } from "zod"` → `import {
object, string, optional } from "valibot"`
- Fixed stale import path `../../lib/config.js` → `../../lib/db/auth.js`
for `getAuthToken`
- Updated architecture description ("TypeScript types and Zod schemas" →
"Valibot schemas")
- Updated "No Runtime Dependencies" rule ("redundant Zod schemas" →
"redundant Valibot schemas")

### 2. Version pin examples — 0.40.0 → 0.42.2

The latest release is 0.42.2 (three minor versions ahead of the
documented pin).

**Fixed in:**
- `apps/cli-docs/src/content/docs/getting-started.mdx` —
`SENTRY_VERSION=0.40.0` → `0.42.2`
- `packages/cli/install` — help text and examples updated from `0.40.0`
→ `0.42.2`

### 3. agent-guidance.md — Stale dashboard dataset list

The documented dataset list used internal API names (`tracemetrics`,
`error-events`) instead of user-facing aliases. Also missing
`transactions` alias.

**Fixed:** Updated to show user-facing names: `spans` (default),
`errors`, `transactions`, `metrics`, `issue`, `logs`.

---

## Full Gap Report

### A. Undocumented or missing commands/subcommands

**No gaps.** All commands in `src/commands/` have corresponding doc
fragments in `apps/cli-docs/src/fragments/commands/`. Command docs are
auto-generated from code metadata + fragments, so coverage is inherently
complete. The new `platform` command (getsentry#1366) already has its fragment.

### B. Undocumented flags

**No gaps.** Non-hidden flags are auto-generated into Options tables by
the doc generator (`script/generate-command-docs.ts`). This was verified
by checking the generated output for recent additions.

### C. Missing usage examples

All command groups have bash examples in their fragments. Lower-priority
gaps:
- `sentry help --json` (new in getsentry#1337) has no dedicated example in the
help fragment (only available via `--help`)
- `sentry cli fix` fragment exists but is minimal

### D. Stale descriptions

**No gaps found.** The `brief` strings in code match the generated doc
descriptions.

### E. Missing route mappings in skill generator

**Not applicable.** `ROUTE_TO_REFERENCE` was removed in favor of
automatic 1:1 mapping via `groupRoutesByReference()`. All routes are
automatically covered.

### F. Installation / distribution gaps

| Gap | Source | Doc |
|-----|--------|-----|
| Install script `--no-modify-path` / `--no-completions` flags |
`packages/cli/install` | Not in `getting-started.mdx` (available via
`--help`) |
| Two install URLs coexist: `cli.sentry.dev/install` vs
`sentry.io/get-cli/` | redirect config | Not documented (redirect is
transparent) |
| **Version pin examples stale (0.40.0)** | install script,
getting-started.mdx | **Fixed in this PR** |

### G. Undocumented environment variables

**No gaps.** `configuration.md` is generated from
`src/lib/env-registry.ts`, which is the single source of truth.
Internal-only variables (`SENTRY_PIPELINE`, `SENTRY_MONITOR_SLUG`, etc.)
are intentionally excluded.

### H. Auth / self-hosted gaps

**No new gaps.** Self-hosted docs (26.1.0+ OAuth requirement,
`SENTRY_CLIENT_ID`, trust anchors) are accurate. The new `sentry auth`
smart default (login when logged out, status when logged in, PR getsentry#1380)
is already documented in the auth fragment.

### I. Plugin/skills gaps

Low-priority items (unchanged from prior audit):
- `agent-skills.ts` only installs to `.claude` and `.agents` directories
— other detected agents (Windsurf, Copilot, etc.) are detected for
telemetry only, not skill installation
- This is technically accurate in `agentic-usage.md` ("Skills are also
refreshed... skill files are embedded in the binary") but could be
clearer about which agents get auto-installed skills vs. which are only
detected

### J. README / DEVELOPMENT.md drift

| Gap | Source | Doc |
|-----|--------|-----|
| **AGENTS.md references Zod throughout** | `src/types/` uses Valibot
after getsentry#1389 | **Fixed in this PR** |
| AGENTS.md import example uses stale path `lib/config.js` |
`getAuthToken` is in `lib/db/auth.js` | **Fixed in this PR** |

---

## Top 5 Most Impactful Fixes (Prioritized)

1. **✅ AGENTS.md Zod → Valibot** — AI agents will write non-compiling
code using `import { z } from "zod"` because AGENTS.md instructs them
to. This causes immediate build failures for any AI-assisted
contribution.

2. **✅ Version pin examples** — Users following the install docs will
pin to a version 3 releases behind, potentially missing security fixes
and new features.

3. **✅ Dashboard dataset aliases** — Agents using the documented
`tracemetrics` or `error-events` names work, but the user-facing aliases
(`metrics`, `errors`) are more discoverable and match `--help` output.

4. **Low priority: `--no-modify-path` / `--no-completions` installer
flags** — Power users in CI/Docker may want these, but they're available
via `--help` on the script itself.

5. **Low priority: Skill install target clarification** — Only `.claude`
and `.agents` get auto-installed skills; other agents are detected for
telemetry only. This is technically correct in the docs but could be
made more explicit.

<div><a
href="https://cursor.com/agents/bc-e1379371-9ad9-4d53-8665-bb60c5e961e0?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/automations/8b0c0f35-da5e-409d-984c-5e39518ffb8a"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/view-automation-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/view-automation-light.png"><img
alt="View Automation" width="141" height="28"
src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mr-danya pushed a commit to mr-danya/sentry-mcp that referenced this pull request Oct 6, 2026
…ons, dataset list (getsentry#1400)

## Documentation Audit Report (2026-08-10)

Weekly automated audit of the Sentry CLI repository comparing
documentation against implementation.

---

## Changes in This PR

### 1. AGENTS.md — Zod → Valibot migration drift (HIGH IMPACT)

PR getsentry#1389 (merged 2026-08-07) removed all remaining Zod usage and
migrated to Valibot. However, AGENTS.md was not updated, leaving AI
agents with incorrect guidance that would produce non-compiling code.

**Fixed:**
- Renamed "Zod Schemas for Validation" → "Valibot Schemas for
Validation"
- Rewrote code examples to use the Valibot API (`object`, `string`,
`optional`, `InferOutput`, `safeParse`)
- Fixed import example from `import { z } from "zod"` → `import {
object, string, optional } from "valibot"`
- Fixed stale import path `../../lib/config.js` → `../../lib/db/auth.js`
for `getAuthToken`
- Updated architecture description ("TypeScript types and Zod schemas" →
"Valibot schemas")
- Updated "No Runtime Dependencies" rule ("redundant Zod schemas" →
"redundant Valibot schemas")

### 2. Version pin examples — 0.40.0 → 0.42.2

The latest release is 0.42.2 (three minor versions ahead of the
documented pin).

**Fixed in:**
- `apps/cli-docs/src/content/docs/getting-started.mdx` —
`SENTRY_VERSION=0.40.0` → `0.42.2`
- `packages/cli/install` — help text and examples updated from `0.40.0`
→ `0.42.2`

### 3. agent-guidance.md — Stale dashboard dataset list

The documented dataset list used internal API names (`tracemetrics`,
`error-events`) instead of user-facing aliases. Also missing
`transactions` alias.

**Fixed:** Updated to show user-facing names: `spans` (default),
`errors`, `transactions`, `metrics`, `issue`, `logs`.

---

## Full Gap Report

### A. Undocumented or missing commands/subcommands

**No gaps.** All commands in `src/commands/` have corresponding doc
fragments in `apps/cli-docs/src/fragments/commands/`. Command docs are
auto-generated from code metadata + fragments, so coverage is inherently
complete. The new `platform` command (getsentry#1366) already has its fragment.

### B. Undocumented flags

**No gaps.** Non-hidden flags are auto-generated into Options tables by
the doc generator (`script/generate-command-docs.ts`). This was verified
by checking the generated output for recent additions.

### C. Missing usage examples

All command groups have bash examples in their fragments. Lower-priority
gaps:
- `sentry help --json` (new in getsentry#1337) has no dedicated example in the
help fragment (only available via `--help`)
- `sentry cli fix` fragment exists but is minimal

### D. Stale descriptions

**No gaps found.** The `brief` strings in code match the generated doc
descriptions.

### E. Missing route mappings in skill generator

**Not applicable.** `ROUTE_TO_REFERENCE` was removed in favor of
automatic 1:1 mapping via `groupRoutesByReference()`. All routes are
automatically covered.

### F. Installation / distribution gaps

| Gap | Source | Doc |
|-----|--------|-----|
| Install script `--no-modify-path` / `--no-completions` flags |
`packages/cli/install` | Not in `getting-started.mdx` (available via
`--help`) |
| Two install URLs coexist: `cli.sentry.dev/install` vs
`sentry.io/get-cli/` | redirect config | Not documented (redirect is
transparent) |
| **Version pin examples stale (0.40.0)** | install script,
getting-started.mdx | **Fixed in this PR** |

### G. Undocumented environment variables

**No gaps.** `configuration.md` is generated from
`src/lib/env-registry.ts`, which is the single source of truth.
Internal-only variables (`SENTRY_PIPELINE`, `SENTRY_MONITOR_SLUG`, etc.)
are intentionally excluded.

### H. Auth / self-hosted gaps

**No new gaps.** Self-hosted docs (26.1.0+ OAuth requirement,
`SENTRY_CLIENT_ID`, trust anchors) are accurate. The new `sentry auth`
smart default (login when logged out, status when logged in, PR getsentry#1380)
is already documented in the auth fragment.

### I. Plugin/skills gaps

Low-priority items (unchanged from prior audit):
- `agent-skills.ts` only installs to `.claude` and `.agents` directories
— other detected agents (Windsurf, Copilot, etc.) are detected for
telemetry only, not skill installation
- This is technically accurate in `agentic-usage.md` ("Skills are also
refreshed... skill files are embedded in the binary") but could be
clearer about which agents get auto-installed skills vs. which are only
detected

### J. README / DEVELOPMENT.md drift

| Gap | Source | Doc |
|-----|--------|-----|
| **AGENTS.md references Zod throughout** | `src/types/` uses Valibot
after getsentry#1389 | **Fixed in this PR** |
| AGENTS.md import example uses stale path `lib/config.js` |
`getAuthToken` is in `lib/db/auth.js` | **Fixed in this PR** |

---

## Top 5 Most Impactful Fixes (Prioritized)

1. **✅ AGENTS.md Zod → Valibot** — AI agents will write non-compiling
code using `import { z } from "zod"` because AGENTS.md instructs them
to. This causes immediate build failures for any AI-assisted
contribution.

2. **✅ Version pin examples** — Users following the install docs will
pin to a version 3 releases behind, potentially missing security fixes
and new features.

3. **✅ Dashboard dataset aliases** — Agents using the documented
`tracemetrics` or `error-events` names work, but the user-facing aliases
(`metrics`, `errors`) are more discoverable and match `--help` output.

4. **Low priority: `--no-modify-path` / `--no-completions` installer
flags** — Power users in CI/Docker may want these, but they're available
via `--help` on the script itself.

5. **Low priority: Skill install target clarification** — Only `.claude`
and `.agents` get auto-installed skills; other agents are detected for
telemetry only. This is technically correct in the docs but could be
made more explicit.

<div><a
href="https://cursor.com/agents/bc-e1379371-9ad9-4d53-8665-bb60c5e961e0?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/automations/8b0c0f35-da5e-409d-984c-5e39518ffb8a"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/view-automation-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/view-automation-light.png"><img
alt="View Automation" width="141" height="28"
src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mr-danya pushed a commit to mr-danya/sentry-mcp that referenced this pull request Oct 6, 2026
…ons, dataset list (getsentry#1400)

## Documentation Audit Report (2026-08-10)

Weekly automated audit of the Sentry CLI repository comparing
documentation against implementation.

---

## Changes in This PR

### 1. AGENTS.md — Zod → Valibot migration drift (HIGH IMPACT)

PR getsentry#1389 (merged 2026-08-07) removed all remaining Zod usage and
migrated to Valibot. However, AGENTS.md was not updated, leaving AI
agents with incorrect guidance that would produce non-compiling code.

**Fixed:**
- Renamed "Zod Schemas for Validation" → "Valibot Schemas for
Validation"
- Rewrote code examples to use the Valibot API (`object`, `string`,
`optional`, `InferOutput`, `safeParse`)
- Fixed import example from `import { z } from "zod"` → `import {
object, string, optional } from "valibot"`
- Fixed stale import path `../../lib/config.js` → `../../lib/db/auth.js`
for `getAuthToken`
- Updated architecture description ("TypeScript types and Zod schemas" →
"Valibot schemas")
- Updated "No Runtime Dependencies" rule ("redundant Zod schemas" →
"redundant Valibot schemas")

### 2. Version pin examples — 0.40.0 → 0.42.2

The latest release is 0.42.2 (three minor versions ahead of the
documented pin).

**Fixed in:**
- `apps/cli-docs/src/content/docs/getting-started.mdx` —
`SENTRY_VERSION=0.40.0` → `0.42.2`
- `packages/cli/install` — help text and examples updated from `0.40.0`
→ `0.42.2`

### 3. agent-guidance.md — Stale dashboard dataset list

The documented dataset list used internal API names (`tracemetrics`,
`error-events`) instead of user-facing aliases. Also missing
`transactions` alias.

**Fixed:** Updated to show user-facing names: `spans` (default),
`errors`, `transactions`, `metrics`, `issue`, `logs`.

---

## Full Gap Report

### A. Undocumented or missing commands/subcommands

**No gaps.** All commands in `src/commands/` have corresponding doc
fragments in `apps/cli-docs/src/fragments/commands/`. Command docs are
auto-generated from code metadata + fragments, so coverage is inherently
complete. The new `platform` command (getsentry#1366) already has its fragment.

### B. Undocumented flags

**No gaps.** Non-hidden flags are auto-generated into Options tables by
the doc generator (`script/generate-command-docs.ts`). This was verified
by checking the generated output for recent additions.

### C. Missing usage examples

All command groups have bash examples in their fragments. Lower-priority
gaps:
- `sentry help --json` (new in getsentry#1337) has no dedicated example in the
help fragment (only available via `--help`)
- `sentry cli fix` fragment exists but is minimal

### D. Stale descriptions

**No gaps found.** The `brief` strings in code match the generated doc
descriptions.

### E. Missing route mappings in skill generator

**Not applicable.** `ROUTE_TO_REFERENCE` was removed in favor of
automatic 1:1 mapping via `groupRoutesByReference()`. All routes are
automatically covered.

### F. Installation / distribution gaps

| Gap | Source | Doc |
|-----|--------|-----|
| Install script `--no-modify-path` / `--no-completions` flags |
`packages/cli/install` | Not in `getting-started.mdx` (available via
`--help`) |
| Two install URLs coexist: `cli.sentry.dev/install` vs
`sentry.io/get-cli/` | redirect config | Not documented (redirect is
transparent) |
| **Version pin examples stale (0.40.0)** | install script,
getting-started.mdx | **Fixed in this PR** |

### G. Undocumented environment variables

**No gaps.** `configuration.md` is generated from
`src/lib/env-registry.ts`, which is the single source of truth.
Internal-only variables (`SENTRY_PIPELINE`, `SENTRY_MONITOR_SLUG`, etc.)
are intentionally excluded.

### H. Auth / self-hosted gaps

**No new gaps.** Self-hosted docs (26.1.0+ OAuth requirement,
`SENTRY_CLIENT_ID`, trust anchors) are accurate. The new `sentry auth`
smart default (login when logged out, status when logged in, PR getsentry#1380)
is already documented in the auth fragment.

### I. Plugin/skills gaps

Low-priority items (unchanged from prior audit):
- `agent-skills.ts` only installs to `.claude` and `.agents` directories
— other detected agents (Windsurf, Copilot, etc.) are detected for
telemetry only, not skill installation
- This is technically accurate in `agentic-usage.md` ("Skills are also
refreshed... skill files are embedded in the binary") but could be
clearer about which agents get auto-installed skills vs. which are only
detected

### J. README / DEVELOPMENT.md drift

| Gap | Source | Doc |
|-----|--------|-----|
| **AGENTS.md references Zod throughout** | `src/types/` uses Valibot
after getsentry#1389 | **Fixed in this PR** |
| AGENTS.md import example uses stale path `lib/config.js` |
`getAuthToken` is in `lib/db/auth.js` | **Fixed in this PR** |

---

## Top 5 Most Impactful Fixes (Prioritized)

1. **✅ AGENTS.md Zod → Valibot** — AI agents will write non-compiling
code using `import { z } from "zod"` because AGENTS.md instructs them
to. This causes immediate build failures for any AI-assisted
contribution.

2. **✅ Version pin examples** — Users following the install docs will
pin to a version 3 releases behind, potentially missing security fixes
and new features.

3. **✅ Dashboard dataset aliases** — Agents using the documented
`tracemetrics` or `error-events` names work, but the user-facing aliases
(`metrics`, `errors`) are more discoverable and match `--help` output.

4. **Low priority: `--no-modify-path` / `--no-completions` installer
flags** — Power users in CI/Docker may want these, but they're available
via `--help` on the script itself.

5. **Low priority: Skill install target clarification** — Only `.claude`
and `.agents` get auto-installed skills; other agents are detected for
telemetry only. This is technically correct in the docs but could be
made more explicit.

<div><a
href="https://cursor.com/agents/bc-e1379371-9ad9-4d53-8665-bb60c5e961e0?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/automations/8b0c0f35-da5e-409d-984c-5e39518ffb8a"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/view-automation-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/view-automation-light.png"><img
alt="View Automation" width="141" height="28"
src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mr-danya pushed a commit to mr-danya/sentry-mcp that referenced this pull request Oct 6, 2026
…ons, dataset list (getsentry#1400)

## Documentation Audit Report (2026-08-10)

Weekly automated audit of the Sentry CLI repository comparing
documentation against implementation.

---

## Changes in This PR

### 1. AGENTS.md — Zod → Valibot migration drift (HIGH IMPACT)

PR getsentry#1389 (merged 2026-08-07) removed all remaining Zod usage and
migrated to Valibot. However, AGENTS.md was not updated, leaving AI
agents with incorrect guidance that would produce non-compiling code.

**Fixed:**
- Renamed "Zod Schemas for Validation" → "Valibot Schemas for
Validation"
- Rewrote code examples to use the Valibot API (`object`, `string`,
`optional`, `InferOutput`, `safeParse`)
- Fixed import example from `import { z } from "zod"` → `import {
object, string, optional } from "valibot"`
- Fixed stale import path `../../lib/config.js` → `../../lib/db/auth.js`
for `getAuthToken`
- Updated architecture description ("TypeScript types and Zod schemas" →
"Valibot schemas")
- Updated "No Runtime Dependencies" rule ("redundant Zod schemas" →
"redundant Valibot schemas")

### 2. Version pin examples — 0.40.0 → 0.42.2

The latest release is 0.42.2 (three minor versions ahead of the
documented pin).

**Fixed in:**
- `apps/cli-docs/src/content/docs/getting-started.mdx` —
`SENTRY_VERSION=0.40.0` → `0.42.2`
- `packages/cli/install` — help text and examples updated from `0.40.0`
→ `0.42.2`

### 3. agent-guidance.md — Stale dashboard dataset list

The documented dataset list used internal API names (`tracemetrics`,
`error-events`) instead of user-facing aliases. Also missing
`transactions` alias.

**Fixed:** Updated to show user-facing names: `spans` (default),
`errors`, `transactions`, `metrics`, `issue`, `logs`.

---

## Full Gap Report

### A. Undocumented or missing commands/subcommands

**No gaps.** All commands in `src/commands/` have corresponding doc
fragments in `apps/cli-docs/src/fragments/commands/`. Command docs are
auto-generated from code metadata + fragments, so coverage is inherently
complete. The new `platform` command (getsentry#1366) already has its fragment.

### B. Undocumented flags

**No gaps.** Non-hidden flags are auto-generated into Options tables by
the doc generator (`script/generate-command-docs.ts`). This was verified
by checking the generated output for recent additions.

### C. Missing usage examples

All command groups have bash examples in their fragments. Lower-priority
gaps:
- `sentry help --json` (new in getsentry#1337) has no dedicated example in the
help fragment (only available via `--help`)
- `sentry cli fix` fragment exists but is minimal

### D. Stale descriptions

**No gaps found.** The `brief` strings in code match the generated doc
descriptions.

### E. Missing route mappings in skill generator

**Not applicable.** `ROUTE_TO_REFERENCE` was removed in favor of
automatic 1:1 mapping via `groupRoutesByReference()`. All routes are
automatically covered.

### F. Installation / distribution gaps

| Gap | Source | Doc |
|-----|--------|-----|
| Install script `--no-modify-path` / `--no-completions` flags |
`packages/cli/install` | Not in `getting-started.mdx` (available via
`--help`) |
| Two install URLs coexist: `cli.sentry.dev/install` vs
`sentry.io/get-cli/` | redirect config | Not documented (redirect is
transparent) |
| **Version pin examples stale (0.40.0)** | install script,
getting-started.mdx | **Fixed in this PR** |

### G. Undocumented environment variables

**No gaps.** `configuration.md` is generated from
`src/lib/env-registry.ts`, which is the single source of truth.
Internal-only variables (`SENTRY_PIPELINE`, `SENTRY_MONITOR_SLUG`, etc.)
are intentionally excluded.

### H. Auth / self-hosted gaps

**No new gaps.** Self-hosted docs (26.1.0+ OAuth requirement,
`SENTRY_CLIENT_ID`, trust anchors) are accurate. The new `sentry auth`
smart default (login when logged out, status when logged in, PR getsentry#1380)
is already documented in the auth fragment.

### I. Plugin/skills gaps

Low-priority items (unchanged from prior audit):
- `agent-skills.ts` only installs to `.claude` and `.agents` directories
— other detected agents (Windsurf, Copilot, etc.) are detected for
telemetry only, not skill installation
- This is technically accurate in `agentic-usage.md` ("Skills are also
refreshed... skill files are embedded in the binary") but could be
clearer about which agents get auto-installed skills vs. which are only
detected

### J. README / DEVELOPMENT.md drift

| Gap | Source | Doc |
|-----|--------|-----|
| **AGENTS.md references Zod throughout** | `src/types/` uses Valibot
after getsentry#1389 | **Fixed in this PR** |
| AGENTS.md import example uses stale path `lib/config.js` |
`getAuthToken` is in `lib/db/auth.js` | **Fixed in this PR** |

---

## Top 5 Most Impactful Fixes (Prioritized)

1. **✅ AGENTS.md Zod → Valibot** — AI agents will write non-compiling
code using `import { z } from "zod"` because AGENTS.md instructs them
to. This causes immediate build failures for any AI-assisted
contribution.

2. **✅ Version pin examples** — Users following the install docs will
pin to a version 3 releases behind, potentially missing security fixes
and new features.

3. **✅ Dashboard dataset aliases** — Agents using the documented
`tracemetrics` or `error-events` names work, but the user-facing aliases
(`metrics`, `errors`) are more discoverable and match `--help` output.

4. **Low priority: `--no-modify-path` / `--no-completions` installer
flags** — Power users in CI/Docker may want these, but they're available
via `--help` on the script itself.

5. **Low priority: Skill install target clarification** — Only `.claude`
and `.agents` get auto-installed skills; other agents are detected for
telemetry only. This is technically correct in the docs but could be
made more explicit.

<div><a
href="https://cursor.com/agents/bc-e1379371-9ad9-4d53-8665-bb60c5e961e0?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/automations/8b0c0f35-da5e-409d-984c-5e39518ffb8a"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/view-automation-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/view-automation-light.png"><img
alt="View Automation" width="141" height="28"
src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mr-danya pushed a commit to mr-danya/sentry-mcp that referenced this pull request Oct 6, 2026
…missing env vars, new commands (#1461)

## Documentation Audit Report (2026-08-24)

Weekly automated audit comparing the CLI implementation against its
documentation. Changes since the last merged audit (PR getsentry#1400,
2026-08-11) include: the `sentry cli completion` command (getsentry#1427), sixel
dashboard rendering (getsentry#1410), the `--environment` explore fix (getsentry#1442),
and the 0.43.0 release.

---

## Findings & Fixes

### A. Undocumented or missing commands/subcommands

| Command | Source | Expected doc location | Status |
|---------|--------|----------------------|--------|
| `sentry cli completion` | `src/commands/cli/completion.ts` (added in
getsentry#1427) | `apps/cli-docs/src/fragments/commands/cli.md` | **Fixed** —
added examples for bash, zsh, fish |

All other commands in `src/commands/` have corresponding fragment files.
Hidden backward-compat aliases (`send-event`, `send-envelope`,
`bash-hook`, `whoami`, plural aliases) are correctly excluded from docs.

### B. Undocumented flags

| Flag | Command | Source | Doc file | Status |
|------|---------|--------|----------|--------|
| `--sixel` / `-s` | `sentry dashboard view` |
`src/commands/dashboard/view.ts` | `fragments/commands/dashboard.md` |
**Fixed** — added example |

All other non-hidden flags are auto-generated into the command docs via
`generate-command-docs.ts`.

### C. Missing usage examples

No new gaps. The `sentry cli completion` command was the only command
without examples, now fixed.

### D. Stale descriptions

| Command/Flag | Code brief | Doc description | Status |
|-------------|-----------|-----------------|--------|
| `sentry explore --environment` | Was: "Replay environment filter for
--dataset replays" | Now works for all datasets (fixed in getsentry#1442) |
**Fixed** — updated brief to "Environment filter" |

### E. Missing route mappings in skill generator

**N/A** — `ROUTE_TO_REFERENCE` was removed and replaced with automatic
1:1 route-to-reference mapping via `groupRoutesByReference()` in
`script/generate-skill.ts`. No manual mapping to go stale.

### F. Installation / distribution gaps

No new gaps. Install script flags (`--no-modify-path`,
`--no-completions`, `--no-agent-skills`) and env vars
(`SENTRY_INSTALL_DIR`, `SENTRY_VERSION`, `SENTRY_INIT`) are documented
in `getting-started.mdx`. Platform support table matches `.craft.yml`
targets (macOS x64/arm64, Linux x64/arm64, Windows x64).

### G. Undocumented environment variables

| Variable | Referenced in | Expected doc | Status |
|----------|-------------|-------------|--------|
| `DO_NOT_TRACK` | `src/lib/telemetry.ts` | `configuration.md`
(generated from env-registry) | **Fixed** — added to env-registry.ts |
| `SENTRY_PIPELINE` | `src/commands/build/upload.ts`,
`src/lib/build/index.ts` | `configuration.md` | **Fixed** — added to
env-registry.ts |

Remaining niche/internal vars NOT added (intentionally excluded from
user-facing docs):
- `SENTRY_ENVIRONMENT` — bash-hook template only
- `SENTRY_CLI_NO_EXIT_TRAP` — bash-hook template internal
- `SENTRY_SCAN_DISABLE_WORKERS` — internal performance tuning
- `SENTRY_CLI_INTEGRATION_TEST_VERSION_OVERRIDE` — test-only
- `SENTRY_RN_*` — internal react-native wrapper vars
- `SENTRY_TRACES_SAMPLE_RATE` — inherited from SDK, not a CLI config

### H. Auth / self-hosted gaps

No new gaps. OAuth scopes in `self-hosted.md` and `DEVELOPMENT.md` are
auto-generated (`GENERATED:START oauth-scopes`). The `--url` flag for
`auth login` and `SENTRY_HOST`/`SENTRY_URL` behavior are documented.
Token priority (OAuth > env token unless `SENTRY_FORCE_ENV_TOKEN`) is
correct.

### I. Plugin/skills gaps

No new gaps since the last audit. Skills install to `~/.claude` and
`~/.agents` only. The `agentic-usage.md` correctly states this.
Detection of other agents (Cursor, Windsurf, Copilot, etc.) is for
telemetry and the docs correctly list them as "supported" agents (they
can use the CLI, just not via auto-installed skills).

### J. README / DEVELOPMENT.md / contributing.md drift

| File | Claim | Reality | Status |
|------|-------|---------|--------|
| `script/generate-docs-sections.ts` line 210 | "TypeScript types and
Zod schemas" | Migrated to Valibot in getsentry#1389 (merged Aug 7) | **Fixed** |
| `apps/cli-docs/src/content/docs/features.md` | DSN detection table
lists 6 languages with specific `Sentry.init()` patterns | Scanner uses
a universal DSN URL regex across 30+ file extensions | **Fixed** —
updated table to match actual TEXT_EXTENSIONS set |

Node.js version claims (v22.15+ for dev, >=20 for runtime) are correct.
Build commands, test commands, and license (`FSL-1.1-Apache-2.0`) are
all accurate.

---

## Top 5 Most Impactful Fixes (prioritized)

1. **DSN detection language table overhaul** (`features.md`) — The
previous table implied language-specific `Sentry.init()` pattern
matching, which is misleading. The universal regex approach supports 30+
file extensions. Users of Kotlin, Rust, Swift, Dart, C#, etc. would not
have known their DSNs are detected.

2. **Missing `sentry cli completion` docs** (`cli.md` fragment) — New
command from getsentry#1427 with no usage examples. Users discovering shell
completions would miss this standalone alternative to `sentry cli
setup`.

3. **Stale `--environment` flag brief** (`explore.ts`) — After getsentry#1442
fixed `--environment` to work for all datasets, the flag's `brief`
string still said "Replay environment filter". Users would think it only
applies to replays.

4. **Missing env vars in registry** (`env-registry.ts`) — `DO_NOT_TRACK`
(industry-standard telemetry opt-out) and `SENTRY_PIPELINE` (build
plugin identification) were referenced in code but absent from the
generated configuration page.

5. **Zod→Valibot drift in project structure**
(`generate-docs-sections.ts`) — The auto-generated project structure
tree in `contributing.md` still said "Zod schemas" despite the migration
to Valibot in getsentry#1389. Contributors would be confused about which
validation library to use.

<div><a
href="https://cursor.com/agents/bc-2961de96-bee8-48d4-becb-d403a42a7cb6?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/automations/8b0c0f35-da5e-409d-984c-5e39518ffb8a"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/view-automation-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/view-automation-light.png"><img
alt="View Automation" width="141" height="28"
src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
mr-danya pushed a commit to mr-danya/sentry-mcp that referenced this pull request Oct 6, 2026
…missing env vars, new commands (#1461)

## Documentation Audit Report (2026-08-24)

Weekly automated audit comparing the CLI implementation against its
documentation. Changes since the last merged audit (PR getsentry#1400,
2026-08-11) include: the `sentry cli completion` command (getsentry#1427), sixel
dashboard rendering (getsentry#1410), the `--environment` explore fix (getsentry#1442),
and the 0.43.0 release.

---

## Findings & Fixes

### A. Undocumented or missing commands/subcommands

| Command | Source | Expected doc location | Status |
|---------|--------|----------------------|--------|
| `sentry cli completion` | `src/commands/cli/completion.ts` (added in
getsentry#1427) | `apps/cli-docs/src/fragments/commands/cli.md` | **Fixed** —
added examples for bash, zsh, fish |

All other commands in `src/commands/` have corresponding fragment files.
Hidden backward-compat aliases (`send-event`, `send-envelope`,
`bash-hook`, `whoami`, plural aliases) are correctly excluded from docs.

### B. Undocumented flags

| Flag | Command | Source | Doc file | Status |
|------|---------|--------|----------|--------|
| `--sixel` / `-s` | `sentry dashboard view` |
`src/commands/dashboard/view.ts` | `fragments/commands/dashboard.md` |
**Fixed** — added example |

All other non-hidden flags are auto-generated into the command docs via
`generate-command-docs.ts`.

### C. Missing usage examples

No new gaps. The `sentry cli completion` command was the only command
without examples, now fixed.

### D. Stale descriptions

| Command/Flag | Code brief | Doc description | Status |
|-------------|-----------|-----------------|--------|
| `sentry explore --environment` | Was: "Replay environment filter for
--dataset replays" | Now works for all datasets (fixed in getsentry#1442) |
**Fixed** — updated brief to "Environment filter" |

### E. Missing route mappings in skill generator

**N/A** — `ROUTE_TO_REFERENCE` was removed and replaced with automatic
1:1 route-to-reference mapping via `groupRoutesByReference()` in
`script/generate-skill.ts`. No manual mapping to go stale.

### F. Installation / distribution gaps

No new gaps. Install script flags (`--no-modify-path`,
`--no-completions`, `--no-agent-skills`) and env vars
(`SENTRY_INSTALL_DIR`, `SENTRY_VERSION`, `SENTRY_INIT`) are documented
in `getting-started.mdx`. Platform support table matches `.craft.yml`
targets (macOS x64/arm64, Linux x64/arm64, Windows x64).

### G. Undocumented environment variables

| Variable | Referenced in | Expected doc | Status |
|----------|-------------|-------------|--------|
| `DO_NOT_TRACK` | `src/lib/telemetry.ts` | `configuration.md`
(generated from env-registry) | **Fixed** — added to env-registry.ts |
| `SENTRY_PIPELINE` | `src/commands/build/upload.ts`,
`src/lib/build/index.ts` | `configuration.md` | **Fixed** — added to
env-registry.ts |

Remaining niche/internal vars NOT added (intentionally excluded from
user-facing docs):
- `SENTRY_ENVIRONMENT` — bash-hook template only
- `SENTRY_CLI_NO_EXIT_TRAP` — bash-hook template internal
- `SENTRY_SCAN_DISABLE_WORKERS` — internal performance tuning
- `SENTRY_CLI_INTEGRATION_TEST_VERSION_OVERRIDE` — test-only
- `SENTRY_RN_*` — internal react-native wrapper vars
- `SENTRY_TRACES_SAMPLE_RATE` — inherited from SDK, not a CLI config

### H. Auth / self-hosted gaps

No new gaps. OAuth scopes in `self-hosted.md` and `DEVELOPMENT.md` are
auto-generated (`GENERATED:START oauth-scopes`). The `--url` flag for
`auth login` and `SENTRY_HOST`/`SENTRY_URL` behavior are documented.
Token priority (OAuth > env token unless `SENTRY_FORCE_ENV_TOKEN`) is
correct.

### I. Plugin/skills gaps

No new gaps since the last audit. Skills install to `~/.claude` and
`~/.agents` only. The `agentic-usage.md` correctly states this.
Detection of other agents (Cursor, Windsurf, Copilot, etc.) is for
telemetry and the docs correctly list them as "supported" agents (they
can use the CLI, just not via auto-installed skills).

### J. README / DEVELOPMENT.md / contributing.md drift

| File | Claim | Reality | Status |
|------|-------|---------|--------|
| `script/generate-docs-sections.ts` line 210 | "TypeScript types and
Zod schemas" | Migrated to Valibot in getsentry#1389 (merged Aug 7) | **Fixed** |
| `apps/cli-docs/src/content/docs/features.md` | DSN detection table
lists 6 languages with specific `Sentry.init()` patterns | Scanner uses
a universal DSN URL regex across 30+ file extensions | **Fixed** —
updated table to match actual TEXT_EXTENSIONS set |

Node.js version claims (v22.15+ for dev, >=20 for runtime) are correct.
Build commands, test commands, and license (`FSL-1.1-Apache-2.0`) are
all accurate.

---

## Top 5 Most Impactful Fixes (prioritized)

1. **DSN detection language table overhaul** (`features.md`) — The
previous table implied language-specific `Sentry.init()` pattern
matching, which is misleading. The universal regex approach supports 30+
file extensions. Users of Kotlin, Rust, Swift, Dart, C#, etc. would not
have known their DSNs are detected.

2. **Missing `sentry cli completion` docs** (`cli.md` fragment) — New
command from getsentry#1427 with no usage examples. Users discovering shell
completions would miss this standalone alternative to `sentry cli
setup`.

3. **Stale `--environment` flag brief** (`explore.ts`) — After getsentry#1442
fixed `--environment` to work for all datasets, the flag's `brief`
string still said "Replay environment filter". Users would think it only
applies to replays.

4. **Missing env vars in registry** (`env-registry.ts`) — `DO_NOT_TRACK`
(industry-standard telemetry opt-out) and `SENTRY_PIPELINE` (build
plugin identification) were referenced in code but absent from the
generated configuration page.

5. **Zod→Valibot drift in project structure**
(`generate-docs-sections.ts`) — The auto-generated project structure
tree in `contributing.md` still said "Zod schemas" despite the migration
to Valibot in getsentry#1389. Contributors would be confused about which
validation library to use.

<div><a
href="https://cursor.com/agents/bc-2961de96-bee8-48d4-becb-d403a42a7cb6?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/automations/8b0c0f35-da5e-409d-984c-5e39518ffb8a"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/view-automation-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/view-automation-light.png"><img
alt="View Automation" width="141" height="28"
src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
mr-danya pushed a commit to mr-danya/sentry-mcp that referenced this pull request Oct 6, 2026
…missing env vars, new commands (#1461)

## Documentation Audit Report (2026-08-24)

Weekly automated audit comparing the CLI implementation against its
documentation. Changes since the last merged audit (PR getsentry#1400,
2026-08-11) include: the `sentry cli completion` command (getsentry#1427), sixel
dashboard rendering (getsentry#1410), the `--environment` explore fix (getsentry#1442),
and the 0.43.0 release.

---

## Findings & Fixes

### A. Undocumented or missing commands/subcommands

| Command | Source | Expected doc location | Status |
|---------|--------|----------------------|--------|
| `sentry cli completion` | `src/commands/cli/completion.ts` (added in
getsentry#1427) | `apps/cli-docs/src/fragments/commands/cli.md` | **Fixed** —
added examples for bash, zsh, fish |

All other commands in `src/commands/` have corresponding fragment files.
Hidden backward-compat aliases (`send-event`, `send-envelope`,
`bash-hook`, `whoami`, plural aliases) are correctly excluded from docs.

### B. Undocumented flags

| Flag | Command | Source | Doc file | Status |
|------|---------|--------|----------|--------|
| `--sixel` / `-s` | `sentry dashboard view` |
`src/commands/dashboard/view.ts` | `fragments/commands/dashboard.md` |
**Fixed** — added example |

All other non-hidden flags are auto-generated into the command docs via
`generate-command-docs.ts`.

### C. Missing usage examples

No new gaps. The `sentry cli completion` command was the only command
without examples, now fixed.

### D. Stale descriptions

| Command/Flag | Code brief | Doc description | Status |
|-------------|-----------|-----------------|--------|
| `sentry explore --environment` | Was: "Replay environment filter for
--dataset replays" | Now works for all datasets (fixed in getsentry#1442) |
**Fixed** — updated brief to "Environment filter" |

### E. Missing route mappings in skill generator

**N/A** — `ROUTE_TO_REFERENCE` was removed and replaced with automatic
1:1 route-to-reference mapping via `groupRoutesByReference()` in
`script/generate-skill.ts`. No manual mapping to go stale.

### F. Installation / distribution gaps

No new gaps. Install script flags (`--no-modify-path`,
`--no-completions`, `--no-agent-skills`) and env vars
(`SENTRY_INSTALL_DIR`, `SENTRY_VERSION`, `SENTRY_INIT`) are documented
in `getting-started.mdx`. Platform support table matches `.craft.yml`
targets (macOS x64/arm64, Linux x64/arm64, Windows x64).

### G. Undocumented environment variables

| Variable | Referenced in | Expected doc | Status |
|----------|-------------|-------------|--------|
| `DO_NOT_TRACK` | `src/lib/telemetry.ts` | `configuration.md`
(generated from env-registry) | **Fixed** — added to env-registry.ts |
| `SENTRY_PIPELINE` | `src/commands/build/upload.ts`,
`src/lib/build/index.ts` | `configuration.md` | **Fixed** — added to
env-registry.ts |

Remaining niche/internal vars NOT added (intentionally excluded from
user-facing docs):
- `SENTRY_ENVIRONMENT` — bash-hook template only
- `SENTRY_CLI_NO_EXIT_TRAP` — bash-hook template internal
- `SENTRY_SCAN_DISABLE_WORKERS` — internal performance tuning
- `SENTRY_CLI_INTEGRATION_TEST_VERSION_OVERRIDE` — test-only
- `SENTRY_RN_*` — internal react-native wrapper vars
- `SENTRY_TRACES_SAMPLE_RATE` — inherited from SDK, not a CLI config

### H. Auth / self-hosted gaps

No new gaps. OAuth scopes in `self-hosted.md` and `DEVELOPMENT.md` are
auto-generated (`GENERATED:START oauth-scopes`). The `--url` flag for
`auth login` and `SENTRY_HOST`/`SENTRY_URL` behavior are documented.
Token priority (OAuth > env token unless `SENTRY_FORCE_ENV_TOKEN`) is
correct.

### I. Plugin/skills gaps

No new gaps since the last audit. Skills install to `~/.claude` and
`~/.agents` only. The `agentic-usage.md` correctly states this.
Detection of other agents (Cursor, Windsurf, Copilot, etc.) is for
telemetry and the docs correctly list them as "supported" agents (they
can use the CLI, just not via auto-installed skills).

### J. README / DEVELOPMENT.md / contributing.md drift

| File | Claim | Reality | Status |
|------|-------|---------|--------|
| `script/generate-docs-sections.ts` line 210 | "TypeScript types and
Zod schemas" | Migrated to Valibot in getsentry#1389 (merged Aug 7) | **Fixed** |
| `apps/cli-docs/src/content/docs/features.md` | DSN detection table
lists 6 languages with specific `Sentry.init()` patterns | Scanner uses
a universal DSN URL regex across 30+ file extensions | **Fixed** —
updated table to match actual TEXT_EXTENSIONS set |

Node.js version claims (v22.15+ for dev, >=20 for runtime) are correct.
Build commands, test commands, and license (`FSL-1.1-Apache-2.0`) are
all accurate.

---

## Top 5 Most Impactful Fixes (prioritized)

1. **DSN detection language table overhaul** (`features.md`) — The
previous table implied language-specific `Sentry.init()` pattern
matching, which is misleading. The universal regex approach supports 30+
file extensions. Users of Kotlin, Rust, Swift, Dart, C#, etc. would not
have known their DSNs are detected.

2. **Missing `sentry cli completion` docs** (`cli.md` fragment) — New
command from getsentry#1427 with no usage examples. Users discovering shell
completions would miss this standalone alternative to `sentry cli
setup`.

3. **Stale `--environment` flag brief** (`explore.ts`) — After getsentry#1442
fixed `--environment` to work for all datasets, the flag's `brief`
string still said "Replay environment filter". Users would think it only
applies to replays.

4. **Missing env vars in registry** (`env-registry.ts`) — `DO_NOT_TRACK`
(industry-standard telemetry opt-out) and `SENTRY_PIPELINE` (build
plugin identification) were referenced in code but absent from the
generated configuration page.

5. **Zod→Valibot drift in project structure**
(`generate-docs-sections.ts`) — The auto-generated project structure
tree in `contributing.md` still said "Zod schemas" despite the migration
to Valibot in getsentry#1389. Contributors would be confused about which
validation library to use.

<div><a
href="https://cursor.com/agents/bc-2961de96-bee8-48d4-becb-d403a42a7cb6?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/automations/8b0c0f35-da5e-409d-984c-5e39518ffb8a"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/view-automation-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/view-automation-light.png"><img
alt="View Automation" width="141" height="28"
src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
mr-danya pushed a commit to mr-danya/sentry-mcp that referenced this pull request Oct 6, 2026
…missing env vars, new commands (#1461)

## Documentation Audit Report (2026-08-24)

Weekly automated audit comparing the CLI implementation against its
documentation. Changes since the last merged audit (PR getsentry#1400,
2026-08-11) include: the `sentry cli completion` command (getsentry#1427), sixel
dashboard rendering (getsentry#1410), the `--environment` explore fix (getsentry#1442),
and the 0.43.0 release.

---

## Findings & Fixes

### A. Undocumented or missing commands/subcommands

| Command | Source | Expected doc location | Status |
|---------|--------|----------------------|--------|
| `sentry cli completion` | `src/commands/cli/completion.ts` (added in
getsentry#1427) | `apps/cli-docs/src/fragments/commands/cli.md` | **Fixed** —
added examples for bash, zsh, fish |

All other commands in `src/commands/` have corresponding fragment files.
Hidden backward-compat aliases (`send-event`, `send-envelope`,
`bash-hook`, `whoami`, plural aliases) are correctly excluded from docs.

### B. Undocumented flags

| Flag | Command | Source | Doc file | Status |
|------|---------|--------|----------|--------|
| `--sixel` / `-s` | `sentry dashboard view` |
`src/commands/dashboard/view.ts` | `fragments/commands/dashboard.md` |
**Fixed** — added example |

All other non-hidden flags are auto-generated into the command docs via
`generate-command-docs.ts`.

### C. Missing usage examples

No new gaps. The `sentry cli completion` command was the only command
without examples, now fixed.

### D. Stale descriptions

| Command/Flag | Code brief | Doc description | Status |
|-------------|-----------|-----------------|--------|
| `sentry explore --environment` | Was: "Replay environment filter for
--dataset replays" | Now works for all datasets (fixed in getsentry#1442) |
**Fixed** — updated brief to "Environment filter" |

### E. Missing route mappings in skill generator

**N/A** — `ROUTE_TO_REFERENCE` was removed and replaced with automatic
1:1 route-to-reference mapping via `groupRoutesByReference()` in
`script/generate-skill.ts`. No manual mapping to go stale.

### F. Installation / distribution gaps

No new gaps. Install script flags (`--no-modify-path`,
`--no-completions`, `--no-agent-skills`) and env vars
(`SENTRY_INSTALL_DIR`, `SENTRY_VERSION`, `SENTRY_INIT`) are documented
in `getting-started.mdx`. Platform support table matches `.craft.yml`
targets (macOS x64/arm64, Linux x64/arm64, Windows x64).

### G. Undocumented environment variables

| Variable | Referenced in | Expected doc | Status |
|----------|-------------|-------------|--------|
| `DO_NOT_TRACK` | `src/lib/telemetry.ts` | `configuration.md`
(generated from env-registry) | **Fixed** — added to env-registry.ts |
| `SENTRY_PIPELINE` | `src/commands/build/upload.ts`,
`src/lib/build/index.ts` | `configuration.md` | **Fixed** — added to
env-registry.ts |

Remaining niche/internal vars NOT added (intentionally excluded from
user-facing docs):
- `SENTRY_ENVIRONMENT` — bash-hook template only
- `SENTRY_CLI_NO_EXIT_TRAP` — bash-hook template internal
- `SENTRY_SCAN_DISABLE_WORKERS` — internal performance tuning
- `SENTRY_CLI_INTEGRATION_TEST_VERSION_OVERRIDE` — test-only
- `SENTRY_RN_*` — internal react-native wrapper vars
- `SENTRY_TRACES_SAMPLE_RATE` — inherited from SDK, not a CLI config

### H. Auth / self-hosted gaps

No new gaps. OAuth scopes in `self-hosted.md` and `DEVELOPMENT.md` are
auto-generated (`GENERATED:START oauth-scopes`). The `--url` flag for
`auth login` and `SENTRY_HOST`/`SENTRY_URL` behavior are documented.
Token priority (OAuth > env token unless `SENTRY_FORCE_ENV_TOKEN`) is
correct.

### I. Plugin/skills gaps

No new gaps since the last audit. Skills install to `~/.claude` and
`~/.agents` only. The `agentic-usage.md` correctly states this.
Detection of other agents (Cursor, Windsurf, Copilot, etc.) is for
telemetry and the docs correctly list them as "supported" agents (they
can use the CLI, just not via auto-installed skills).

### J. README / DEVELOPMENT.md / contributing.md drift

| File | Claim | Reality | Status |
|------|-------|---------|--------|
| `script/generate-docs-sections.ts` line 210 | "TypeScript types and
Zod schemas" | Migrated to Valibot in getsentry#1389 (merged Aug 7) | **Fixed** |
| `apps/cli-docs/src/content/docs/features.md` | DSN detection table
lists 6 languages with specific `Sentry.init()` patterns | Scanner uses
a universal DSN URL regex across 30+ file extensions | **Fixed** —
updated table to match actual TEXT_EXTENSIONS set |

Node.js version claims (v22.15+ for dev, >=20 for runtime) are correct.
Build commands, test commands, and license (`FSL-1.1-Apache-2.0`) are
all accurate.

---

## Top 5 Most Impactful Fixes (prioritized)

1. **DSN detection language table overhaul** (`features.md`) — The
previous table implied language-specific `Sentry.init()` pattern
matching, which is misleading. The universal regex approach supports 30+
file extensions. Users of Kotlin, Rust, Swift, Dart, C#, etc. would not
have known their DSNs are detected.

2. **Missing `sentry cli completion` docs** (`cli.md` fragment) — New
command from getsentry#1427 with no usage examples. Users discovering shell
completions would miss this standalone alternative to `sentry cli
setup`.

3. **Stale `--environment` flag brief** (`explore.ts`) — After getsentry#1442
fixed `--environment` to work for all datasets, the flag's `brief`
string still said "Replay environment filter". Users would think it only
applies to replays.

4. **Missing env vars in registry** (`env-registry.ts`) — `DO_NOT_TRACK`
(industry-standard telemetry opt-out) and `SENTRY_PIPELINE` (build
plugin identification) were referenced in code but absent from the
generated configuration page.

5. **Zod→Valibot drift in project structure**
(`generate-docs-sections.ts`) — The auto-generated project structure
tree in `contributing.md` still said "Zod schemas" despite the migration
to Valibot in getsentry#1389. Contributors would be confused about which
validation library to use.

<div><a
href="https://cursor.com/agents/bc-2961de96-bee8-48d4-becb-d403a42a7cb6?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/automations/8b0c0f35-da5e-409d-984c-5e39518ffb8a"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/view-automation-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/view-automation-light.png"><img
alt="View Automation" width="141" height="28"
src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant