docs(net): record net-ws resilience refinements (ADR-0033/0034)#80
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughTwo ADRs add append-only amendments dated 2026-07-04. ADR-0033 records seven WebSocket resilience refinements, and ADR-0034 records the per-transport ChangesADR amendments
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/adr/0033-websocket-resilience-reconnect-actor-watch-lifecycle.md`:
- Around line 416-433: Resolve the inconsistency in the `WsConfig` construction
section by making it explicit whether `build()` is fallible or not. The current
wording conflicts between “stack()/build() stay config-infallible” and `build()
-> Result<WsConfig, WsConfigError>`; update the prose around `WsConfig`,
`build()`, and `WsConfigError` so validation flow is unambiguous and
implementers know exactly where construction-time checks happen. Keep `stack()`
described separately as infallible if that is intended, and align every sentence
in this subsection to the same lifecycle.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b2441e1e-4834-4173-a8a5-cda7057bbcff
📒 Files selected for processing (2)
docs/adr/0033-websocket-resilience-reconnect-actor-watch-lifecycle.mddocs/adr/0034-http-construction-surface-auth-guarded-boot-coverage.md
Entry 3 overloaded build() — the config builder (WsConfig::builder().build(), fallible) vs the §9 stack factory (stack()/build(), config-infallible). Name them distinctly so the validation flow is unambiguous. Addresses CodeRabbit review on #80. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Append-only amendments from a design-review pass over the landed WS stack (ADR-0032 contract #65, ADR-0033 resilience); decision text unchanged, code lands with its slice. Closes #79. - ADR-0033 Amendments (2026-07-04), seven entries: Spawn seam (return-free, cooperative shutdown); WsControl/ReconnectTrigger split; WsConfig two-tier validation; Classify seam over &WsError (+ corrects the section 7 permanent- cases parenthetical); orthogonal exhausted field; tracing-events edge feed with a non-blocking-subscriber constraint; MockSpawn home. - ADR-0034 amendment 5: AuthSource is two per-transport traits (Request<Bytes>/ HttpError vs Request<()>/WsError), not one identical Parts-based trait. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Entry 3 overloaded build() — the config builder (WsConfig::builder().build(), fallible) vs the §9 stack factory (stack()/build(), config-infallible). Name them distinctly so the validation flow is unambiguous. Addresses CodeRabbit review on #80. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fff6b8b to
5b656d5
Compare
Closes #79.
Append-only ADR amendments from a design-review pass over the landed WebSocket stack (ADR-0032 contract #65, ADR-0033 resilience). Decision text is untouched; each entry pins a construction-surface detail the ADR named but left open, or corrects a claim the shipped contract crate contradicts. Docs-only — no code, no dependency change; the code lands with each implementation slice.
ADR-0033 — new
## Amendments (2026-07-04), seven entriesSpawnseam — return-free, no trait'static(mirrorsTimer); cooperative shutdown (gracefulWsSink::close(self), notabortmid-poll), awaitable-confirmed and bounded so a dead socket can't wedge it.WsControlsplit — single-ownershutdown(self)+ cloneableReconnectTriggerfor backgroundforce_reconnect(§8 makes it timer/staleness-driven;Arc+shutdown(self)is a hard conflict).WsConfigvalidation —NonZero/Optiontier-1 (illegal states unrepresentable, "off" = absence),WsConfigErroronbuilder().build();stack()stays config-infallible (fullest form of §9's reduction).Classifyseam over&WsError— and corrects §7's parenthetical: onlyAuth → Permanentis default-catchable; protocol-version-reject isConnection-kinded →Transient, so its permanence is hook-only.max_attemptsexhaustion — orthogonal stickyexhaustedfield +#[non_exhaustive] LifecycleSnapshot, not aConnStatevariant (health axis vs. policy axis).tracingevents, not a channel — with a recorded non-blocking-subscriber constraint (else the flap-storm burst reintroduces the actor stall §5 rejected).MockSpawnhome —net-ws-mock(Spawnis WS-only);MockTimerstays single-homed innet-mock, un-re-exported.ADR-0034 — amendment 5
AuthSourceis two per-transport traits (Request<Bytes>/HttpErrorvsRequest<()>/WsError), not one "identical",Parts-based trait: HTTP body-signing (e.g. Binance HMAC) needs the whole request; the WS handshake is a bodyless GET. The shipped HTTP trait already abandonedParts; this records why and rejects both thePartsunification and a genericAuthSource<B>.The domain glossary is deliberately untouched — every term is implementation vocabulary, per both ADRs' Relationships sections.
Local
just cigreen (fmt, taplo, typos, clippy-D warnings, nextest, shellcheck pre-push).🤖 Generated with Claude Code
Summary by CodeRabbit