Skip to content

feat(constructs): derive response time limits from account features - #1425

Merged
sorccu merged 2 commits into
mainfrom
feat/account-aware-response-time-limits
Jul 31, 2026
Merged

feat(constructs): derive response time limits from account features#1425
sorccu merged 2 commits into
mainfrom
feat/account-aware-response-time-limits

Conversation

@pelzerim

@pelzerim pelzerim commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Affected Components

  • CLI

Notes for the Reviewer

The response time limit caps in TcpMonitor, ApiCheck and UrlMonitor are 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. AuthCommand already fetches the account to validate credentials, so there's no additional request — it just hands the flags to Session, 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 <= maxResponseTime consistency 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.

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
pelzerim force-pushed the feat/account-aware-response-time-limits branch from a62c5ba to d99cddc Compare July 30, 2026 07:09
@pelzerim
pelzerim requested a review from sorccu July 30, 2026 08:38
@sorccu
sorccu merged commit e31e96c into main Jul 31, 2026
16 checks passed
@sorccu
sorccu deleted the feat/account-aware-response-time-limits branch July 31, 2026 16:08
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