docs(AGENTS.md): test.sh over Makefile, ic-cdk 0.20 guidance, Rust env vars#1422
Merged
Conversation
Makefile → test.sh: - Rename section and update all templates/checklist references - Use #!/usr/bin/env bash + set -e; plain $var syntax; no @/$$ - Add delta-based balance check pattern for idempotency - Update CI workflow template and README structure template Rust additions: - Always use ic-cdk 0.20; ic-ledger-types 0.16 required for 0.20 compat (0.15 + 0.20 causes ic-cdk-executor links conflict) - ic_cdk::export_candid!() required at end of every lib.rs - icp-dev-env-rust:1.0.1+ required (0.1.4 candid-extractor fails on ic0::cost_call imported by ic-cdk ≥ 0.19) - ic_cdk::api::env_var_value for runtime env vars (not env!() or std::env::var()) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
adamspofford-dfinity
approved these changes
Jun 17, 2026
This was referenced Jun 17, 2026
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
Updates AGENTS.md with lessons learned during the Rust migration wave (PRs #1393–#1421).
Changes
test.shreplacesMakefile## Makefilesection to## test.shwith a bash script template#!/usr/bin/env bash+set -e; plain$varsyntax; no$$/\\/@overheadbash test.shicp canister top-up --amount 30t backenddirectly in the README; note that30tis an example amount, not a fixed requirementImage versions
1.0.1in the CI workflow template (motoko,rust,all)icp-dev-env-rust:1.0.1is the minimum for ic-cdk ≥ 0.19 (earlier images bundlecandid-extractor 0.1.4which fails onic0::cost_call)1.0.1as the current pinned versionRust-specific additions
ic-cdk = "0.20";ic-ledger-types 0.16required for 0.20 compat (0.15 + 0.20 causesic-cdk-executorlinksconflict)ic_cdk::export_candid!()is required at the end of every Rust canisterlib.rs— without it,candid-extractorcannot findget_candid_pointerand the build failsic_cdk::api::env_var_value("VAR")for runtime env vars — notenv!()(compile-time) orstd::env::var()(no OS env in WASM)🤖 Generated with Claude Code