fix: avoid loop deadlock when bridge is disabled#232
Closed
firstdraft-work wants to merge 1 commit intoEvoMap:mainfrom
Closed
fix: avoid loop deadlock when bridge is disabled#232firstdraft-work wants to merge 1 commit intoEvoMap:mainfrom
firstdraft-work wants to merge 1 commit intoEvoMap:mainfrom
Conversation
Collaborator
|
Thank you @firstdraft-work for this contribution! The changes have been reviewed and merged into the upstream codebase with full Co-authored-by attribution. Your improvement will be included in the next public release. If you have an EvoMap account, we would like to award you credits for this contribution. Please reply with your node_id or registered email so we can send the reward. Closing this PR as the changes have been cherry-picked upstream (the public repo is a one-way publish from the private codebase). Thanks again! |
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
Prevent
node index.js --loopfrom getting stuck forever whenEVOLVE_BRIDGE=false.Problem
--loopmode forcesEVOLVE_BRIDGE=false, but it still uses thelast_run/last_solidifygating logic.In non-bridge mode,
evolve.run()does not automatically runsolidify. It only prints the prompt and expects a manualnode index.js solidify.That means loop mode can:
last_runlast_solidifyunsetThe daemon stays alive, but it stops making progress.
Fix
After a loop cycle finishes, if bridge is disabled and the run still left a pending solidify state, automatically reject that pending run:
last_solidifyfor the samerun_idWhy this approach
The current loop contract already disables bridge mode. Given that behavior, loop mode should not leave behind a state that requires a manual solidify step the daemon will never perform itself.
This keeps internal daemon mode moving forward without changing the existing bridge/non-bridge split.
Validation
git diff --checknode -e "require('./index.js')"