This repository was archived by the owner on Nov 16, 2026. It is now read-only.
Repository navigation
fix(build): Unbreak the build for uint64 fields and the bound client type - #136
Merged
Merged
Conversation
…type Two spec syncs broke `pnpm build` on main, so the 1.52.0 release has no artifact to publish. - dc25434: `createSentryClient`'s inferred return type grew past what tsc will serialize (TS7056), so declaration emit failed. The generator now emits a named `SentryClient` interface and annotates the function with it. - 4260bab: the spec gained `format: uint64` integers. Hey API turns them into `z.coerce.bigint().gte(BigInt(0))`, and the tree-shaking guard rejects the top-level `BigInt(...)` call. normalize-spec now drops uint64 formats, as it already does for safe int64 ones, so the validators produce the `number` the generated types promise. Co-Authored-By: BYK <[email protected]>
sentry-junior
Bot
requested review from
MathurAditya724 and
betegon
as code owners
November 9, 2026 15:12
BYK
approved these changes
Nov 9, 2026
2 tasks done
BYK
added a commit
to getsentry/toolkit
that referenced
this pull request
Nov 9, 2026
Bumps the `@sentry/api` catalog entry from 1.51.0 to 1.53.0. The `minimumReleaseAgeExclude` entry and the lockfile are updated to match. - 1.52.0 is the first release with the stricter response types from getsentry/sentry: literal unions, UUID formats, activities keyed on `type`, and typed event contexts. It was published after getsentry/sentry-api-schema#136 fixed that repo's build. - 1.53.0 adds the spec sync that landed while 1.52.0 was pending (getsentry/sentry-api-schema@83a2b744). It only adds the 30-day search limit to the AI conversation endpoint descriptions; no types change. ## What broke `pnpm run tsc` failed in two CLI spots. Both were real mismatches, not just stricter types: - **`issue-app-links.ts`:** a Sentry App component's `schema` is now a union keyed on `type`, and only `issue-link` has `link`. Sentry stores each component's `schema` as the app's schema element, `type` included (`SentryAppComponent.objects.create(type=element["type"], schema=element)` in `sentry_apps/logic.py`). The CLI now narrows on `schema.type === "issue-link"` before it validates `link` with the existing `LinkFormSchema`. - **`human.ts` (`formatIssueDetails`):** `firstRelease`/`lastRelease` can be just `{ version }`. `serialize_releases` in `api/helpers/group_index/index.py` returns that when it can't load the release. The CLI read only `shortVersion`, so it dropped the release from issue details. A small `releaseVersion` helper now falls back to `version`. ## Tests - `issue-app-links.test.ts`: the new response validators check UUID formats and the issue-link schema shape. The fixtures used `"install-uuid"`-style IDs and a `{ link }`-only schema, so they no longer passed. They now use real UUIDs and a full `{ type: "issue-link", link, create }` schema. The unsupported-form case now sends a field type the CLI can't fill (`checkbox`), instead of a missing `link` that the API contract rules out. - `human.details.test.ts`: new case for the `{ version }`-only release fallback. - Nothing in toolkit read `invite_link`, so there were no tests to update for its removal. ## Generated files - `packages/cli/plugins/sentry-cli/skills/sentry-cli/references/{alert,event,release}.md` were regenerated by the CLI `typecheck` docs step from the new field descriptions. A few `config` fields now read `unknown` / `object | unknown`. That comes from how the generator renders the new schema unions, not from a CLI change. 1.53.0 didn't change them again. - `pnpm run --filter @sentry/mcp-core generate-definitions` reports the definitions are up to date. Tool definitions didn't change, so `measure-tokens` isn't affected. ## Quality gate (local sandbox, on 1.53.0) - `pnpm run tsc`: passes. - `pnpm run lint`: passes. - Tests: mcp-core, toolkit-core, mcp-cloudflare, mcp-test-client, logger, apps/local, apps/docs-mcp and apps/games-api all pass. The CLI passes 12951 tests with 6 failures. The same 6 fail on unchanged `main` in this sandbox and passed in this PR's CI on 1.52.0: permission and EACCES cases in completions, upgrade lock, resilient DB and code-scanner, and a delta-upgrade patch case. `@sentry/cli3to4` can't run here because its `codemod` binary needs GLIBC 2.35. No UI change, so no screenshots. The branch is still named `deps/sentry-api-1.52.0`, so the PR stays the same. Please keep this trailer in the squash commit message: Co-Authored-By: BYK <[email protected]> <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Ad31ca5f1f079a8864e79400fd1e95da4 --> -- [View Session in Sentry](https://sentry.sentry.io/explore/conversations/agent%3Ad31ca5f1f079a8864e79400fd1e95da4/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <[email protected]>
BYK
added a commit
that referenced
this pull request
Nov 9, 2026
) From 11-07 to 11-09, `@sentry/api` didn't release for 2 days and nobody noticed. Build was red on `main`, and every Release run failed on the stale `release/1.52.0` branch, but nothing reported it. Releases can also get stuck with no failing run at all. 83a2b74, for example, landed while 1.52.0 was pending and sat unreleased. This PR adds a `Release pipeline health` workflow. It keeps one issue, **"Release pipeline failing on main"**, open while the pipeline is broken. **Failure alerts.** - When Build (push builds only) or Release fails on `main`, the workflow opens the issue, or comments on it if it's already open. - Each message links the run and the commit. - The issue body mentions @BYK, which subscribes him to later comments. **Recovery.** - The next successful Release run closes the issue and links that run. - Skipped and cancelled runs don't count. **Daily staleness check.** At 08:23 UTC, and on manual dispatch, the workflow reports to the same issue in either of these cases: - The oldest "Generated" commit on `main` that isn't in the newest npm release is more than 24h old. The newest npm release comes from `npm view @sentry/api version`, matched to its git tag. A missing tag is reported too. - An open getsentry/publish request for this repo has had `ci-failed` for more than 24h, counted from when the label was added. The first check measures how long a schema commit has been waiting. A commit that landed 1h after a long quiet stretch doesn't trigger it. A commit stranded a minute after a release, like 83a2b74, still does. The workflow uses the default `GITHUB_TOKEN` with `contents: read` and `issues: write`. getsentry/publish is public, so that token can read its issues and their events. No new secrets, no Slack. ## Testing I ran both scripts under `dash`. **Staleness check on real data:** - Today's `main` is reported as up to date. - With the clock moved 2 days ahead, it reports 83a2b74. - At 8234586, with npm at 1.51.0 and the clock at 11-09 15:00Z, it reports 6 unreleased "Generated" commits, the oldest being dc25434 from 44h earlier. The 11-07 incident would have alerted about a day in. **Stubbed runs:** - A `ci-failed` request older than 24h is reported. A newer one, and requests for other repos, are not. - When `npm`, the issue list, or the events fetch fails, the run fails. - The issue script opens, comments on, or closes the issue, or does nothing when no issue is open. It exits non-zero when listing or writing issues fails. `actionlint` and `shellcheck --shell=sh --enable=check-extra-masked-returns` pass. No UI changes, so no screenshots. ## Notes - This works with or without the companion Release PR (#137), and it assumes #136, which is merged. - If the staleness check itself fails, for example because npm is down, GitHub's usual failed-run email for scheduled workflows is the only signal. - No admin setup is needed. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A3469a89d1b152f2e4ef70bbb981e697e --> -- [View Session in Sentry](https://sentry.sentry.io/explore/conversations/agent%3A3469a89d1b152f2e4ef70bbb981e697e/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Buildhas failed onmainsince the spec sync at 11-07 18:54Z. The automatic release did run on that push (Release run 42403582929). It cutrelease/1.52.0and opened getsentry/publish#10297. That branch's Build also failed (run 42403616257), so #10297 isci-failedand has nonpm-packageartifact. Since then, every push failsReleasewith craft'sRelease branch "release/1.52.0" already exists: runs 42508035369, 42592761019 and 42628769804.Two separate spec changes broke the build.
1. TS7056 on
createSentryClient(since dc25434)Build 42403582935 failed with:
createSentryClientreturned an inferred object type with about 270 bound methods, and declaration emit inlines it.Fix:
scripts/generate-client.mjsalso emits a namedSentryClientinterface, with the same signatures and JSDoc, and annotatescreateSentryClient(config): SentryClient. The.d.tsnow refers to the interface by name.SentryClientis still exported. It's now an interface instead ofReturnType<typeof createSentryClient>, with the same readonly members.2.
BigInt(0)fromformat: uint64(since 4260bab)Builds 42508035590, 42592761038 and 42628769704 failed with:
The spec now has 120 integers with
"format": "uint64", such as event context fields likeapp_memory. Hey API types them asnumber, but its Zod schema isz.coerce.bigint().gte(BigInt(0)).max(BigInt('18446744073709551615')). The tree-shaking guard rejects that schema. It would also turn JSON numbers intobigints that don't match the generated types.Fix:
lib/normalize-spec.mjsnow dropsuint64formats, as it already does for int64 integers with safe bounds. The validators then produce thenumberthat the types promise. A newnormalize-spectest covers this.After this merges
The stale
release/1.52.0branch (46c54bc) predates both fixes and the three later syncs, so it can't be published:release/1.52.0.Releasewithversion: 1.52.0.Local results
These ran on current
main(89d031f) plus this change, in a sandbox with 4 vCPUs and 8 GB:pnpm buildpasses. The sandbox neededNODE_OPTIONS=--max-old-space-size=4096for the declaration workers, or they ran out of memory. CI runners have more memory.pnpm typecheckpasses.pnpm testpasses: 52 files, 655 tests.via @BYK.
--
View Session in Sentry