Add Bare agent suspend balance repro#124
Draft
coreymartin wants to merge 3 commits into
Draft
Conversation
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
Adds a Bare repro script for the agent suspend/resume balance behavior in
spark-bare-app, including explicitbare-http1/bare-httpsdependencies so the example resolves agent implementations that exposesuspend()andresume().The script now defaults to Nam's direct-await case:
await wallet.getBalance()directly while suspended, without wrapping that suspended balance call inPromise.raceThe earlier watchdog comparison flow is still available with
REPRO_MODE=race.Included captured logs:
repro-agent-suspend-balance-direct.log: direct suspendedgetBalance()rejects immediately withAGENT_SUSPENDED, then cleanup exits normally.repro-agent-suspend-balance-direct-no-cleanup.log: direct suspendedgetBalance()rejects immediately, but without cleanup the process remains alive on the background stream until the external timeout kills it.Findings
I was still not able to reproduce a foreground
getBalance()call hanging forever. With SDK TRACE logging enabled and noPromise.racearound the suspended balance call, the captured direct log shows BareHttpTransport failing request setup withAGENT_SUSPENDEDandgetBalance()rejecting in the same tick range.The process-liveness issue remains reproducible: the no-cleanup direct run prints
repro script completed, then continues receivingsubscribe_to_eventschunks until the external 45s timeout exits with code 124.Public
Adds a public Bare repro script and captured logs for agent suspend/resume balance behavior. No production SDK behavior is changed.
Validation
yarn install --immutableyarn workspace @buildonspark/spark-bare-app formattimeout 45 env WATCHDOG_MS=20000 NETWORK=MAINNET yarn workspace @buildonspark/spark-bare-app repro:agent-suspend-balancetimeout 45 env WATCHDOG_MS=20000 CLEANUP_CONNECTIONS=0 NETWORK=MAINNET yarn workspace @buildonspark/spark-bare-app repro:agent-suspend-balance