Verified comprehensive test infrastructure already exists in proxy/helpers_test.go:
- MockUpstream with configurable scenarios
- Test mode configuration (TestModeEnv, TestMaxRetriesEnv)
- Request builders and response assertions
- Proxy handler factory and execution helpers
- All helper tests pass successfully
No code changes needed - infrastructure is complete and functional.
Co-Authored-By: Claude <noreply@anthropic.com>
Add NewAdaptiveRateLimiterWithWindow constructor for test-only refactor:
- Production code uses NewAdaptiveRateLimiter with default 30s window
- Tests can inject shorter durations (e.g., 100ms) for fast execution
- No behavior changes to production rate limiting logic
Acceptance criteria:
- NewAdaptiveRateLimiterWithWindow accepts configurable window duration
- Production callers continue using default 30s window
- Tests can inject millisecond-scale windows for fast iteration
- No changes to rate limiting logic or defaults
Co-Authored-By: Claude <noreply@anthropic.com>
- Document all 5 API endpoints: /healthz, /api/config, /api/status, /api/metrics, /api/events
- Include request parameters, response schemas, and example curl commands
- Document SSE event types and format with code examples in JavaScript and Go
- Add data retention policies, CORS information, and browser usage guidance
- Link to related documentation
Co-Authored-By: Claude <noreply@anthropic.com>
Bead-Id: bf-4rx