Skip to content

docs: fix default values of maxClientErrors and snapshotHistorySecs#3828

Merged
barjin merged 1 commit into
apify:masterfrom
anxkhn:docs/fix-snapshotter-defaults
Jul 7, 2026
Merged

docs: fix default values of maxClientErrors and snapshotHistorySecs#3828
barjin merged 1 commit into
apify:masterfrom
anxkhn:docs/fix-snapshotter-defaults

Conversation

@anxkhn

@anxkhn anxkhn commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

The JSDoc @default tags for two SnapshotterOptions fields do not match the
effective defaults in the Snapshotter constructor, so the generated API
reference on crawlee.dev publishes the wrong values.

In packages/core/src/autoscaling/snapshotter.ts:

  • maxClientErrors is documented @default 1 but the constructor destructures
    it as maxClientErrors = 3. createClientLoadSignal also falls back to
    options.maxClientErrors ?? 3 (client_load_signal.ts), so 3 is the
    effective value.
  • snapshotHistorySecs is documented @default 60 but the constructor
    destructures it as snapshotHistorySecs = 30, which is the sole value feeding
    the snapshot-history window (snapshotHistoryMillis = snapshotHistorySecs * 1000).

git blame shows the wrong JSDoc and the code defaults have coexisted since the
initial commit, so this is a longstanding docs mismatch rather than a regression.
This follows the same fix as commit bab3b71 (docs: fix default value of \maxUsedMemoryRatio``), which corrected the identical issue for another field in
this same interface.

Docs-only change; no behavior changes. Following the precedent, no test is added
(the corrected values are only observable through the private load-signal
internals).

The JSDoc `@default` tags for `maxClientErrors` and
`snapshotHistorySecs` in `SnapshotterOptions` did not match the
effective defaults in the `Snapshotter` constructor. `maxClientErrors`
defaults to 3 (not 1) and `snapshotHistorySecs` defaults to 30 (not
60), so the generated API reference on crawlee.dev showed the wrong
values. Update the docs to match the implementation.

Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
@barjin barjin changed the title docs: fix default values of maxClientErrors and `snapshotHistorySecs docs: fix default values of maxClientErrors and snapshotHistorySecs Jul 7, 2026

@barjin barjin 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.

lgtm, thank you @anxkhn !

@barjin barjin merged commit 15f9e55 into apify:master Jul 7, 2026
10 checks passed
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.

3 participants