feat(relay): apply endpoint-level relayPolicy overrides across account and search flows
This commit is contained in:
@@ -1300,3 +1300,40 @@ Validation:
|
||||
Follow-ups:
|
||||
|
||||
- Future non-GET relay adoption should explicitly opt in/out per route using `relayPolicy` and include targeted negative-path tests.
|
||||
|
||||
---
|
||||
|
||||
### CL-035: TASK22242 apply relayPolicy overrides across broader endpoint cluster
|
||||
|
||||
date: 2026-03-24
|
||||
author: Cline
|
||||
scope: `pages/api/endpoint/{getaccounts_api,getemailaccountcheck_api,getpreferredlanguage_api,getpersonalaccount_api,getlogin_api,getbasicsearch_api,getbasicsearchpaged_api,getadvancedsearch_api,getadvancedsearchpaged_api}.js`, `tests/phase21/endpoint-handler-contract.test.cjs`
|
||||
type: change
|
||||
rationale: Expand practical adoption of per-endpoint relay policy tuning so high-traffic account/login/search handlers explicitly declare timeout/retry posture rather than relying only on global defaults.
|
||||
impact: Better operational control and predictable retry behavior per endpoint cluster, with no API contract changes.
|
||||
status: completed
|
||||
|
||||
Summary:
|
||||
|
||||
- Added explicit `relayPolicy` usage to a broader endpoint set:
|
||||
- account/login: `getaccounts`, `getemailaccountcheck`, `getpreferredlanguage`, `getpersonalaccount`, `getlogin`
|
||||
- search: `getbasicsearch`, `getbasicsearchpaged`, `getadvancedsearch`, `getadvancedsearchpaged`
|
||||
- Applied conservative policy profiles by flow:
|
||||
- login endpoint (`getlogin`): no retries (`maxRetries: 0`) and tighter timeout
|
||||
- account lookup endpoints: low retry posture (`maxRetries: 1`)
|
||||
- search endpoints: bounded retry posture (`maxRetries: 2`) for transient resilience
|
||||
- Kept method explicit as `GET` in policy for clarity and future-proofing.
|
||||
- Extended phase21 endpoint tests with relayPolicy propagation assertions:
|
||||
- `getaccounts` relayPolicy pass-through
|
||||
- `getlogin` strict relayPolicy pass-through
|
||||
- `getbasicsearchpaged` relayPolicy pass-through
|
||||
|
||||
Validation:
|
||||
|
||||
- `node tests/phase21/endpoint-handler-contract.test.cjs` -> pass (155/155)
|
||||
- `node tests/phase21/relay-forwarding-hardening.test.cjs` -> pass (10/10)
|
||||
- `npm run lint` -> warnings only (pre-existing `react-hooks/exhaustive-deps`; no new lint errors)
|
||||
|
||||
Follow-ups:
|
||||
|
||||
- Optional next slice: apply relayPolicy declarations to remaining relayGet endpoints in coherent batches (portal module/documents/DNS groups) and standardize policy presets in one shared constants module.
|
||||
|
||||
Reference in New Issue
Block a user