Repository navigation
Conversation
Co-authored-by: Joe Blau <[email protected]>
Remove exportPrivateKey and exportSeedPhrase DENY rules from Privy policy. These method names are not valid Privy policy methods and were causing policy creation to fail in the testnet lifecycle. Agent private key and seed phrase export are still protected by Privy's default deny behavior for unmatched methods. Co-authored-by: Joe Blau <[email protected]>
joeblau
marked this pull request as ready for review
October 19, 2026 14:30
Extract the actual error code and message from the CLI envelope response instead of throwing a generic 'Command failed' error. Co-authored-by: Joe Blau <[email protected]>
These are valid Privy policy method names according to the official documentation at https://docs.privy.io/controls/policies/overview. The improved error handling in the previous commit will now show the actual error message when the workflow runs next. Co-authored-by: Joe Blau <[email protected]>
- Improve error messages in submitApproval to include the action type (approveAgent or approveBuilderFee) and the raw Hyperliquid response - Add masterAddress to the lifecycle report for troubleshooting - This will reveal whether the wallet needs funding on testnet Co-authored-by: Joe Blau <[email protected]>
This branch had an error being deployed
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
Improving error handling to diagnose and fix the testnet lifecycle failure at the
init-agent-and-builder-approvalsstage.Diagnosis: Unfunded Testnet Wallet
Based on the error
[UPSTREAM_ERROR] Approval failedand investigation of Hyperliquid documentation, the root cause is:The master wallet (
AGENT_CLI_TEST_MASTER_KEY) has never deposited on Hyperliquid testnet.Hyperliquid returns "Must deposit before performing actions" when a wallet with no balance attempts
approveAgentorapproveBuilderFeeactions.Changes Made
Commit 1-3: Error handling improvements
catch {}block to capture errors in lifecycle reportexportPrivateKey/exportSeedPhraseare valid policy methods per Privy docsCommit 4: Surface Hyperliquid approval errors (086f717)
submitApproval()to include:approveAgentorapproveBuilderFee)masterAddressto lifecycle report for troubleshootingNext Workflow Run Will Show
With these improvements, the next run will display:
And
lifecycle-report.jsonwill contain:{ "masterAddress": "0x...", "error": { "stage": "init-agent-and-builder-approvals", "message": "[UPSTREAM_ERROR] approveAgent failed: Must deposit before performing actions" } }Human Step Required
The
AGENT_CLI_TEST_MASTER_KEYwallet needs to be funded on Hyperliquid testnet.Steps:
Trigger the workflow to get the master address from
lifecycle-report.json:Download the artifact after the run completes:
Get the master address from the report:
Fund the wallet with mock USDC:
Re-run the workflow - it should now pass the approval stage
Why This Is Needed
From Hyperliquid GitHub issue #9 and API documentation:
The
approveAgentaction must be signed by the master account, and that account must have deposited on Hyperliquid at least once. The agent wallet does not need funding.Why This Started Failing on Oct 17
The secrets were switched from
BLOXWAP_TEST_MASTER_KEYtoAGENT_CLI_TEST_MASTER_KEYaround Oct 18 (commit b1c014d). The new wallet likely has never deposited on Hyperliquid testnet.The tests passed Oct 14-16 because the old wallet was funded.
Related