CBG-5715: correct documented defaults and bounds - #8656
Open
torcolvin wants to merge 2 commits into
Open
Conversation
Contributor
|
Droid finished @torcolvin's task —— View job Docs-only change looks largely consistent with current code defaults, but the revs_limit description currently references an allow_conflicts-enabled mode that config validation disallows, which can mislead API consumers. |
This was referenced Aug 21, 2026
torcolvin
force-pushed
the
CBG-5715-08-defaults-and-bounds
branch
from
August 23, 2026 18:33
f4492d6 to
aa32138
Compare
Redocly previews |
torcolvin
added a commit
that referenced
this pull request
Aug 23, 2026
max_processes is a uint, and db/event_manager.go:69-70 maps 0 to kMaxActiveEvents (500), so document minimum: 0 with the effective default and say what 0 means. Raised by Copilot on #8654. heartbeat and timeout in the _changes POST bodies now carry the same defaults and bounds already documented on the GET query parameters: heartbeat defaults to 0 and, when non-zero, is clamped up to kMinHeartbeatMS (25000); timeout defaults to kDefaultTimeoutMS (300000) and is capped at kMaxTimeoutMS (900000). See GetRestrictedInt, which readChangesOptionsFromJSON calls with allowZero=true. Copilot flagged these as heartbeat-only, but the timeout default is 300000, not 0. Also drops the revs_limit allow_conflicts note. Both branches it describes exist (db/database.go:504-508, rest/config.go:936-940) but neither is reachable from config: allow_conflicts=true is rejected in the same validateVersion (rest/config.go:1149-1150) and DefaultAllowConflicts is false, so only the test-only EnableAllowConflicts gets there. Raised by @factory-droid on #8656. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
torcolvin
force-pushed
the
CBG-5715-08-defaults-and-bounds
branch
from
August 23, 2026 18:44
aa32138 to
8617f4c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Updates OpenAPI documentation to align documented defaults and validation bounds with runtime behavior.
Changes:
- Corrects changes-feed timeout and heartbeat documentation.
- Updates JavaScript, event-process, revision-limit, and stats-log defaults.
- Adjusts revision-limit minimums and configuration metadata.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Summary |
|---|---|
docs/api/paths/public/keyspace-_changes.yaml |
Updates public changes-feed defaults and bounds. |
docs/api/paths/admin/keyspace-_changes.yaml |
Updates admin changes-feed defaults and bounds. |
docs/api/components/schemas.yaml |
Corrects database and logging configuration documentation; a minor note requests documenting conditional revs_limit values for conflict-enabled databases. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
torcolvin
added a commit
that referenced
this pull request
Aug 24, 2026
max_processes is a uint, and db/event_manager.go:69-70 maps 0 to kMaxActiveEvents (500), so document minimum: 0 with the effective default and say what 0 means. Raised by Copilot on #8654. heartbeat and timeout in the _changes POST bodies now carry the same defaults and bounds already documented on the GET query parameters: heartbeat defaults to 0 and, when non-zero, is clamped up to kMinHeartbeatMS (25000); timeout defaults to kDefaultTimeoutMS (300000) and is capped at kMaxTimeoutMS (900000). See GetRestrictedInt, which readChangesOptionsFromJSON calls with allowZero=true. Copilot flagged these as heartbeat-only, but the timeout default is 300000, not 0. Also drops the revs_limit allow_conflicts note. Both branches it describes exist (db/database.go:504-508, rest/config.go:936-940) but neither is reachable from config: allow_conflicts=true is rejected in the same validateVersion (rest/config.go:1149-1150) and DefaultAllowConflicts is false, so only the test-only EnableAllowConflicts gets there. Raised by @factory-droid on #8656. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
torcolvin
force-pushed
the
CBG-5715-08-defaults-and-bounds
branch
from
August 24, 2026 17:31
8617f4c to
c6ce9ed
Compare
torcolvin
added a commit
that referenced
this pull request
Aug 24, 2026
max_processes is a uint, and db/event_manager.go:69-70 maps 0 to kMaxActiveEvents (500), so document minimum: 0 with the effective default and say what 0 means. Raised by Copilot on #8654. heartbeat and timeout in the _changes POST bodies now carry the same defaults and bounds already documented on the GET query parameters: heartbeat defaults to 0 and, when non-zero, is clamped up to kMinHeartbeatMS (25000); timeout defaults to kDefaultTimeoutMS (300000) and is capped at kMaxTimeoutMS (900000). See GetRestrictedInt, which readChangesOptionsFromJSON calls with allowZero=true. Copilot flagged these as heartbeat-only, but the timeout default is 300000, not 0. Also drops the revs_limit allow_conflicts note. Both branches it describes exist (db/database.go:504-508, rest/config.go:936-940) but neither is reachable from config: allow_conflicts=true is rejected in the same validateVersion (rest/config.go:1149-1150) and DefaultAllowConflicts is false, so only the test-only EnableAllowConflicts gets there. Raised by @factory-droid on #8656. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- `javascript_timeout_secs` documented a default of 60, but
`base.DefaultJavascriptTimeoutSecs` is 0 (uncapped).
- `revs_limit` documented `minimum: 0`, which config validation rejects
("must be greater than zero"). Use 1, and note the higher floor and
different default that apply when `allow_conflicts` is enabled.
- The stats logger's `max_age` documented a default of 6. Unlike the other
loggers it does not derive its default from `minAge`; it uses the fixed
`statsDefaultMaxAgeOverride` of 90. The error/warn/info/debug/trace and
audit defaults were checked and are correct.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
max_processes is a uint, and db/event_manager.go:69-70 maps 0 to kMaxActiveEvents (500), so document minimum: 0 with the effective default and say what 0 means. Raised by Copilot on #8654. heartbeat and timeout in the _changes POST bodies now carry the same defaults and bounds already documented on the GET query parameters: heartbeat defaults to 0 and, when non-zero, is clamped up to kMinHeartbeatMS (25000); timeout defaults to kDefaultTimeoutMS (300000) and is capped at kMaxTimeoutMS (900000). See GetRestrictedInt, which readChangesOptionsFromJSON calls with allowZero=true. Copilot flagged these as heartbeat-only, but the timeout default is 300000, not 0. Also drops the revs_limit allow_conflicts note. Both branches it describes exist (db/database.go:504-508, rest/config.go:936-940) but neither is reachable from config: allow_conflicts=true is rejected in the same validateVersion (rest/config.go:1149-1150) and DefaultAllowConflicts is false, so only the test-only EnableAllowConflicts gets there. Raised by @factory-droid on #8656. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
torcolvin
force-pushed
the
CBG-5715-08-defaults-and-bounds
branch
from
August 24, 2026 20:50
c6ce9ed to
73c053a
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
CBG-5715
Split out of #8589 — stack 8/9, based on #8655.
javascript_timeout_secsdocumented a default of 60, butbase.DefaultJavascriptTimeoutSecsis 0 (uncapped) —base/constants.go:148.revs_limitdocumentedminimum: 0, which config validation rejects ("must be greater than zero") —rest/config.go:943. Use 1, and note the higher floor and different default that apply whenallow_conflictsis enabled (rest/config.go:938requires >= 20;db/database.go:66-67defaults 50 vs 100).max_agedocumented a default of 6. Unlike the other loggers it does not derive its default fromminAge; it uses the fixedstatsDefaultMaxAgeOverrideof 90 —base/logging_config.go:36.The error/warn/info/debug/trace and audit
max_agedefaults were checked against theirminAgeconstants and are correct, so they are left alone.Pre-review checklist
docs/api🤖 Generated with Claude Code