Priority: P1
Problem
Diagnostics endpoint limits are copied without validation. Negative, non-finite, or fractional values reach slice and message truncation, making bounded output unreliable.
Evidence
packages/transports-http/src/libs/operationalEndpoints.ts:49-63 accepts recentErrorLimit and messageLimit.
- Lines 121-140 copy the values into policy without validation.
- Lines 184 and 233-243 consume them in
slice and message capping.
Desired outcome
Operational diagnostics have explicit, safe output bounds.
Implementation path
- Validate a finite nonnegative error count and finite positive message limit.
- Return a stable configuration Problem before exposing the endpoint.
- Test negative, NaN, Infinity, fractional, and normal options.
Acceptance criteria
- Invalid limits are rejected before requests are served.
- Valid limits cap error entries and messages predictably.
- Error messaging identifies the invalid option.
Validation
pnpm --filter @croco/transports-http test
Scope boundaries
Does not change timeout configuration covered by existing health work.
Priority: P1
Problem
Diagnostics endpoint limits are copied without validation. Negative, non-finite, or fractional values reach
sliceand message truncation, making bounded output unreliable.Evidence
packages/transports-http/src/libs/operationalEndpoints.ts:49-63acceptsrecentErrorLimitandmessageLimit.sliceand message capping.Desired outcome
Operational diagnostics have explicit, safe output bounds.
Implementation path
Acceptance criteria
Validation
pnpm --filter @croco/transports-http testScope boundaries
Does not change timeout configuration covered by existing health work.