docs: documentation audit — fix gaps between implementation and docs#1157
Draft
cursor[bot] wants to merge 3 commits into
Draft
docs: documentation audit — fix gaps between implementation and docs#1157cursor[bot] wants to merge 3 commits into
cursor[bot] wants to merge 3 commits into
Conversation
…es, fix library auth priority - agentic-usage.md: clarify that npm/pnpm/bun installs require manual 'sentry cli setup' for agent skills (no postinstall hook exists) - proguard.md: add missing upload subcommand examples and notes - library-usage.md: fix auth token priority to match actual implementation (stored OAuth > env token by default, not the reverse) Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
- auth.md fragment: add examples for --read-only and --scope flags - auth.md fragment: update self-hosted example to use --url (recommended) - getting-started.mdx: add --url flag example for self-hosted login, mention SENTRY_HOST alongside SENTRY_URL Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
Contributor
|
Contributor
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 5134 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 81.48% 81.47% -0.01%
==========================================
Files 397 397 —
Lines 27702 27702 —
Branches 17991 17991 —
==========================================
+ Hits 22570 22568 -2
- Misses 5132 5134 +2
- Partials 1862 1862 —Generated by Codecov Action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation Audit Report
This PR fixes the most impactful gaps found during a comprehensive audit of the Sentry CLI codebase vs. its documentation. The full gap report follows.
Changes Made
agentic-usage.md: Fixed incorrect claim that npm/pnpm/bun installs automatically runsentry cli setupfor agent skills. npm has nopostinstallhook — users must runsentry cli setupmanually.proguard.mdfragment: Added missingsentry proguard uploadsubcommand examples and notes (onlyuuidwas documented).library-usage.md: Fixed auth token priority to match actual implementation. Was listed as env token > stored OAuth; actual default is stored OAuth > env token.auth.mdfragment: Added undocumented--read-onlyand--scopeflags forsentry auth login. Updated self-hosted example to use--urlflag (recommended over bare env var).getting-started.mdx: Added--urlflag for self-hosted login, mentionedSENTRY_HOSTalongsideSENTRY_URL.Full Gap Report
A. Undocumented or Missing Commands/Subcommands
sentry proguard uploadsrc/commands/proguard/upload.tsdocs/src/fragments/commands/proguard.md— fixed in this PRAll other visible commands have corresponding fragment files. Hidden backward-compat aliases (
sentry issues,sentry orgs,sentry sourcemaps,sentry whoami,sentry send-event,sentry send-envelope,sentry bash-hook) are intentionally excluded from docs.B. Undocumented Flags
sentry auth login--read-onlysrc/commands/auth/login.tsauth.mdfragment — fixed in this PRsentry auth login--scopesrc/commands/auth/login.tsauth.mdfragment — fixed in this PRsentry auth login--urlsrc/commands/auth/login.tsauth.mdfragment — fixed in this PRsentry auth login--timeout,--forcesrc/commands/auth/login.tsauth.mdfragmentsentry auth refresh--read-only,--scope,--forcesrc/commands/auth/refresh.tsauth.mdfragmentsentry init--app,--tuisrc/commands/init.tsinit.mdfragmentsentry local serve--host,--attributessrc/commands/local/server.tslocal.mdfragmentsentry local run--host,--verify,--timeoutsrc/commands/local/run.tslocal.mdfragmentsentry monitor run--check-in-margin,--failure-issue-threshold,--recovery-thresholdsrc/commands/monitor/run.tsmonitor.mdfragmentsentry sourcemap inject--ignore,--ignore-filesrc/commands/sourcemap/inject.tssourcemap.mdfragmentsentry sourcemap upload--dist,--ignore,--ignore-file,--strip-prefix,--strip-common-prefix,--no-rewritesrc/commands/sourcemap/upload.tssourcemap.mdfragmentsentry explore--environmentsrc/commands/explore.tsexplore.mdfragmentsentry issue list--period,--compactsrc/commands/issue/list.tsissue.mdfragmentsentry release list--environment,--period,--statussrc/commands/release/list.tsrelease.mdfragmentsentry release create--ref,--urlsrc/commands/release/create.tsrelease.mdfragmentsentry release deploy--url,--started,--finished,--timesrc/commands/release/deploy.tsrelease.mdfragmentsentry release finalize--released,--urlsrc/commands/release/finalize.tsrelease.mdfragmentsentry release set-commits--clear,--commit,--initial-depthsrc/commands/release/set-commits.tsrelease.mdfragmentsentry replay list--environmentsrc/commands/replay/list.tsreplay.mdfragmentsentry dashboard view--periodsrc/commands/dashboard/view.tsdashboard.mdfragmentsentry dashboard widget add--col,--row,--width,--height,--layoutsrc/commands/dashboard/widget/add.tsdashboard.mdfragmentNote: Globally auto-injected flags (
--json,--fields,--fresh,--cursor,--verbose,--log-level,--org,--project) are handled by wrappers and documented in the global options section.C. Missing Usage Examples
All fragment files have bash examples. Only gap was
sentry proguard upload— fixed in this PR.D. Stale Descriptions
No meaningful drift. Brief strings are auto-generated into docs.
E. Missing Route Mappings in Skill Generator
No gaps.
ROUTE_TO_REFERENCEwas replaced by automatic 1:1 mapping. All 27 visible routes have reference files.F. Installation / Distribution Gaps
SENTRY_INSTALL_DIRenv var not in getting-startedinstallscript,setup.tsgetting-started.mdx--no-modify-path,--no-completions,--no-agent-skills) not in getting-startedinstalllines 64-72getting-started.mdxpackage.json(no postinstall)agentic-usage.md— fixedupgrade.tsG. Undocumented Environment Variables
configuration.mdis generated fromenv-registry.ts. These vars exist in code but are absent from the registry:SENTRY_TRACES_SAMPLE_RATElocal/run.tsSENTRY_SCAN_DISABLE_WORKERSscan/grep.tsSENTRY_MONITOR_SLUGmonitor/run.tsSENTRY_LAST_EVENTbash-hook.tsSENTRY_ENVIRONMENTbash-hook.tsSENTRY_CLI_NO_EXIT_TRAPbash-hook.tsNote: Most are auto-injected rather than user-configured, so omission may be intentional.
H. Auth / Self-Hosted Gaps
--urlflag for login not documentedlogin.ts--read-onlyand--scopefor loginlogin.tsdb/auth.tsauth refreshflags (--read-only,--scope,--force)refresh.tsauth.mdfragmentlogin-host-guard.tsauth.mdI. Plugin/Skills Gaps
package.jsonplugins/README.mddoesn't document~/.claude/~/.agentsauto-installagent-skills.tsplugins/README.mdplugins/README.mddoesn't mentionnpx skills addagentic-usage.mdplugins/README.mdJ. README / DEVELOPMENT.md Drift
bun install,bun run,bun testcommandsAGENTS.mdlines 40-61package.jsonusespnpm@10.11.0. Scripts usepnpm run.bun:testtesting frameworkAGENTS.mdtesting sectionvitest, notbun:test.AGENTS.mdline 3bun add -dfor depsAGENTS.mdRules sectionpnpm add -DREADME.mdandDEVELOPMENT.mdusepnpmpackage.json— OKTop 5 Most Impactful Fixes (Prioritized)
AGENTS.md
bun→pnpm/vitestdrift (HIGH) — AGENTS.md is consumed by every AI agent working on this repo. It referencesbun install,bun test,bun:test, andbun add -dthroughout, but the repo usespnpmas package manager andvitestas test runner. Every agent following these instructions will run wrong commands. Not fixed here — needs broader discussion as it's the primary agent guidance file.Auth token priority in library-usage.md (HIGH) — Was inverted (said env token > stored OAuth). Fixed in this PR.
Missing
--urlflag for self-hosted login (HIGH) — The recommended auth method for self-hosted was undocumented. Fixed in this PR.Agentic-usage.md npm install claim (MEDIUM) — Users on npm/pnpm/bun wouldn't get auto-installed skills. Fixed in this PR.
Missing
proguard uploaddocumentation (MEDIUM) — Full command with zero docs. Fixed in this PR.