You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repo currently has no test files and no test framework (package.json has no vitest/jest/playwright, no *.test.*/*.spec.* files).
The two most critical, security-adjacent pieces of logic are completely unverified:
T3N bridge authorization (src/lib/t3n/authCore.ts → checkBridgeAuthorization) — verifies an operator-signed authorization before autonomous fund movement. Wrong logic here could authorize blocked bridges (expired, over max amount, wrong source/destination chain, bad signature).
Decision engine (src/lib/agent.ts → YieldAgent.analyze() + src/lib/yields.ts → findBestYield()) — decides whether/when to move real money, including policy handling (blocked chains, allowed destinations, max route cost, min net gain).
Suggested scope
Add vitest (or similar).
Unit tests for findBestYield(): edge cases (no data, missing current chain, exactly at threshold).
Unit tests for checkBridgeAuthorization(): expired auth, amount over max, chain outside allowlist, invalid signature, valid happy path.
Summary
This repo currently has no test files and no test framework (
package.jsonhas no vitest/jest/playwright, no*.test.*/*.spec.*files).The two most critical, security-adjacent pieces of logic are completely unverified:
src/lib/t3n/authCore.ts→checkBridgeAuthorization) — verifies an operator-signed authorization before autonomous fund movement. Wrong logic here could authorize blocked bridges (expired, over max amount, wrong source/destination chain, bad signature).src/lib/agent.ts→YieldAgent.analyze()+src/lib/yields.ts→findBestYield()) — decides whether/when to move real money, including policy handling (blocked chains, allowed destinations, max route cost, min net gain).Suggested scope
vitest(or similar).findBestYield(): edge cases (no data, missing current chain, exactly at threshold).checkBridgeAuthorization(): expired auth, amount over max, chain outside allowlist, invalid signature, valid happy path.parseExecutionIntent()/resolveChainAlias()(covers Bug: "base sepolia" resolves to Base mainnet in chain alias parsing #5).Files
src/lib/t3n/authCore.tssrc/lib/t3n/authorization.tssrc/lib/agent.tssrc/lib/yields.tssrc/lib/execution.ts