feat(protocol,lifecycle): 6-task sprint — hooks, proto schema, drain, tracking, tests - #44
Merged
4 commits merged intoApr 9, 2026
Merged
4 commits merged into
4 commits merged into
Conversation
Release v0.14.21: - Redis Cacher production-ready (start/stop lifecycle, 16 integration tests) - seq/instanceID heartbeat checks (Node.js parity) - 10 audit findings fixed (3 CRITICAL: instanceID persistence, payload guard, logger fallback + 4 HIGH + 3 MEDIUM) Evidence: 2374 tests, 28/28 demo matrix, 90/90 comprehensive, mypy 0. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Version: 0.14.21 (supersedes 0.14.20) CHANGELOG: both 0.14.20 and 0.14.21 entries preserved Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Release v0.14.21 — Redis Cacher + seq/instanceID heartbeat + audit fixes
…rallel Sprint executed via TeamCreate with 6 teammates coordinated by team-lead. Node.js parity fixes for protocol + graceful lifecycle. ## Tasks completed 1. **Broker hook rename with aliases** (hook-renamer) - middleware/base.py: added short aliases starting/started/stopping - broker.py: _call_middleware_hooks invokes both long + short names - Backward compatible — existing broker_* middleware works unchanged - Skipped `stopped` alias due to collision with existing no-arg cleanup hook 2. **PacketHeartbeat proto schema extension** (proto-extender) - serializers/proto/packets.proto: added fields 4-7 (seq, instanceID, memory, cpuSeq) - Regenerated packets_pb2.py - protobuf.py: _HEARTBEAT_MAX_FIELDS 4 → 8 - ADR-heartbeat-schema.md documenting the decision - Wire-compatible with Node.js (ignores unknown fields) 3. **TrackingConfig in Settings** (tracking-configurator) - settings.py: TrackingConfig dataclass (enabled=False, shutdown_timeout=5.0s) - Validation in Settings._validate() - Exported via moleculerpy/__init__.py 4. **Connection drain on broker stop** (connection-drainer) - transit.py: send_disconnect_info() broadcasts INFO(services=[]) before disconnect - broker.stop(): calls send_disconnect_info() BEFORE transit.disconnect() - Matches Node.js service-broker.js:531-539 pattern - e2e test with 2 memory brokers verifies remote node drops math.add before DISCONNECT 5. **ContextTracker auto-registration** (tracker-integrator) - broker.py __init__: auto-append ContextTrackerMiddleware if settings.tracking.enabled - Converts float seconds → int ms for middleware - e2e test: slow action in-flight, stop() waits for completion 6. **Protocol lifecycle test suite** (test-author) - tests/unit/protocol_lifecycle_test.py (12 tests, ~270 LOC) - System-level integration tests for all 5 changes above ## Evidence - ruff format + check: clean - mypy --strict: 0 errors - pytest: **2396 passed** (2378 baseline + 18 new) - demo_matrix: 28/28 OK - demo_comprehensive: 90/90 OK Refs: Protocol gap audit report Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Executed as parallel sprint via TeamCreate (6 teammates + team-lead). All 6 tasks completed with no conflicts thanks to careful file ownership planning.
Tasks
Protocol compliance improvements
started/stoppingnow works with MoleculerPyEvidence
Test plan
🤖 Generated with Claude Code