Skip to content

feat(changelog): Make the AI summary timeout configurable - #967

Merged
BYK merged 1 commit into
masterfrom
byk/ai-summary-timeout
Nov 5, 2026
Merged

BYK merged 1 commit into
masterfrom
byk/ai-summary-timeout

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

AI changelog summaries had a fixed 120-second total budget. That's too short for large changelogs that summarize every scope and category.

getsentry/toolkit's CLI 0.48.0 prepare (run) used levels: [release, category, scope], minItems: 0 and covered ~330 entries across ~30 scope groups. The summary started at 19:50:34.8 and failed at 19:52:34.9, exactly 120s later, with:

[warn] AI changelog summary failed; keeping original entries. (stage=category; reason=deadline)

So scope summaries finished, and the run ran out of total budget during the category stage. No provider or validation error was reported.

Changes

  • New aiSummary.timeout setting: the total budget in seconds. Integer, 30–1800, default 120, so existing configs behave the same.
  • A single call that hits its 30s per-request limit now reports reason=request-timeout instead of reason=deadline. deadline now always means the total budget ran out. Before this change the two looked the same in the warning.
  • Each model call's duration is logged at debug level (level, call number, node count, repair flag). No content is logged.
  • Docs updated.

After this ships, toolkit can set timeout (and bump minVersion) for its CLI workspace.

Tests

  • New test: a run that needs about 125s of 25s calls succeeds with timeout: 600. It fails with the default.
  • Config tests check the default value and reject 29, 1801, 1.5 and "600".
  • Per-request timeout tests now expect request-timeout.
  • tsc, eslint and the AI summary, config, changelog and HTTP suites pass. In the sandbox, prepare-dry-run.e2e, npm.test and git.test fail the same way on master, because of a Git identity rule and the environment. These changes don't cause those failures.

via @BYK.

--

View Session in Sentry

Large changelogs that summarize every scope and category can need more
than the fixed 120-second budget; getsentry/toolkit's CLI 0.48.0 release
ran out of it during the category stage and fell back to the original
entries.

Add aiSummary.timeout (seconds, default 120), report a single slow call
as request-timeout instead of deadline, and log each model call's
duration at debug level.

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-11-05 21:31 UTC

@BYK BYK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be able to disable the timeout too (infinite)

@BYK
BYK merged commit 1d2807a into master Nov 5, 2026
35 of 36 checks passed
@BYK
BYK deleted the byk/ai-summary-timeout branch November 5, 2026 21:30
BYK pushed a commit that referenced this pull request Nov 6, 2026
Follow-up to #967, from review feedback asking for a way to turn the
total timeout off.

- `aiSummary.timeout: 0` removes the total budget. The 30-second
per-request limit and the 64-request cap still apply.
- Other values must still be whole numbers of at least 30. I dropped the
1800-second cap, since a limit like that no longer makes sense once
there's no limit at all.
- Updated the docs table and the limits section.

Tests: the long-running summary test now also runs with `timeout: 0`.
The config tests accept 0, 30, 600 and 3600 and reject -1, 29, 1.5 and
`"600"`. `tsc` and `eslint` pass, as do the AI summary, config,
changelog, HTTP and action suites.

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3Aaaa2b8ba1c1b8915ae7daa2e -->

--

[View Session in
Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3Aaaa2b8ba1c1b8915ae7daa2e/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
BYK added a commit to getsentry/toolkit that referenced this pull request Nov 6, 2026
CLI 0.48.0 shipped without AI changelog summaries. In the [prepare
run](https://github.com/getsentry/toolkit/actions/runs/42097652931),
Craft 3.10.0 started summarizing at 19:50:34.8 and gave up exactly 120s
later:

```
[warn] AI changelog summary failed; keeping original entries. (stage=category; reason=deadline)
```

That 120s is a fixed total budget in Craft. The model and the token are
fine: scope summaries completed. With `levels: [release, category,
scope]`, `minItems: 0` and ~330 entries since 0.47.0, the run just needs
more than 120s.

This PR sets the new `aiSummary.timeout: 600` for the CLI workspace and
bumps `minVersion` to `3.11.0`.

**Draft: merge only after getsentry/craft#967 ships in a Craft release
(expected 3.11.0).** Craft validates `aiSummary` strictly, so if this
lands before that release, CLI prepare and publish will reject the
config.

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3Aaaa2b8ba1c1b8915ae7daa2e -->

--

[View Session in
Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3Aaaa2b8ba1c1b8915ae7daa2e/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <126780+BYK@users.noreply.github.com>
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