Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .amman/.gitkeep
Empty file.
Binary file removed .amman/genesis.so
Binary file not shown.
Binary file removed .amman/mpl_account_compression.so
Binary file not shown.
Binary file removed .amman/mpl_agent_identity.so
Binary file not shown.
Binary file removed .amman/mpl_agent_tools.so
Binary file not shown.
Binary file removed .amman/mpl_bubblegum.so
Binary file not shown.
Binary file removed .amman/mpl_core.so
Binary file not shown.
Binary file removed .amman/mpl_core_candy_guard.so
Binary file not shown.
Binary file removed .amman/mpl_core_candy_machine.so
Binary file not shown.
Binary file removed .amman/mpl_distro.so
Binary file not shown.
Binary file removed .amman/mpl_noop.so
Binary file not shown.
Binary file removed .amman/mpl_token_metadata.so
Binary file not shown.
Binary file removed .amman/spl_account_compression.so
Binary file not shown.
Binary file removed .amman/spl_noop.so
Binary file not shown.
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,32 @@ jobs:
with:
node-version: ${{ matrix.node_version }}
cache: pnpm
- name: Install Solana CLI
uses: metaplex-foundation/actions/install-solana@v1
with:
version: ${{ env.SOLANA_VERSION }}
cache: true
- name: Dump latest programs from Devnet
run: |
declare -A PROGRAMS=(
[".amman/mpl_token_metadata.so"]="metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
[".amman/mpl_core.so"]="CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d"
[".amman/mpl_distro.so"]="D1STRoZTUiEa6r8TLg2aAbG4nSRT5cDBmgG7jDqCZvU8"
[".amman/mpl_core_candy_machine.so"]="CMACYFENjoBMHzapRXyo1JZkVS6EtaDDzkjMrmQLvr4J"
[".amman/mpl_core_candy_guard.so"]="CMAGAKJ67e9hRZgfC5SFTbZH8MgEmtqazKXjmkaJjWTJ"
[".amman/mpl_bubblegum.so"]="BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY"
[".amman/spl_noop.so"]="noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV"
[".amman/mpl_noop.so"]="mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3"
[".amman/mpl_account_compression.so"]="mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW"
[".amman/spl_account_compression.so"]="cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK"
[".amman/genesis.so"]="GNS1S5J5AspKXgpjz6SvKL66kPaKWAhaGRhCqPRxii2B"
[".amman/mpl_agent_identity.so"]="1DREGFgysWYxLnRnKQnwrxnJQeSMk2HmGaC6whw2B2p"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix the MPL Agent Identity program ID mismatch.

Line 54 uses a different program ID than .validator.cjs for the same .amman/mpl_agent_identity.so path. This can dump the wrong binary and make validator results unreliable.

Proposed fix
-            [".amman/mpl_agent_identity.so"]="1DREGFgysWYxLnRnKQnwrxnJQeSMk2HmGaC6whw2B2p"
+            [".amman/mpl_agent_identity.so"]="1DREGFgysWYxLnRnKQeSMk2HmGaC6whw2B2p"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[".amman/mpl_agent_identity.so"]="1DREGFgysWYxLnRnKQnwrxnJQeSMk2HmGaC6whw2B2p"
[".amman/mpl_agent_identity.so"]="1DREGFgysWYxLnRnKQeSMk2HmGaC6whw2B2p"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/test.yml at line 54, The program ID for
".amman/mpl_agent_identity.so" in the workflow is mismatched with the one used
in .validator.cjs; update the value currently set in the workflow mapping entry
for ".amman/mpl_agent_identity.so" to the exact program ID used in
.validator.cjs so the same binary is referenced by both (ensure the string value
replaces the incorrect "1DREGFgysWYxLnRnKQnwrxnJQeSMk2HmGaC6whw2B2p" with the
validator's program ID).

[".amman/mpl_agent_tools.so"]="TLREGni9ZEyGC3vnPZtqUh95xQ8oPqJSvNjvB7FGK8S"
)
for file in "${!PROGRAMS[@]}"; do
echo "Dumping ${PROGRAMS[$file]} -> $file"
solana program dump -u devnet "${PROGRAMS[$file]}" "$file"
done
Comment on lines +57 to +60
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add retry/backoff for Devnet dumps to reduce CI flakiness.

Line 59 performs network-dependent dumps with no retry handling. A transient RPC failure will fail the whole job.

Proposed hardening
           for file in "${!PROGRAMS[@]}"; do
             echo "Dumping ${PROGRAMS[$file]} -> $file"
-            solana program dump -u devnet "${PROGRAMS[$file]}" "$file"
+            for attempt in 1 2 3; do
+              if solana program dump -u devnet "${PROGRAMS[$file]}" "$file"; then
+                break
+              fi
+              if [ "$attempt" -eq 3 ]; then
+                echo "Failed after $attempt attempts: ${PROGRAMS[$file]} -> $file" >&2
+                exit 1
+              fi
+              sleep $((attempt * 5))
+            done
           done
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
for file in "${!PROGRAMS[@]}"; do
echo "Dumping ${PROGRAMS[$file]} -> $file"
solana program dump -u devnet "${PROGRAMS[$file]}" "$file"
done
for file in "${!PROGRAMS[@]}"; do
echo "Dumping ${PROGRAMS[$file]} -> $file"
for attempt in 1 2 3; do
if solana program dump -u devnet "${PROGRAMS[$file]}" "$file"; then
break
fi
if [ "$attempt" -eq 3 ]; then
echo "Failed after $attempt attempts: ${PROGRAMS[$file]} -> $file" >&2
exit 1
fi
sleep $((attempt * 5))
done
done
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/test.yml around lines 57 - 60, The Devnet dump loop uses
solana program dump with no retry; wrap the invocation of "solana program dump
-u devnet \"${PROGRAMS[$file]}\" \"$file\"" in a retry/backoff loop so transient
RPC failures don't fail CI: implement a fixed max attempt count (e.g., 3-5),
check the command exit status, and on failure sleep with exponential backoff
(e.g., 1s, 2s, 4s) before retrying; keep the surrounding for file in
"${!PROGRAMS[@]}" loop and ensure you propagate a non-zero exit only after all
retries fail so PROGRAMS and the loop logic remain unchanged.

- name: Start validator
uses: metaplex-foundation/actions/start-validator@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ package-lock.json

.claude/

# Program binaries (pulled fresh from Devnet in CI)
.amman/*.so

# Known created test folders
candy1
testCm1
Expand Down
8 changes: 5 additions & 3 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": [
"ts-node/register"
"tsx"
],
"watch-extensions": [
"ts"
Expand All @@ -10,7 +10,9 @@
"timeout": 60000,
"parallel": true,
"node-option": [
"loader=ts-node/esm",
"experimental-specifier-resolution=node"
"import=tsx"
],
"ignore": [
"test/commands/distro/**"
Comment on lines +15 to +16
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Do not globally disable the entire distro test suite in shared Mocha config.

This permanently suppresses test/commands/distro/** for all environments, which can hide regressions in distro create/deposit/withdraw flows. Keep the skip scoped (e.g., CI-only/env-gated) and add explicit re-enable tracking instead of broad global ignore.

Suggested scoped approach
-  "ignore": [
-    "test/commands/distro/**"
-  ]
+  "ignore": [
+    "${MOCHA_IGNORE_GLOB}"
+  ]

And set MOCHA_IGNORE_GLOB=test/commands/distro/** only in the affected CI job, or move this to a dedicated CI-specific Mocha config.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.mocharc.json around lines 16 - 17, Remove the global ignore entry for the
distro tests by deleting the "test/commands/distro/**" pattern from the "ignore"
array in .mocharc.json and instead apply that glob only in CI or
environment-specific config; update CI job config to set
MOCHA_IGNORE_GLOB=test/commands/distro/** (or point the CI to a dedicated mocha
config) so the skip is scoped to CI, and add a comment or issue tracker
reference to re-enable/monitor these tests explicitly.

]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@ledgerhq/hw-transport": "6.31.4",
"@ledgerhq/hw-transport-node-hid-singleton": "6.31.5",
"@metaplex-foundation/digital-asset-standard-api": "^2.0.0",
"@metaplex-foundation/genesis": "^0.26.2",
"@metaplex-foundation/genesis": "^0.32.1",
"@metaplex-foundation/mpl-agent-registry": "^0.2.5",
"@metaplex-foundation/mpl-bubblegum": "^5.0.2",
"@metaplex-foundation/mpl-core": "^1.8.0",
Expand Down Expand Up @@ -78,6 +78,7 @@
"oclif": "^4.17.46",
"shx": "^0.3.4",
"ts-node": "^10.9.2",
"tsx": "^4.21.0",
"typescript": "^5.8.3"
},
"engines": {
Expand Down
Loading
Loading