Skip to content

feat(deploy-to-cloud-engine): name apps with the engine-operator's setApp - #481

Merged
pietrodimarco-dfinity merged 2 commits into
mainfrom
cloud-engine/app-records-setapp
Nov 24, 2026
Merged

pietrodimarco-dfinity merged 2 commits into
mainfrom
cloud-engine/app-records-setapp

Conversation

@pietrodimarco-dfinity

@pietrodimarco-dfinity pietrodimarco-dfinity commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Why

Cloud engines (OpenCloud v0.30.18, rolling out to prod engines now) keep a record of each app in the engine-operator: which canisters form it and their labels, its main canister, its name, its address and its icon. The console shows apps from these records, and the operator checks who writes them. Until now the console grouped canisters from __META_* canister environment variables that any controller can set, so it compared controllers before believing them, and real multi-canister apps failed that check.

The skill still told agents to name an app with those variables. They keep working, since the operator imports them, but an import only records an app at once when its canisters have the same controllers; otherwise it waits for the engine's owner. Writing the record directly with setApp avoids that, and lets an agent group apps into a suite.

What changes

  • deploy-to-cloud-engine, Step 2 is rewritten around the record:
    • find the engine-operator with getEngineOperatorBySubnet on the engine registry;
    • read the current record with getApps, and keep what the owner set in the console;
    • write the whole record with setApp (key, name, every canister with its label, main canister, address, icon), with its rules: a stable key, a full replace, who may write, the limits;
    • group apps with setSuite.
  • Older engine-operators: the __META_* variables stay as a subsection, for an operator without setApp, with a note that newer operators still import them.
  • ICP MCP route, M6: names the app with setApp through canister_update_call on the operator; the variables remain for configuration and older operators.
  • The derivation-origin notes, the no-network script note and both Verify steps now refer to the record.
  • New pitfall 29: sending setApp only what changed clears the rest.
  • Pitfalls 6 to 9 describe the record first and the variables as the older path; an app written with setApp ignores its canisters' variables. The icon rules match the console: a relative icon resolves against the app's address, or the main canister's own address when there is none.
  • Evals: the three naming cases expect setApp, and a new adversarial case adds one canister to an app.
  • The description names setApp beside __META_* (1,022 characters).

The engine-operator's own getApiDoc describes the same calls.

Checks

  • skill-validator check skills/deploy-to-cloud-engine --skip links (v1.5.1, as CI pins) shows only the body-size warnings main has too.
  • node scripts/check-project.js passes.
  • The operator side was exercised on a local engine with app records, through the console and the operator's integration tests: getApps, setApp (rename, add a canister, main canister, address, icon), setSuite, and the import of __META_* variables.
  • The getEngineOperatorBySubnet command was run as written against mainnet with icp-cli 1.3.0. The operator calls use -n ic, because -e ic needs a project manifest.

🤖 Generated with Claude Code

…tApp

The engine-operator now keeps a record of each app (its canisters and
labels, main canister, name, address and icon) and checks who writes it.
Step 2 finds the operator with getEngineOperatorBySubnet, reads getApps,
and writes the whole record with setApp; setSuite groups apps. The
__META_* variables stay as the path for engine-operators without setApp,
and newer operators still import them. M6 (ICP MCP route), the
derivation-origin notes and Verify follow. Pitfall 29 covers a partial
setApp record. The naming evals expect setApp, with a new adversarial
case for adding one canister.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pietrodimarco-dfinity
pietrodimarco-dfinity requested a review from a team as a code owner November 24, 2026 08:31
Copilot AI balanced review requested due to automatic review settings November 24, 2026 08:31
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Skill Validation Report

Validating skill: /home/runner/work/icskills/icskills/skills/deploy-to-cloud-engine

Structure

  • Pass: SKILL.md found

Frontmatter

  • Pass: name: "deploy-to-cloud-engine" (valid)
  • Pass: description: (1022 chars)
  • Pass: license: "Apache-2.0"
  • Pass: compatibility: (476 chars)
  • Pass: metadata: (4 entries)

Tokens

  • Warning: SKILL.md body is 17461 tokens (spec recommends < 5000)
  • Warning: SKILL.md body is 655 lines (spec recommends < 500)

Markdown

  • Pass: no unclosed code fences found

Tokens

File Tokens
SKILL.md body 17,461
Total 17,461

Content Analysis

Metric Value
Word count 11,531
Code block ratio 0.05
Imperative ratio 0.11
Information density 0.08
Instruction specificity 0.84
Sections 34
List items 144
Code blocks 28

Contamination Analysis

Metric Value
Contamination level low
Contamination score 0.09
Primary language category shell
Scope breadth 3
  • Warning: Language mismatch: config (1 category differ from primary)

Result: 2 warnings

Project Checks


✓ Project checks passed for 1 skills (0 warnings)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The evaluation expects an exact state-preserving setApp call without essential inputs, risking penalties for correct clarification requests and rewards for invented state.

2 open issues
What changed in this PR

Updates the cloud-engine deployment skill to name and group apps through engine-operator records, replacing environment-variable metadata as the primary approach.

Changes:

  • Documents getApps, full-record setApp updates, and suite grouping with setSuite.
  • Updates CLI and ICP MCP guidance while retaining the __META_* fallback for older operators.
  • Revises naming evaluations and adds an adversarial case for preserving an app’s existing record when adding a canister.
File Description
skills/​deploy-to-cloud-engine/​SKILL.md Documents record-based app management, legacy fallback, verification, and replacement pitfalls.
evaluations/​deploy-to-cloud-engine.json Updates naming and icon expectations and adds a record-preservation case.

Review effort: Balanced

Comment thread evaluations/deploy-to-cloud-engine.json Resolved
Comment thread skills/deploy-to-cloud-engine/SKILL.md Resolved
…rators

Pitfalls 6 to 9 now describe the setApp record first and the __META_*
variables as the older path, and say that an app written with setApp
ignores its canisters' variables. The icon rules match the console: a
relative icon resolves against the app's address, or the main canister's
own address when there is none. The add-a-canister eval accepts asking
for the operator id and the getApps output before the final call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 08:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified in the updates to app-record naming and state-preserving deployment guidance.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@pietrodimarco-dfinity
pietrodimarco-dfinity merged commit 0cf3640 into main Nov 24, 2026
7 checks passed
@pietrodimarco-dfinity
pietrodimarco-dfinity deleted the cloud-engine/app-records-setapp branch November 24, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants