Skip to content

feat(cli): apply Seer fixes locally and create pull requests - #1493

Draft
MathurAditya724 wants to merge 2 commits into
codex/seer-fix-interactivefrom
codex/seer-fix-delivery
Draft

MathurAditya724 wants to merge 2 commits into
codex/seer-fix-interactivefrom
codex/seer-fix-delivery

Conversation

@MathurAditya724

Copy link
Copy Markdown
Member

Adds local patch application and pull request creation to sentry issue fix. After reviewing a completed fix, terminal users can apply it, create PRs, do both, or skip. JSON and unattended sessions require explicit --apply or --pr flags.

Local application checks the checkout's repository identity, file paths, and working tree before applying the entire patch batch with Git. PR requests are submitted once per repository; fresh state polling reuses existing or in-progress PRs. Both actions require the pinned run to still contain the reviewed changes, and failures preserve diffs and any completed delivery.

Review after #1491, which adds the conversation and resume flow. Real temporary Git repositories cover dirty files, path escapes, renames, and CRLF; subprocess coverage exercises source and bundle delivery on native macOS and Windows CI.

Fixes #1490

Fixes #1490

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Refs #1490

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
joshuawayzwright pushed a commit to joshuawayzwright/sentry-mcp that referenced this pull request Nov 16, 2026
Adds a `sentry status` command backed by Sentry's public status page
(https://status.sentry.io) Statuspage API. It reports the overall
service indicator, any active incidents, and impacted components — and
works even when the Sentry API itself is degraded, since the request is
bounded by an explicit 10s timeout so a status check never hangs.

- `sentry status` (defaults to `show`) prints human-readable status
- `--json` emits structured data for scripting
- `--url` points at a self-hosted or regional Statuspage instance

This addresses item 2 of the issue. Request timeouts (item 1) already
exist in the shared API client (`sentry-client.ts`, 30s default +
per-endpoint overrides). Item 3 (auto-suppressing 5xx and suggesting
`sentry status`) is left for a follow-up as it's broader in scope.

## Testing
- `vitest run test/commands/status` — 4 tests pass (operational,
outage/incidents, `--json`, error path)
- `tsc --noEmit` clean
- `biome check` clean on new files
- `generate:docs` + `check:fragments` pass (new `status` fragment +
regenerated skill/docs sections committed)

Closes getsentry#1493

<!--
## Plan
Repo is the TypeScript sentry CLI (packages/cli), not Rust.

New files:
- packages/cli/src/lib/api/status-page.ts — fetchSentryStatus(baseUrl)
hits <url>/api/v2/summary.json, bounded by AbortSignal.timeout(10s),
throws ApiError on non-ok. Shapes payload into SentryStatus { indicator,
description, url, components[], incidents[] }, dropping Statuspage group
headers.
- packages/cli/src/commands/status/show.ts — buildCommand({ auth:false,
output:{human:formatSentryStatus} }) with --url flag (default
status.sentry.io); yields CommandOutput(status), adds a hint when not
fully operational. --json auto-injected by buildCommand.
- packages/cli/src/commands/status/index.ts — statusRoute
buildRouteMap({ routes:{show}, defaultCommand:"show" }).
- packages/cli/test/commands/status/show.test.ts — mocks
globalThis.fetch.
- apps/cli-docs/src/fragments/commands/status.md — doc fragment
(required by check-fragments).

Edits:
- packages/cli/src/app.ts — import statusRoute, register status in
top-level routes.
- packages/cli/src/lib/formatters/human.ts — add formatSentryStatus()
with colored indicator/component dots, incidents section, impacted-only
component list falling back to full list.
- Regenerated committed generated files: SKILL.md, references/status.md,
contributing.md.
-->

---------

Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
joshuawayzwright pushed a commit to joshuawayzwright/sentry-mcp that referenced this pull request Nov 16, 2026
Adds a `sentry status` command backed by Sentry's public status page
(https://status.sentry.io) Statuspage API. It reports the overall
service indicator, any active incidents, and impacted components — and
works even when the Sentry API itself is degraded, since the request is
bounded by an explicit 10s timeout so a status check never hangs.

- `sentry status` (defaults to `show`) prints human-readable status
- `--json` emits structured data for scripting
- `--url` points at a self-hosted or regional Statuspage instance

This addresses item 2 of the issue. Request timeouts (item 1) already
exist in the shared API client (`sentry-client.ts`, 30s default +
per-endpoint overrides). Item 3 (auto-suppressing 5xx and suggesting
`sentry status`) is left for a follow-up as it's broader in scope.

## Testing
- `vitest run test/commands/status` — 4 tests pass (operational,
outage/incidents, `--json`, error path)
- `tsc --noEmit` clean
- `biome check` clean on new files
- `generate:docs` + `check:fragments` pass (new `status` fragment +
regenerated skill/docs sections committed)

Closes getsentry#1493

<!--
## Plan
Repo is the TypeScript sentry CLI (packages/cli), not Rust.

New files:
- packages/cli/src/lib/api/status-page.ts — fetchSentryStatus(baseUrl)
hits <url>/api/v2/summary.json, bounded by AbortSignal.timeout(10s),
throws ApiError on non-ok. Shapes payload into SentryStatus { indicator,
description, url, components[], incidents[] }, dropping Statuspage group
headers.
- packages/cli/src/commands/status/show.ts — buildCommand({ auth:false,
output:{human:formatSentryStatus} }) with --url flag (default
status.sentry.io); yields CommandOutput(status), adds a hint when not
fully operational. --json auto-injected by buildCommand.
- packages/cli/src/commands/status/index.ts — statusRoute
buildRouteMap({ routes:{show}, defaultCommand:"show" }).
- packages/cli/test/commands/status/show.test.ts — mocks
globalThis.fetch.
- apps/cli-docs/src/fragments/commands/status.md — doc fragment
(required by check-fragments).

Edits:
- packages/cli/src/app.ts — import statusRoute, register status in
top-level routes.
- packages/cli/src/lib/formatters/human.ts — add formatSentryStatus()
with colored indicator/component dots, incidents section, impacted-only
component list falling back to full list.
- Regenerated committed generated files: SKILL.md, references/status.md,
contributing.md.
-->

---------

Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
joshuawayzwright pushed a commit to joshuawayzwright/sentry-mcp that referenced this pull request Nov 16, 2026
Adds a `sentry status` command backed by Sentry's public status page
(https://status.sentry.io) Statuspage API. It reports the overall
service indicator, any active incidents, and impacted components — and
works even when the Sentry API itself is degraded, since the request is
bounded by an explicit 10s timeout so a status check never hangs.

- `sentry status` (defaults to `show`) prints human-readable status
- `--json` emits structured data for scripting
- `--url` points at a self-hosted or regional Statuspage instance

This addresses item 2 of the issue. Request timeouts (item 1) already
exist in the shared API client (`sentry-client.ts`, 30s default +
per-endpoint overrides). Item 3 (auto-suppressing 5xx and suggesting
`sentry status`) is left for a follow-up as it's broader in scope.

## Testing
- `vitest run test/commands/status` — 4 tests pass (operational,
outage/incidents, `--json`, error path)
- `tsc --noEmit` clean
- `biome check` clean on new files
- `generate:docs` + `check:fragments` pass (new `status` fragment +
regenerated skill/docs sections committed)

Closes getsentry#1493

<!--
## Plan
Repo is the TypeScript sentry CLI (packages/cli), not Rust.

New files:
- packages/cli/src/lib/api/status-page.ts — fetchSentryStatus(baseUrl)
hits <url>/api/v2/summary.json, bounded by AbortSignal.timeout(10s),
throws ApiError on non-ok. Shapes payload into SentryStatus { indicator,
description, url, components[], incidents[] }, dropping Statuspage group
headers.
- packages/cli/src/commands/status/show.ts — buildCommand({ auth:false,
output:{human:formatSentryStatus} }) with --url flag (default
status.sentry.io); yields CommandOutput(status), adds a hint when not
fully operational. --json auto-injected by buildCommand.
- packages/cli/src/commands/status/index.ts — statusRoute
buildRouteMap({ routes:{show}, defaultCommand:"show" }).
- packages/cli/test/commands/status/show.test.ts — mocks
globalThis.fetch.
- apps/cli-docs/src/fragments/commands/status.md — doc fragment
(required by check-fragments).

Edits:
- packages/cli/src/app.ts — import statusRoute, register status in
top-level routes.
- packages/cli/src/lib/formatters/human.ts — add formatSentryStatus()
with colored indicator/component dots, incidents section, impacted-only
component list falling back to full list.
- Regenerated committed generated files: SKILL.md, references/status.md,
contributing.md.
-->

---------

Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
joshuawayzwright pushed a commit to joshuawayzwright/sentry-mcp that referenced this pull request Nov 16, 2026
Adds a `sentry status` command backed by Sentry's public status page
(https://status.sentry.io) Statuspage API. It reports the overall
service indicator, any active incidents, and impacted components — and
works even when the Sentry API itself is degraded, since the request is
bounded by an explicit 10s timeout so a status check never hangs.

- `sentry status` (defaults to `show`) prints human-readable status
- `--json` emits structured data for scripting
- `--url` points at a self-hosted or regional Statuspage instance

This addresses item 2 of the issue. Request timeouts (item 1) already
exist in the shared API client (`sentry-client.ts`, 30s default +
per-endpoint overrides). Item 3 (auto-suppressing 5xx and suggesting
`sentry status`) is left for a follow-up as it's broader in scope.

## Testing
- `vitest run test/commands/status` — 4 tests pass (operational,
outage/incidents, `--json`, error path)
- `tsc --noEmit` clean
- `biome check` clean on new files
- `generate:docs` + `check:fragments` pass (new `status` fragment +
regenerated skill/docs sections committed)

Closes getsentry#1493

<!--
## Plan
Repo is the TypeScript sentry CLI (packages/cli), not Rust.

New files:
- packages/cli/src/lib/api/status-page.ts — fetchSentryStatus(baseUrl)
hits <url>/api/v2/summary.json, bounded by AbortSignal.timeout(10s),
throws ApiError on non-ok. Shapes payload into SentryStatus { indicator,
description, url, components[], incidents[] }, dropping Statuspage group
headers.
- packages/cli/src/commands/status/show.ts — buildCommand({ auth:false,
output:{human:formatSentryStatus} }) with --url flag (default
status.sentry.io); yields CommandOutput(status), adds a hint when not
fully operational. --json auto-injected by buildCommand.
- packages/cli/src/commands/status/index.ts — statusRoute
buildRouteMap({ routes:{show}, defaultCommand:"show" }).
- packages/cli/test/commands/status/show.test.ts — mocks
globalThis.fetch.
- apps/cli-docs/src/fragments/commands/status.md — doc fragment
(required by check-fragments).

Edits:
- packages/cli/src/app.ts — import statusRoute, register status in
top-level routes.
- packages/cli/src/lib/formatters/human.ts — add formatSentryStatus()
with colored indicator/component dots, incidents section, impacted-only
component list falling back to full list.
- Regenerated committed generated files: SKILL.md, references/status.md,
contributing.md.
-->

---------

Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant