Skip to content

Feat/solana no kora - #41

Open
ariessa wants to merge 3 commits into
mainfrom
feat/solana-no-kora
Open

Feat/solana no kora#41
ariessa wants to merge 3 commits into
mainfrom
feat/solana-no-kora

Conversation

@ariessa

@ariessa ariessa commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Note

High Risk
Large changes to Solana job funding, escrow, subscription activation, and sponsored transaction submission—including multi-signer completes and automatic re-prepare retries—directly affect money movement and on-chain state correctness.

Overview
Solana multi-hook and subscription jobs are folded into the main SolanaAcpClient and AcpAgent path, replacing the standalone SolanaMultiHookClient. Router and standalone subscription hooks get dedicated prepare/send branches (setBudget, fund, submit, reject, complete) with fan-out account layouts, hook PDA pre-creation for sponsorship, and transaction-size workarounds (ATA splits, persistent complete lookup tables, sendOptions on prepared txs).

Agent-facing behavior changes include Solana batchConfigureHooks, on-chain reads for subscription expiry / proposed terms / router hooks, structured subscriptionTerms on setBudget for router jobs, and completeSubscriptionJob (provider co-sign + sponsored multi-signer send) instead of prepared complete() for subscription-activating hooks. Many Solana lifecycle sends now use withReprepare with a 600ms delay and broader isStalePrepareError detection (CreateJob seeds races, configure lag, AccountNotInitialized / intent-close races).

Constants and safety: updated Solana hook/router program IDs, mainnet router deployments, MULTI_HOOK_COMPLETE_ALT_ADDRESSES, and getChainFamily now throws UnknownChainIdError for unregistered chain IDs. Shared encodeReasonBytes / encodeDeliverableBytes centralize 32-byte slot encoding. Generated ACP IDL gains paused on acp state and related error renames; package-lock.json reflects dependency peer metadata cleanup.

Reviewed by Cursor Bugbot for commit 9784af9. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9784af9. Configure here.

seller: s.signer.address,
clientAddress: s.clientAddress,
terms,
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subscription terms account mismatch

Medium Severity

setBudgetViaSubscriptionHook builds remaining accounts from terms (only set when subscriptionTerms is passed), but still puts caller-encoded rawOptParams into the instruction when that field is absent. effectiveTerms is already decoded from those bytes for pre-create, so a standalone subscription setBudget that supplies 16-byte terms only via optParams sends proposing params with the minimal no-op account set and fails on-chain.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9784af9. Configure here.

args.providerAddress,
subExpiryPackageId,
);
const acct = await fetchMaybeSubscriptionExpiry(rpc, subExpiryAddr);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale subscription active check

High Severity

preCreateHookRentPdas reads sub_expiry via fetchMaybeSubscriptionExpiry without ACP_COMMITMENT. Generated fetchers default to finalized, so a subscription that is already active at confirmed can be missed. The guard then pre-creates a zeroed proposed_terms PDA that before_action never fills, and the next fund/submit hits InvalidJob — the failure mode this block was written to prevent.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9784af9. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant