Fix runtime errors and Motoko issues across 8 skills#13
Merged
Conversation
Rust (8 skills):
- .candid() → .candid_tuple() in all inter-canister call decode sites (18 locations)
decode_one fails on argument sequences; decode_args is correct for IC responses
Motoko (2 skills):
- wallet + ckbtc: persistent actor { → persistent actor Self {
'this' is unbound in anonymous actors; Self is the named reference
vetkd (both languages):
- Cycles for vetkd calls: 100M → 26B (DFINITY's own library uses 26_153_846_153)
Frontend (2 skills):
- asset-canister + internet-identity: fetchRootKey → shouldFetchRootKey
fetchRootKey is a method, shouldFetchRootKey is the HttpAgent.create() option
marc0olo
added a commit
that referenced
this pull request
Apr 2, 2026
…vals Addresses #135 (Obs 2, 5, 6, 7), #136 (F2), #139, #141. SKILL.md: - Add pitfall #8: networks/environments must be YAML arrays, not maps - Add pitfall #13: { agent } → { agentOptions } silent anonymous identity - Add pitfall #15: mops.toml placement for inline vs path-based canisters - Renumber pitfalls 8→16 binding-generation.md: - Add createActor warning above code example ({ agentOptions } not { agent }) - Add opt T → T | null section (bindgen wrapper unwraps arrays) dfx-migration.md: - Add safeGetCanisterEnv before/after migration example - Add createActor breaking API change with before/after code - Add custom Motoko builds section (mops toolchain bin moc) - Add frontend migration checklist items 11-14 evaluations/icp-cli.json: - Add createActor adversarial eval (3/3 with skill, 0/3 without) - Add opt T representation eval
marc0olo
added a commit
that referenced
this pull request
Apr 2, 2026
…vals (#144) Addresses #135 (Obs 2, 5, 6, 7), #136 (F2), #139, #141. SKILL.md: - Add pitfall #8: networks/environments must be YAML arrays, not maps - Add pitfall #13: { agent } → { agentOptions } silent anonymous identity - Add pitfall #15: mops.toml placement for inline vs path-based canisters - Renumber pitfalls 8→16 binding-generation.md: - Add createActor warning above code example ({ agentOptions } not { agent }) - Add opt T → T | null section (bindgen wrapper unwraps arrays) dfx-migration.md: - Add safeGetCanisterEnv before/after migration example - Add createActor breaking API change with before/after code - Add custom Motoko builds section (mops toolchain bin moc) - Add frontend migration checklist items 11-14 evaluations/icp-cli.json: - Add createActor adversarial eval (3/3 with skill, 0/3 without) - Add opt T representation eval
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
Deep verification of all 12 skills (both Rust and Motoko) found runtime-breaking issues that passed compile checks but would fail when an AI agent actually deploys and runs the code.
Rust —
.candid()→.candid_tuple()(18 locations across 6 skills)IC inter-canister responses are encoded as Candid argument sequences.
Response::candid()usesdecode_one(wrong for tuples),Response::candid_tuple()usesdecode_args(correct). Every skill usinglet (result,): (T,) = response.candid()would panic at runtime.Motoko —
this→Self(2 skills)thisis unbound in anonymouspersistent actor { }. Must usepersistent actor Self { }andPrincipal.fromActor(Self).fromActorcallfromActorcallsvetKD — cycles too low (both languages)
DFINITY's own ic-vetkeys library uses
26_153_846_153cycles (~26B) for vetKD management canister calls. Our skills had100_000_000(100M) — would trap on mainnet.Frontend —
fetchRootKey→shouldFetchRootKey(2 skills)In
@icp-sdk/core5.0,fetchRootKeyis a method on the agent instance, not a constructor option. TheHttpAgent.create()option isshouldFetchRootKey.Test plan