Commit graph

5 commits

Author SHA1 Message Date
jedarden
de0320d23d docs(bf-3zp): verify test infrastructure for mock upstream server
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>
2026-07-02 14:42:20 -04:00
jedarden
ee39121cd9 test(ratelimiter): make AdaptiveRateLimiter testable via window duration injection
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>
2026-07-02 10:55:06 -04:00
jedarden
c3289efcf9 docs(dashboard): enhance API reference with SSE implementation details and storage backend specs
- Add detailed SSE connection behavior and slow client detection
- Add server-side implementation details (broadcast hub, client management)
- Add automatic operations section (downsampling, cleanup, WAL mode)
- Add storage backend details (database, write strategy, query strategy)
- Fix retention period for metrics_5s (24h, not 6h)

Co-Authored-By: Claude <noreply@anthropic.com>
Bead-Id: bf-4rx
2026-06-21 10:32:03 -04:00
jedarden
19e6e9c959 docs(dashboard): add comprehensive API reference documentation
- 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
2026-06-21 09:59:26 -04:00
jedarden
e7c24a0c08 feat: initial zai-proxy ecosystem repo
Extracted from ardenone-cluster/containers/zai-proxy and
ardenone-cluster/containers/zai-proxy-dashboard.

- proxy/: OpenAI-compatible ZAI reverse proxy (Go, v1.10.0)
  - Token counting, rate limiting, Prometheus metrics, canary support
- dashboard/: Metrics dashboard backend + React frontend (Go, v1.0.0)
  - Prometheus collector, SQLite storage, SSE live updates
- docs/: Operational notes, research, and plan subdirs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 15:53:52 -04:00