- Refactor the Go proxy for dependency injection: every proxy server, the bootstrap, the signal handler, the load balancers, and AMF0 now accept functional-option seams (factories/closures) so tests can inject fakes without binding real sockets, talking to real Redis, or racing on package globals. - Drop the package-global `lb.SrsLoadBalancer`. The bootstrap creates the LB locally and threads it through every proxy server constructor. Two old global indirections in `internal/signal` and `internal/rtmp/amf0` are likewise replaced by per-instance fields. - Rename `internal/server` → `internal/proxy` and rename the `lb` public surface for clarity: `SRSLoadBalancer` is split into `OriginService` / `HLSService` / `RTCService` and recomposed as `OriginLoadBalancer`; `SRSServer` → `OriginServer`; all proxy server types gain a `Proxy` qualifier (e.g. `RTMPServer` → `RTMPProxyServer`). - Extract the Redis client behind a new `internal/redisclient` package with a minimal `RedisClient` interface and a counterfeiter fake. - Add counterfeiter fakes (`proxyfakes`, `lbfakes`, `redisclientfakes`) and ~7.5k lines of unit tests covering bootstrap, memory + Redis LBs, all five proxy servers, the signal handler, and AMF0. - Add two new E2E flows — `proxy-e2e-srt-test.sh` (SRT publish through proxy, verify SRT/RTMP/HTTP-FLV/HLS playback) and `proxy-e2e-whip-test.sh` (WHIP publish, verify RTMP/HTTP-FLV/HLS via origin `rtc_to_rtmp`) — plus `setup-ffmpeg-with-whip.sh`, a macOS builder for an ffmpeg with openssl-DTLS WHIP and SRT support that the two scripts auto-invoke when needed. - Workspace reorg: move `memory/` and `skills/` to the repo root so all agent tools (Claude / Codex / Kiro / OpenClaw) share one source of truth via symlinks. Sync `docs/proxy/proxy-load-balancer.md` and `memory/srs-codebase-map.md` with the new names. No protocol, log, HTTP API, or wire-format changes. Refactor only — all externally observable proxy behavior is unchanged. --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
28 lines
1.3 KiB
Markdown
28 lines
1.3 KiB
Markdown
# 2026-02-06 — Daily Log
|
|
|
|
## Commit Convention
|
|
- Commit titles in this workspace should start with: `OpenClaw:`
|
|
|
|
## Why Build an AI Knowledge Base for SRS
|
|
|
|
William explained the three layers needed for AI to effectively work on SRS:
|
|
|
|
1. **Knowledge base** — Existing docs are written for humans, not AI. Without structured memory, AI can read code and docs but miss the *why* — the background, design thinking, architecture rationale. The knowledge base is built specifically so AI can truly understand SRS.
|
|
|
|
2. **Code structure** — The codebase needs to be refined so AI can verify each change. Testable, checkable, AI-friendly structure.
|
|
|
|
3. **Code taste** — AI should follow the style and conventions of the existing code. (Nice to have, not strictly required for SRS.)
|
|
|
|
## Session: Learning SRS Fundamentals
|
|
|
|
- William started teaching me about SRS
|
|
- Covered: what SRS is, publisher/player workflow, protocols, ecosystem tools
|
|
- Discussed memory organization — decided on dedicated knowledge files instead of putting everything in MEMORY.md
|
|
- Created `memory/srs-overview.md` for SRS fundamentals
|
|
|
|
## Memory Structure Decision
|
|
|
|
- `MEMORY.md` → small, always loaded, high-level pointers
|
|
- `memory/srs-*.md` → detailed SRS knowledge, accessed via memory_search
|
|
- `memory/YYYY-MM-DD.md` → daily conversation logs
|