Dashboard › cli › Distillation
3a7b19f5-6fe5-4bb0-b1dd-2773f14b81a2["lore_tm_v1_qVCaQ7f1jBeHOq0wbRqP2w_SP60WmAMaj0VAUVN6JCk","lore_tm_v1_YCrLZFGMFM3iwpZPgBQgHkW11YjzgcDnVssUyd4Xms4"]
🔴 (13:27) sentry org list supports [--limit N] [--json].
🔴 (13:27) A <project> argument searches for a project by name across all accessible organizations.
🔴 (13:27) org view and project view mirror gh repo view: they work from DSN-derived context or with an explicit argument.
🔴 (13:27) Missing-context errors must use the ContextError class.
🔴 (13:27) Automatic command aliases are: list → ls; view → show; delete → remove, rm; create → new.
🔴 (13:27) Node.js standard-library usage conventions include: read files with await readFile(path, "utf-8") from node:fs/promises; write with await writeFile(path, content); check existence with existsSync(path) from node:fs; spawn processes with spawn() or execFile() from node:child_process; run shell commands with execSync(); find executables using the which helper in src/lib/which.ts; glob using the scanner in src/lib/scan/; sleep with await setTimeout(ms) from node:timers/promises; parse JSON files with JSON.parse(await readFile(path, "utf-8")).
🔴 (13:27) Dry-run commands import DRY_RUN_FLAG and DRY_RUN_ALIASES from ../../lib/mutate-command.js.
🔴 (13:27) Pagination state uses buildPaginationContextKey(), resolveCursor(), advancePaginationState(), hasPreviousPage(), and the returned nextCursor; the context key includes identifying scope and filter values such as sort and q.
🔴 (13:27) dispatchOrgScopedList provides automatic pagination for most project/issue list modes, while a custom "org-all" override manually calls resolveCursor, advancePaginationState, and paginationHint.
🔴 (13:27) Normalized validated inputs are converted to lowercase, and invalid input throws ValidationError.
🔴 (13:27) Valibot schemas use imports such as type InferOutput, object, string, optional, and number.
🔴 (13:27) SQL code should use the upsert() helper from src/lib/db/utils.ts to reduce boilerplate.
🔴 (13:27) CLI exit-code ranges are: 1x authentication, 2x input/configuration, 3x API/network, 4x feature/billing, 5x operations, and 6x command-specific; the full mapping is in EXIT within src/lib/errors.ts and at https://cli.sentry.dev/exit-codes/.
🔴 (13:27) resolveDashboardId() in src/commands/dashboard/resolve.ts is the reference implementation for dashboard ID resolution.
🔴 (13:27) Inline comments are allowed only when they convey information code cannot express: business reasons or constraints, surprising/non-obvious behavior, dependency or platform workarounds, or rationale and breakage implications for hardcoded values.
🔴 (13:27) Tests should use useTestConfigDir from ../helpers.js.
🔴 (13:27) Property tests use fcAssert(property(...), { numRuns: DEFAULT_NUM_RUNS }); example invariants include symmetry and encode/decode round trips.
🔴 (13:27) Stateful/model-based tests may define commands implementing AsyncCommand<DbModel, RealDb> and verify the real system against the model.
🔴 (13:27) Tests requiring database isolation should call createIsolatedDbContext(), run test code in try, and invoke cleanup() in finally.
🔴 (13:27) When property tests are added for a function with existing unit tests, redundant unit tests must be removed and the unit-test file must receive a header comment identifying invariants covered by the property-test file.
🔴 (13:27) Automated bug-fix PR rules were introduced to prevent duplication and staleness after five overlapping PRs accumulated.