This repository was archived by the owner on Dec 12, 2025. It is now read-only.
Sprint 4.5 — Envelope Transport Migration & IPC Hardening (Bedrock) #66
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.
This PR implements the Bedrock side of Sprint 4.5, completing the migration to the new envelope-based Palantir transport protocol and hardening the IPC path shared with Phoenix.
Key Improvements
Envelope-Based Transport
• Replaced legacy [length][type][payload] framing with:
[4-byte length][serialized MessageEnvelope]
• Added envelope helpers:
• extractMessage()
• makeEnvelope()
• parseEnvelope()
• Removed all legacy framing logic.
Deadlock Elimination & Transport Safety
• Major refactor of parseIncomingData():
• Lock scope narrowed to buffer-only operations
• Dispatch occurs outside mutex
• Removed locking from sendMessage()
• Eliminated two critical deadlocks in the PalantirServer read/write path.
Integration Test Harness
• Added complete in-process integration harness:
• IntegrationTestServerFixture
• IntegrationTestClient
• Added end-to-end integration tests:
• Capabilities RPC — PASS
• XY Sine RPC — PASS
Documentation & Versioning
• Added IPC protocol spec
• Added integration harness docs
• Added XY Sine integration doc
• Updated Bedrock CHANGELOG with Sprint 4.5 entry
⸻
Breaking Change
Phoenix must be upgraded alongside Bedrock.
⸻
Tests
• Envelope helper tests: PASS (except known ASAN false positive)
• Integration tests:
• Capabilities: PASS
• XY Sine: PASS
• No deadlocks or hangs after refactor.