Skip to content

Conversation

@acul71
Copy link
Contributor

@acul71 acul71 commented Feb 11, 2026

Continuation of closed PR #915

This PR continues the health monitoring work from closed PR #915. Full credit to @bomanaps for the original implementation.

The author (bomanaps) implemented the modifications requested by @pacrob in her last commits but did not reply in the PR chat, so the review threads remained unresolved. This PR addresses those four points in code and docs:

  1. ConnectionConfig merge (libp2p/init.py)
    The list of attributes copied when merging connection_config into quic_transport_opt is now derived from dataclasses.fields(ConnectionConfig), so new fields (including critical_health_threshold) are never missed.

  2. critical_health_threshold
    Documented in a code comment that all ConnectionConfig attributes are merged when both configs are provided.

  3. Docs
    No "API consistency fixed!"-style artifact found; left as-is.

  4. Doc snippet clarity
    Added a sentence before the first "Basic Setup" code block stating that the following is a snippet and that the full runnable script is in examples/health_monitoring/basic_example.py.

Branch feature/health-monitoring is pushed to acul71/py-libp2p-fork and is ready for review.

Made with Cursor

bomanaps and others added 30 commits January 6, 2026 06:18
- Merge health monitoring methods with identify coordination methods
- Add missing imports (trio, weakref, protocol IDs, QUICConnection, etc.)
- Add _IdentifyNotifee class and protocol caching constants
- Update __init__ with identify coordination initialization and timeout detection
- Add helper methods: _detect_negotiate_timeout_from_transport, _schedule_identify, etc.
- Preserve all health monitoring functionality from PR branch
- All tests pass (1763), linting and type checking pass
Resolves merge conflict in docs/examples.rst by including both:
- TLS and AutoTLS example entries from main
- Health monitoring example entries from this branch

Co-authored-by: Cursor <cursoragent@cursor.com>
…c snippet clarity

- Derive connection_config_attrs from dataclasses.fields(ConnectionConfig) so
  new fields (including critical_health_threshold) are never missed when
  merging connection_config into quic_transport_opt.
- Add comment that all ConnectionConfig attributes are merged when both
  configs are provided.
- Add snippet clarification before first code block in connection health
  monitoring docs; point to examples/health_monitoring/basic_example.py.

Continues work from closed PR libp2p#915 (health monitoring). Credits bomanaps.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants