mirror of
https://github.com/logos-co/logos-protocol.git
synced 2026-09-02 06:51:14 +00:00
fix/plain-completion-sub-lifetime (#45) gained a second commit — ensureCompletionSub() now serializes concurrent first callers instead of letting them past a raised flag. This branch is stacked on it and rewrites the same function, so it takes the fix in rather than silently reverting it when #46 merges. Merged rather than rebased: #46 is already pushed and its review comments are anchored to those commits. Conflicts, all three in the code #45 touched: * ensureCompletionSub() — kept #46's CallState (m_state) as the block the handler holds, with #45's call_once + release/acquire fast path around it, and #45's subscribeToCompletions() split; * the member block — m_state (#46) plus m_completionSubscribed as an atomic and m_completionSubOnce (#45), replacing the plain mutex-guarded bool; * tests/protocol/CMakeLists.txt — one LOGOS_PROTOCOL_DETECTOR_INVERSIONS option carrying all three inversions (BREAK_ONCE, BREAK_DEADLINE_ISOLATION, BREAK_SUB_ORDER) instead of one from each side. Resulting tree is identical to the rebase of this branch onto #45, which is what was actually built and tested: 302/302, and six tests red under the inverted build. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>