docs(deploy-to-cloud-engine): bake version metadata into canister wasm by default#246
Conversation
…m by default Add a Version metadata section to Step 2: a metadata list under the recipe configuration with the agreed service:git:sha / service:git:origin / service:version names, baked into the wasm so the console can show what version is running. Verified by a live icp build (motoko recipe v4.1.0, icp-cli 1.0.2): $() substitution executes, +dirty flags a dirty tree, sections land as icp:private. In a non-git project the git substitutions silently bake garbage instead of failing — pitfall 17 documents that, pitfall 16 bans timestamps. Two adversarial eval cases and a trigger query added. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Skill Validation ReportValidating skill: /home/runner/work/icskills/icskills/skills/deploy-to-cloud-engineStructure
Frontmatter
Tokens
Markdown
Tokens
Content Analysis
Contamination Analysis
Result: 1 warning Project Checks |
|
The metadata mechanism behaves the same on v5.0.0, so this is just a version consistency fix: the example uses
That leaves the block as Separately, minor: the eval 16 |
Review feedback: bump the version metadata example to the current recipe and drop main from configuration (v5 reads main/candid/args from mops.toml, as documented in the icp-cli skill). Re-verified with a live build on v5.0.0: metadata-only configuration bakes all three sections. Also updated the Step 2 backend/canister.yaml example to v5.0.0 for internal consistency. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Applied in 751e378 — thanks. Both points, plus one consistency extra:
Good catch on the eval 16 ETIMEDOUT being the runner's 120s kill rather than a network flake — noted, leaving it as reported since eval 15 carries the clean baseline delta. |
marc0olo
left a comment
There was a problem hiding this comment.
Approving — v5.0.0 recipe fix applied and, better still, re-verified with a live v5.0.0 build (metadata-only config, main in mops.toml). Nice catch fixing the extra Step 2 canister.yaml reference too; the file no longer shows mixed recipe versions. Eval 16 baseline noted and fine to leave as reported. LGTM.
Motivation
Deployed engine apps carry no build provenance, so neither tooling nor the console can tell what version a canister is running. All official recipes already accept a
metadatalist under the recipeconfigurationthat bakes custom sections into the wasm, and there is an agreedservice:*naming convention the console will read (support rolling out; already readable via read_state). The skill should make agents set this by default on every deploy.Changes
metadatalist under the recipeconfigurationwithservice:git:sha(with+dirtymarker),service:git:origin, andservice:version, added by default on every deploy.icp build(motoko recipe v4.1.0, icp-cli 1.0.2):$()command substitution executes at build time, nested quotes survive,+dirtyappears on a dirty tree, and sections are injected asicp:private(readable by controllers viaicp canister metadata <name> <section> -e ic).+dirtysha, empty origin), so non-git projects set only an explicitservice:version.Eval results
Output eval 15 — Adversarial: timestamp in wasm version metadata (WITH 4/4 | WITHOUT 0/4)
Output eval 16 — Adversarial: version metadata in a non-git project (WITH 3/3 | baseline timed out)
The WITH-skill side passed 3/3 in two independent runs. The without-skill baseline errored with ETIMEDOUT before producing any output in all four attempts, so there is no meaningful baseline comparison for this case — reported as-is rather than retried further.
Trigger evals — 12/12 should-trigger, 8/8 should-not-trigger (rewritten description)
🤖 Generated with Claude Code