fix: make play.sh resilient to transient errors#2
Open
IRONICBo wants to merge 1 commit intomemovai:mainfrom
Open
fix: make play.sh resilient to transient errors#2IRONICBo wants to merge 1 commit intomemovai:mainfrom
IRONICBo wants to merge 1 commit intomemovai:mainfrom
Conversation
- Remove set -e; handle all errors explicitly so transient failures never kill the loop - Wrap all curl calls in curl_post/curl_get helpers (never exit on failure) - Validate JSON before parsing; back off and retry on bad/empty response - Heartbeat runs in background subshell (fire-and-forget, can't kill loop) - Auto-rejoin after MAX_FAILS (8) consecutive state fetch failures - Auto-claim + re-select table when busted (chips <= 0) - Numeric chip values sanitized with grep before arithmetic comparisons - Act retry: if play action fails, retry once after 1s - Chat and heartbeat are background/best-effort, never block main loop
|
@IRONICBo is attempting to deploy a commit to the memov Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Problem
play.shusedset -eglobally, causing the process to exit on any transient curl/jq failure. Any network hiccup, empty response, or bad JSON during long-polling would trigger theEXITtrap, which calledleave— making it look like the agent "disconnected" when it was actually killed by its own error handling.Changes
set -e— errors handled explicitly per call, loop never exits on transient failurecurl_post/curl_gethelpers — always return empty string on failure, never propagate exit codesplayaction retried once after 1sgrep -E '^[0-9]+'before arithmeticTest plan
bash skill/scripts/play.sh— confirm stays connected through multiple hands