Skip to content

Fix schedule catchup window default#2211

Open
chaptersix wants to merge 1 commit into
mainfrom
codex/schedule-catchup-window-default
Open

Fix schedule catchup window default#2211
chaptersix wants to merge 1 commit into
mainfrom
codex/schedule-catchup-window-default

Conversation

@chaptersix

@chaptersix chaptersix commented Jul 14, 2026

Copy link
Copy Markdown

What changed

  • Correct catch-up-window documentation from one minute to one year.
  • Correct the fallback used when decoding a server response without the field.
  • Add server-backed describe coverage for the one-year default.

Why

Requests already omitted an unspecified value, but the documentation and defensive response fallback still used the historical one-minute default.

Breaking changes

None.

@chaptersix chaptersix marked this pull request as ready for review July 15, 2026 15:51
@chaptersix chaptersix requested a review from a team as a code owner July 15, 2026 15:51
// 'overlap' should never be missing on describe, as the server will replace UNSPECIFIED by an actual value
overlap: decodeScheduleOverlapPolicy(raw.schedule.policies?.overlapPolicy) ?? ScheduleOverlapPolicy.SKIP,
catchupWindow: optionalTsToMs(raw.schedule.policies?.catchupWindow) ?? 60_000,
catchupWindow: optionalTsToMs(raw.schedule.policies?.catchupWindow) ?? 365 * 24 * 60 * 60 * 1000,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does the server have some form of configuration for that default value? e.g. dynamic config?

If so, then we'd better let that undefined if not explicitly specified by the user, so that the server's default applies.

* Window could lead to missed Actions. (But you can always {@link ScheduleHandle.backfill}.)
*
* @default 1 year
* When unset, this field is omitted so the Temporal Server applies its default (currently one year).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This line is inconsistent with the code currently in schedule-client.ts (see my comment at line 440).

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.

2 participants