fix: register shareman recovery interface in ActiveContext#7244
fix: register shareman recovery interface in ActiveContext#7244PastaPastaPasta merged 1 commit intodashpay:developfrom
Conversation
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Walkthrough
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
coverage-report-summary.md (1)
123-125: Use portable paths in reproduction instructions.Line 124 hardcodes a local path (
~/Projects/dash/worktrees/coverage), which won’t work for most contributors. Prefer a placeholder or repo-relative instruction.Suggested doc tweak
- cd ~/Projects/dash/worktrees/coverage + # From your local Dash checkout/worktree: + cd <path-to-dash-worktree>/worktrees/coverage🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@coverage-report-summary.md` around lines 123 - 125, Replace the hardcoded local path string "~/Projects/dash/worktrees/coverage" in coverage-report-summary.md with a portable, repo-relative instruction; e.g., tell readers to change to the repository root and then to the worktrees/coverage directory or use a placeholder like "<repo-root>/worktrees/coverage" so contributors can reproduce the steps on any machine.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@coverage-report-summary.md`:
- Around line 123-125: Replace the hardcoded local path string
"~/Projects/dash/worktrees/coverage" in coverage-report-summary.md with a
portable, repo-relative instruction; e.g., tell readers to change to the
repository root and then to the worktrees/coverage directory or use a
placeholder like "<repo-root>/worktrees/coverage" so contributors can reproduce
the steps on any machine.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 4ba6a3e5-c7ad-4c03-a0fc-062383124ddb
📒 Files selected for processing (2)
coverage-report-summary.mdsrc/active/context.cpp
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Clean 2-line wiring fix that correctly adds the missing RegisterRecoveryInterface()/UnregisterRecoveryInterface() calls for shareman in ActiveContext::Start()/Stop(). The fix matches the existing cl_signer/is_signer pattern and Stop() ordering is correctly reversed (LIFO). Both Claude and Codex confirmed the fix is correct with no blocking issues.
Reviewed commit: 06110b9
💬 1 nitpick(s)
| cl_signer->Start(); | ||
| cl_signer->RegisterRecoveryInterface(); | ||
| is_signer->RegisterRecoveryInterface(); | ||
| shareman->RegisterRecoveryInterface(); |
There was a problem hiding this comment.
💬 Nitpick: Registration inconsistency: external wiring vs self-contained constructor
CEHFSignalsHandler self-registers as a CRecoveredSigsListener in its constructor (ehf_signals.cpp:28) and unregisters in its destructor (ehf_signals.cpp:33), making it impossible to forget. In contrast, shareman, cl_signer, and is_signer rely on ActiveContext::Start()/Stop() to call RegisterRecoveryInterface() externally — which is exactly how this bug was introduced. Moving registration into each object's constructor/destructor (or its own Start()/Stop()) would prevent this class of bug. Not blocking for this PR.
source: ['claude']
Add missing shareman->RegisterRecoveryInterface() call in ActiveContext::Start() and corresponding UnregisterRecoveryInterface() in Stop(). Without this, completed sig share sessions are only cleaned up via the 5-second Cleanup() interval instead of promptly via HandleNewRecoveredSig. Under CI load with frozen mocktime, this manifests as flaky test failures in feature_llmq_signing.py and interface_zmq_dash.py. The registration was likely dropped during the sig share refactoring that split share management into a separate shareman object. Closes dashpay#7243
06110b9 to
5506d0a
Compare
Summary
Add missing
shareman->RegisterRecoveryInterface()call inActiveContext::Start()and correspondingUnregisterRecoveryInterface()inStop().Problem
ActiveContext::Start()registers recovery interfaces forcl_signerandis_signerbut notshareman. Without this, completed sig share sessions are only cleaned up via the 5-secondCleanup()interval instead of promptly viaHandleNewRecoveredSig.Under CI load with frozen mocktime, this manifests as flaky test failures in
feature_llmq_signing.pyandinterface_zmq_dash.pywhere InstantSend locks don't arrive within expected timeouts.Root Cause
The registration was likely dropped during the sig share refactoring that split share management into a separate
sharemanobject. Thecl_signerandis_signerregistrations survived butsharemanwas missed.Fix
Two lines:
shareman->RegisterRecoveryInterface()inStart()(afteris_signer)shareman->UnregisterRecoveryInterface()inStop()(beforeis_signer, maintaining reverse order)Validation
CSigSharesManagerdeclares bothRegisterRecoveryInterface()andUnregisterRecoveryInterface()insrc/llmq/signing_shares.hsharemanis aunique_ptr<CSigSharesManager>inActiveContextStop()unregisters in reverse order ofStart()registration (LIFO)Closes #7243