Merged
Conversation
5fd410c to
6be31a6
Compare
9a23b5a to
4da8ea1
Compare
Contributor
Author
|
/bot review |
|
Bot Agent progress:
Progress:
|
There was a problem hiding this comment.
Verdict
Comment
Summary
Posted 1 validated inline finding(s) after final filtering.
Findings
- [P3]
.gitignore:14Nit: file doesn't end with a newline (\ No newline at end of file). Consider adding a trailing newline for POSIX compliance.
Potential concerns (lower confidence)
- [P1]
.github/workflows/ci.yml:137The CI test job runsbun run build-local-testwhich doesbun run build-local && bun run test. Thetestscript setsANCHOR_WALLET=keys/local/admin-bossj3JvwiNK7pvjr149DqdtJxf2gdygbcmEPTkb2F1.json. This wallet key file must exist in the repo/CI environment. If it's gitignored or not committed, CI will fail. Please verify this key file is checked into the repository. - [P2]
.github/actions/setup-anchor/action.yml:10The cache only covers~/.cargo/bin/anchor, butcargo installmay also place related files or dependencies elsewhere. Consider expanding the cache path to~/.cargo/bin/anchor*or verifying that caching just the binary is sufficient for your use case. Also, if the anchor binary links to shared libraries, a cached binary from a different runner image version might not work. - [P2]
.github/workflows/ci.yml:68Thesetup-bunstep is added foranchor_buildbut missing thebun installstep. Thebun run build-localcommand at line 78 invokesanchor build --ignore-keys -- --features localwhich shouldn't need node_modules, but if anchor's build process or any tooling requires JS dependencies, this could fail. Verify thatbun installisn't needed here (it is added for the test job but not the build job). - [P2]
Anchor.toml:15The[hooks]section is empty. In anchor v1,[scripts]was replaced by[hooks], but an empty hooks section meansanchor testwon't run any test command. This is fine if you only usebun run testdirectly, but worth noting thatanchor testwill no longer work as before. - [P3]
programs/cp-amm/src/lib.rs:1The comment says "Ignored due to solana-foundation/anchor#4378" but the#![allow(unexpected_cfgs)]was removed. The workspaceCargo.tomlnow hasunexpected_cfgsas awarnwithcheck-cfg. If anchor issue 4378 is about unexpected cfg warnings from anchor macros, the workspace-levelcheck-cfgshould handle it. Just confirm that the anchor macros don't emit cfgs outside oftarget_os = "solana".
Repo checks
Repo Checks
-
LLM checks planner: Failed to parse LLM output as JSON.
-
cargo fetch --locked: ok
-
cargo check --workspace: ok
solana-loader-v2-interface v2.2.1
Checking spl-pod v0.7.3
Checking spl-token-confidential-transfer-proof-generation v0.5.1
Checking solana-loader-v3-interface v6.1.0
Checking spl-token-group-interface v0.7.2
Checking solana-feature-gate-interface v3.1.0
Checking spl-token-confidential-transfer-proof-extraction v0.5.1
Checking spl-token-metadata-interface v0.8.0
Checking zap-sdk v0.1.0 (https://github.com/MeteoraAg/zap-program?rev=064c58b317b9a85f212c0de72caea286fc72fdb4#064c58b3)
Checking spl-token-interface v2.0.0
Compiling anchor-derive-serde v1.0.0
Compiling anchor-attribute-account v1.0.0
Compiling anchor-attribute-event v1.0.0
Compiling anchor-attribute-error v1.0.0
Compiling anchor-attribute-constant v1.0.0
Compiling anchor-derive-accounts v1.0.0
Compiling anchor-attribute-program v1.0.0
Checking spl-token-2022-interface v2.1.0
Checking spl-associated-token-account-interface v2.0.0
Checking solana-secp256k1-recover v2.2.1
Checking solana-program v2.3.0
Compiling anchor-attribute-account v0.31.1
Compiling anchor-attribute-access-control v0.31.1
Compiling anchor-attribute-error v0.31.1
Compiling anchor-derive-serde v0.31.1
Compiling anchor-derive-accounts v0.31.1
Compiling anchor-attribute-event v0.31.1
Compiling anchor-attribute-constant v0.31.1
Compiling anchor-attribute-program v0.31.1
Checking anchor-lang v1.0.0
Checking anchor-lang v0.31.1
Checking anchor-spl v1.0.0
Checking jupiter v0.1.0 (https://github.com/MeteoraAg/zap-program?rev=064c58b317b9a85f212c0de72caea286fc72fdb4#064c58b3)
Checking protocol-zap v0.1.0 (https://github.com/MeteoraAg/zap-program?rev=064c58b317b9a85f212c0de72caea286fc72fdb4#064c58b3)
Checking cp-amm v0.2.1 (/data/workdir/2962945/MeteoraAg/damm-v2/programs/cp-amm)
Checking rust-sdk v0.2.0 (/data/workdir/2962945/MeteoraAg/damm-v2/rust-sdk)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 23.74s
Contributor
Author
|
/bot review |
|
Bot Agent progress:
Progress:
|
There was a problem hiding this comment.
Verdict
Request changes
Summary
Posted 1 validated inline finding(s) after final filtering.
Findings
- [P1]
.github/workflows/ci.yml:68Theanchor_buildjob now usesbun run build-local(which builds with--features local) instead of the previousanchor build(no features). This means CI is no longer building the production (non-local) variant. If there are any#[cfg(feature = "local")]guards that change behavior, CI won't catch compilation issues in the default/production build. Consider adding a separate step or job that runsanchor build --ignore-keyswithout--features localto validate the production build.
Potential concerns (lower confidence)
- [P1]
programs/cp-amm/src/instructions/ix_close_position.rs:64The change fromctx.accounts.token_program.to_account_info()to*ctx.accounts.token_program.keychanges the first argument toCpiContext::newfrom anAccountInfoto aPubkey. In Anchor v1,CpiContext::newexpects a program ID (Pubkey) as the first argument instead ofAccountInfo. Please verify this matches the Anchor v1 API — ifCpiContext::newstill expectsAccountInfo, this would be a compilation error (thoughcargo checkpasses, so this is likely correct for v1). - [P2]
.github/actions/setup-anchor/action.yml:10The cache only stores~/.cargo/bin/anchor, butanchor-climay also install other binaries or depend on shared libraries. If the anchor CLI is a single static binary this is fine, but if it has dependencies in~/.cargo/registryor elsewhere, the cache restore could result in a broken installation. Consider also caching~/.cargo/registryand~/.cargo/gitor verifying the cached binary works with a health check step (e.g.,anchor --version). - [P2]
.github/workflows/ci.yml:134Thesetup-bunaction is placed after thenode_modulescache step. If the cache is hit,bun installwill still run but should be a no-op. However,setup-bunshould ideally be placed before the cache check so that the bun version is available when computing the cache key (though the cache key is based onbun.lockhash, not bun version, so this is minor). - [P2]
.github/workflows/ci.yml:137Theanchor_testjob runsbun run build-local-testwhich doesbun run build-local && bun run test. But theanchor_buildjob (which this depends on vianeeds: anchor_build) already builds. The build artifact isn't shared between jobs (no artifact upload/download), so this job will rebuild from scratch. Consider either: (1) uploading the build artifact fromanchor_buildand downloading it here, or (2) removing theanchor_builddependency since this job rebuilds anyway. - [P2]
Anchor.toml:15The[hooks]section is empty. In Anchor v1, if you previously relied on[scripts]foranchor test, the empty[hooks]section meansanchor testwon't run any test command. This is likely intentional since tests are now run viabun run testdirectly, but worth confirming that no CI or developer workflow depends onanchor test. - [P3]
programs/cp-amm/src/instructions/swap/ix_p_swap.rs:17The import ofget_processed_sibling_instructionchanged fromanchor_lang::solana_program::instructiontosolana_instruction::syscalls. This is a necessary change for the Solana SDK v3 migration. Just confirming the function signature is compatible — thesolana_instruction::syscalls::get_processed_sibling_instructionshould have the same behavior as the previous one. - [P3]
programs/cp-amm/src/lib.rs:1The comment references solana-foundation/anchor#4378 but the#![allow(unexpected_cfgs)]was removed. Is the linked issue resolved in Anchor v1? The workspaceCargo.tomlnow hasunexpected_cfgsin[workspace.lints.rust]withcheck-cfg, so this is likely handled there. The comment on this line seems orphaned — it says "Ignored due to..." but there's nothing being ignored on this line anymore. Consider removing the comment.
Repo checks
Repo Checks
-
LLM checks planner: Failed to parse LLM output as JSON.
-
cargo fetch --locked: ok
-
cargo check --workspace: ok
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.29s
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.
Changes
bunas package manager + runtime for test instead of combined package manager such aspnpm+yarn.bunis more memory efficientcargo fmtcheck for CITODO
anchor idl inithttps://github.com/solana-foundation/anchor/blob/7b108db7987afedd1e72edd783d7fc00416e213f/docs/content/docs/updates/release-notes/1-0-0.mdx#legacy-idl-instructions-replaced-by-program-metadata
Program metadata: https://github.com/solana-program/program-metadata