Skip to content

docs: fix stale Bun prerequisite and add missing subcommand documentation#1022

Closed
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/sentry-cli-documentation-gaps-6fd0
Closed

docs: fix stale Bun prerequisite and add missing subcommand documentation#1022
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/sentry-cli-documentation-gaps-6fd0

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor Bot commented May 25, 2026

Documentation Audit: Gap Report & Fixes

Full audit of the Sentry CLI repository comparing implementation (src/) to documentation. This PR includes both a detailed gap report (DOCS-AUDIT.md) and fixes for the highest-impact issues.

Changes

1. Fix stale Bun prerequisite (Critical)

The build pipeline uses fossilize (Node SEA) + esbuildnot Bun. But README.md, DEVELOPMENT.md, and contributing.md all listed Bun as a development prerequisite.

  • script/generate-docs-sections.ts: Updated generateDevPrereq() to reference Node.js ≥22.15 instead of Bun. Removed the dead extractBunVersion() function.
  • DEVELOPMENT.md: Changed prerequisite from "Bun installed" to "Node.js v22.15 or later". Updated build section to mention fossilize/esbuild instead of Bun.
  • README.md / contributing.md: Updated generated dev-prereq sections to match.
  • README.md: Updated library-prereq to remove "or Bun" claim.

2. Add missing subcommand examples to fragments

  • dashboard.md: Added examples for sentry dashboard revisions and sentry dashboard restore (previously undocumented).
  • issue.md: Added sentry issue events subcommand examples and documented @latest / @most_frequent magic selectors.
  • cli.md: Added sentry cli defaults examples (was only in configuration.md) and sentry cli import examples (completely undocumented).
  • auth.md: Documented --url (important for self-hosted trust model), --force, and --timeout flags for sentry auth login.

3. Document install script options

  • getting-started.mdx: Added install script flags (--no-modify-path, --no-completions, --no-agent-skills) and env vars (SENTRY_INSTALL_DIR, SENTRY_INIT) useful for CI/Docker.

4. Gap Report (DOCS-AUDIT.md)

A structured report covering all audit categories:

  • A. Undocumented subcommands (5 items, all fixed in this PR)
  • B. Undocumented flags (12 items, highest-priority ones fixed)
  • C. Missing usage examples (5 items, all fixed)
  • D. Stale descriptions (Bun prerequisite — fixed)
  • E. Missing route mappings in skill generator (none found)
  • F. Installation/distribution gaps (install script flags — fixed; nightly migration behavior — documented in report)
  • G. Undocumented environment variables (env-registry is comprehensive; only internal vars missing, appropriately)
  • H. Auth/self-hosted gaps (host trust model, login flags — partially fixed)
  • I. Plugin/skills gaps (minor — Claude Code marketplace install method not in agentic-usage.md)
  • J. README/DEVELOPMENT.md drift (Bun prerequisite — fixed)

Top 5 prioritized fixes (from the report)

  1. ✅ Fix Bun prerequisite in doc generator
  2. ✅ Add missing subcommand examples (dashboard revisions/restore, issue events, cli import)
  3. ✅ Document auth login flags (--url, --force, --timeout)
  4. ✅ Document install script flags and env vars
  5. ✅ Add @latest / @most_frequent magic selectors to issue docs
Open in Web View Automation 

cursoragent and others added 3 commits May 25, 2026 12:10
The build pipeline uses fossilize (Node SEA) + esbuild, not Bun.
The generate-docs-sections.ts script was hard-coding Bun as a
prerequisite even though packageManager is pnpm and runtime is Node.js.

- Update generateDevPrereq() to reference Node.js instead of Bun
- Update DEVELOPMENT.md build section to mention fossilize/esbuild
- Update generated sections in README.md, contributing.md, library-usage.md

Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
- Add dashboard revisions/restore examples to dashboard.md fragment
- Add issue events subcommand and @latest/@most_frequent selectors to issue.md
- Add cli defaults and cli import examples to cli.md fragment
- Document auth login --url, --force, --timeout flags in auth.md
- Document install script flags and env vars in getting-started.mdx

Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-1022/

Built to branch gh-pages at 2026-05-25 12:13 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ Patch coverage is 100.00%. Project has 4287 uncovered lines.


Generated by Codecov Action

@BYK
Copy link
Copy Markdown
Member

BYK commented May 26, 2026

Superseded by #1024, which addresses all the issues found here plus adds systemic checks to prevent this class of documentation drift from recurring:

  • Generic check:stale-refs that derives stale patterns from package.json (not hardcoded to Bun)
  • Enhanced check:fragments that validates subcommand coverage within fragments, not just file existence
  • Expanded generated marker coverage so toolchain-dependent prose can't drift
  • Version extractors that throw on mismatch instead of silently falling back

Thank you for identifying the real issues — the fragment examples and install script documentation were accurate and reused in the new PR.

@BYK BYK closed this May 26, 2026
BYK added a commit that referenced this pull request May 26, 2026
Fix the Bun→Node migration documentation drift with three systemic improvements:

1. Fix generate-docs-sections.ts root cause
   - Replace extractBunVersion() with extractPnpmVersion() derived from packageManager
   - Make both version extractors throw on mismatch instead of silent fallback
   - Update all prerequisite generators to reference Node.js + pnpm
   - Remove 'or Bun' from library-usage prerequisite

2. Expand generated marker coverage
   - Wrap DEVELOPMENT.md prerequisites in GENERATED:START/END dev-prereq markers
   - Wrap DEVELOPMENT.md build section in GENERATED:START/END build-toolchain markers
   - Wrap contributing.md build section in GENERATED:START/END build-commands markers
   - Fix remaining stale refs: library-usage.md, plugins/README.md, check-no-deps.ts

3. Add generic check:stale-refs toolchain consistency check
   - New script/check-stale-references.ts derives stale patterns from package.json
   - Reads packageManager field to determine current PM, flags all others
   - If project migrates from pnpm to yarn, check auto-flags pnpm references
   - Added to CI lint job

4. Enhance check:fragments with subcommand coverage validation
   - Check 5: verify fragments mention all subcommands in a route
   - Handles default commands (sentry local = sentry local serve)
   - Strips code blocks to avoid false heading matches
   - Warns by default, --strict flag for hard errors

5. Fill subcommand coverage gaps in fragments
   - dashboard.md: add revisions, restore examples
   - cli.md: add defaults, import examples
   - issue.md: add events subcommand and @latest/@most_frequent selectors

Supersedes PR #1022 which found real issues but missed several stale
references and lacked systemic prevention.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants