feat(constructs): derive response time limits from account features - #1425
Merged
Conversation
The response time limit caps for TCP, API and URL checks are hardcoded, so an account entitled to higher limits still has its checks rejected locally before the request reaches the API. Read the account's client-visible feature flags: entitled accounts skip the client-side cap entirely, deferring to the API, which owns the actual limit and can change it without a CLI release. The account is already fetched to validate credentials, so no additional request is made. Standard limits apply when the flags are absent, which keeps older and self-hosted deployments working.
pelzerim
force-pushed
the
feat/account-aware-response-time-limits
branch
from
July 30, 2026 07:09
a62c5ba to
d99cddc
Compare
sorccu
approved these changes
Jul 31, 2026
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.
Affected Components
Notes for the Reviewer
The response time limit caps in
TcpMonitor,ApiCheckandUrlMonitorare hardcoded — 5s for TCP, 30s for API and URL monitors. Those are the right defaults, but they aren't universal: an account can be entitled to higher limits, and for those accounts the CLI rejects a value the API would happily accept. Validation fails locally, so there's no way to work around it short of not using the CLI.This reads the account's client-visible feature flags.
AuthCommandalready fetches the account to validate credentials, so there's no additional request — it just hands the flags toSession, where constructs can reach them during validation.Entitled accounts skip the client-side cap entirely rather than getting a higher hardcoded one — the API owns the actual limit and can change it without a CLI release. The
degradedResponseTime <= maxResponseTimeconsistency check still applies.When the flags are absent — an older API, or a self-hosted deployment — the standard limits apply exactly as before. The API remains authoritative either way; this only changes how early the CLI reports a value it expects to be rejected.
Requires the account endpoint to return
features, which is additive and safely ignored when missing.