Commit Graph
6 Commits
Author SHA1 Message Date
glm-5.3-flash 4a557a0453 fix(client): drop unused import/ctor, needless ? (clippy -D warnings) 2026-08-29 08:23:56 +00:00
glm-5.3-flash b1529dd195 style(client): cargo fmt 2026-08-29 08:22:10 +00:00
glm-5.3-flash 015b2417b9 fix(client): redirect/retry policy hardening + timeouts (FWD-03..05, 09, 11)
- same-host redirect policy (scheme+host+port), cross-host redirects
  surface the 302 untouched - API-key/default headers cannot cross hosts
- retries gated to idempotent methods only (GET/HEAD/PUT/DELETE/OPTIONS);
  POST/PATCH/CONNECT/TRACE bypass the retry middleware entirely
- retry backoff jittered (Bounded) with tightened bounds [100ms, 2s] and
  a wall-clock budget (TotalRetryBudget, default 10s) on top of the count
- default request 30s / connect 10s / read 30s timeouts (gateway 30s
  deadline anchor); Retry-After ceiling 300s, configurable
- Retry-After recorded against the effective (post-redirect) URL;
  eviction prefers expired entries, then the farthest-future deadline;
  wake jittered (25% of remaining, capped 2s) to break the thundering herd
- reload() is async (tokio::fs); new() documented as one-shot blocking

verification: cargo test --lib client:: 36 passed; clippy/fmt applied
2026-08-29 08:21:42 +00:00
glm-5.3-flash 0c1de05f85 feat(client): shared reqwest client host with retry stack and Retry-After
- src/client/http_client.rs: SharedHttpClient (ArcSwap rebuild-and-swap
  hot-reload), HttpClientConfig/ClientCertConfig, HttpClientBuildError
- src/client/retry_after.rs: inlined RetryAfterMiddleware — 429/503
  Retry-After (seconds + HTTP-date), bounded URL->deadline storage with
  earliest-deadline eviction, sleep-before-next-request
- middleware stack: RetryTransientMiddleware (exponential backoff) +
  RetryAfterMiddleware; credentials stay per-request via
  OperationContext.capabilities (no env reads)
- applied poisoned-lock recovery convention (into_inner)

Verified: cargo test (95 lib tests), clippy -D warnings, fmt.
2026-08-28 08:33:26 +00:00
glm-5.3-flash 320ea87b08 docs: port architecture specs and ADRs from alknet-http; write new alkhttp ADRs 067-070
Phase 1 (SDD) — architecture documentation:

Ported specs (adapted for alkcall, producer/consumer terms, 6-endpoint
gateway, channels-over-WS, Sub/Pub operation types):
- overview.md, http-server.md, http-adapters.md, http-mcp.md
- README.md index (rewritten for alkhttp)

New ADRs:
- 067: WebSocket carries the channels protocol (8-byte chunk demux,
  channel 0 = alk/call, upgrade path /alk/channels)
- 068: gateway /publish endpoint for Pub operations (NDJSON body)
- 069: WebTransport out of scope in alkhttp (alknet concern)
- 070: from_wss consumer adapter (wss feature, tokio-tungstenite)

Ported ADRs (25, same numbers, port notes + amendments where the
extraction changed facts): 001-004, 010, 014, 015, 017, 022, 023, 027,
034, 036, 037, 039, 041, 042, 044, 045, 046, 047, 048, 049, 051, 066.

websocket.md rewritten for the channels session; open-questions.md
seeded (OQ-01 WS byte-stream adapter, OQ-02 /publish framing,
OQ-03 from_wss reconnect, OQ-04 browser client ownership).

Verified: cargo test, clippy -D warnings, fmt, doc --no-deps.
2026-08-27 14:19:24 +00:00
glm-5.3-flash 28c521b2f3 feat: scaffold crate with alkcall 0.1.1 dependency
Empty module tree (adapters, client, gateway, server, websocket) matching
the AGENTS.md subsystem map. Features: h2/http1 (default), mcp (rmcp),
wss (tokio-tungstenite, for the from_wss consumer adapter).

Verified: cargo check (default), cargo check --all-features.
2026-08-27 12:50:43 +00:00