Skip to content

docs: canisters concept page#2

Merged
marc0olo merged 6 commits into
mainfrom
docs/concepts-canisters
Mar 13, 2026
Merged

docs: canisters concept page#2
marc0olo merged 6 commits into
mainfrom
docs/concepts-canisters

Conversation

@marc0olo
Copy link
Copy Markdown
Member

@marc0olo marc0olo commented Mar 13, 2026

Summary

  • Foundational concepts/canisters.md page that most other pages depend on
  • Covers canister fundamentals: Wasm execution, message types (update/query/composite), memory model (heap + stable), IDs & principals, lifecycle, controllers, and internals
  • Distinguishes official CDKs (Motoko, Rust) from community-supported languages (TypeScript, Python)
  • Clarifies query call authenticity: responses are not threshold-signed, should be treated as unverified without certified variables
  • Qualifies orthogonal persistence as Motoko-specific in the memory model table

Sync recommendation

informed by dfinity/portal — canisters.mdx, message-execution.mdx

@marc0olo
Copy link
Copy Markdown
Member Author

Review: concepts/canisters.md — Changes Requested

Good page overall — strong structure, correct CLI commands, good progressive disclosure. A few issues to fix:

1. Broken link: certified-variables.md

The link [certified variables](../reference/certified-variables.md) points to a file that doesn't exist (no stub was created for it). Appears in the "Query calls" section.

Fix: Either link to ../reference/ic-interface-spec.md (which does exist as a stub) with appropriate anchor text, or file a page proposal issue for reference/certified-variables.md and link to the stub once created.

2. Wrong crate URL for ic-stable-structures

The Memory Model section mentions StableBTreeMap (Rust). While this page doesn't directly link the wrong URL, the sister page (app-architecture, PR #4) links ic-stable-structures to docs.rs/ic-cdk which is the wrong crate. If you add a link here, use the correct URL: https://docs.rs/ic-stable-structures/latest/ic_stable_structures/.

✓ Verified

  • All CLI commands (icp canister create, icp build, icp canister install, icp deploy, icp canister stop, icp canister delete) verified against .sources/icp-cli/docs/reference/cli.md
  • --mode upgrade flag confirmed valid
  • All other internal links point to existing stubs
  • Correct use of core library (not base) for Motoko

marc0olo added a commit that referenced this pull request Mar 13, 2026
Adds three new verification rules to the content authoring workflow:
- Internal link verification: agents must confirm target files exist
- External URL verification: agents must not guess/generalize crate URLs
- Self-consistency check: frontmatter and body must not contradict

Also expands linking rules table with ic-stable-structures and candid
crate URLs, and adds a "never" rule against linking to non-existent pages.

Motivated by review of PRs #2-#5 where agents linked to plausible but
non-existent paths (reference/certified-variables.md, guides/backends/
stable-memory.md) and used wrong crate URLs (docs.rs/ic-cdk for
ic-stable-structures).
@marc0olo
Copy link
Copy Markdown
Member Author

Review: concepts/canisters.md (round 2)

Must fix

  • Broken link: ../reference/certified-variables.md — This file does not exist. The correct path is ../guides/backends/certified-variables.md. (Flagged in round 1, still unfixed.)

Suggestions

  • Link core library — The text mentions "core persistent data structures (Motoko)" but doesn't link it. Add [core](https://mops.one/core/docs) per linking rules.
  • Orthogonal persistence nuance — The memory table says heap is "cleared on upgrade." Consider a brief parenthetical "(unless using orthogonal persistence)" since the page already links to that topic and readers may be confused.
  • Empty icskills: [] — Consider whether icp-cli is relevant given the CLI examples.

Verified

  • All CLI commands (icp canister create, icp build, icp canister install, icp deploy, icp canister stop, icp canister delete, --mode upgrade) verified against .sources/icp-cli/docs/reference/cli.md
  • 8 of 9 internal links resolve (only certified-variables.md is broken)
  • Memory limits (6 GiB heap, 500 GiB stable) match portal source
  • Motoko references use core not base
  • No dfx references, no .mdx/JSX
  • Frontmatter complete and self-consistent
  • All code examples under 30 lines

…elopers

Covers what canisters are, how they differ from traditional smart contracts,
the Wasm execution model, message types (update/query/composite), memory model
(heap + stable), canister IDs, lifecycle, controllers, and internals.

Source: portal essentials/canisters.mdx + message-execution.mdx
@marc0olo marc0olo force-pushed the docs/concepts-canisters branch from 13fee29 to e2a9700 Compare March 13, 2026 11:10
@marc0olo
Copy link
Copy Markdown
Member Author

Feedback addressed:

  • Fixed broken link ../reference/certified-variables.md../guides/backends/certified-variables.md
  • Linked core library text to https://mops.one/core/docs
  • Added orthogonal persistence caveat to heap memory table row
  • Added icp-cli to icskills frontmatter

@marc0olo
Copy link
Copy Markdown
Member Author

Review: Canisters

Must fix

  • CLI commands in concept page: The lifecycle section (lines 93–134) has 6 icp command blocks (canister create, build, canister install, deploy, canister stop, canister delete). Under Diataxis, concept pages explain what and why — not how. The step-by-step CLI invocations belong in guides/canister-management/lifecycle.md. Keep the prose explanations for each stage, drop the code fences, and close with a single link to the lifecycle guide for practical steps. The other two concept pages (network-overview, app-architecture) correctly contain zero CLI commands. Also remove icskills: [icp-cli] from frontmatter since no CLI commands will remain on the page.

Verified

  • All 9 internal links resolve to existing files
  • CLI command names and flags verified against .sources/icp-cli/docs/reference/cli.md
  • External URLs correct (mops.one/core/docs, Wikipedia actor model, dashboard.internetcomputer.org)
  • Frontmatter complete and consistent with body content
  • No dfx references, no .mdx/JSX
  • All code examples under 30 lines
  • Relative links with .md extension throughout
  • Uses core not base for Motoko standard library
  • Content brief from stub fully addressed
  • Upstream comment present and accurate

marc0olo added a commit that referenced this pull request Mar 13, 2026
…uctions

Concept pages must not contain CLI commands or step-by-step procedures —
link to guides instead. This was implicit but caused a violation in PR #2
(canisters page had 6 icp command blocks in the lifecycle section).
@marc0olo
Copy link
Copy Markdown
Member Author

Feedback addressed:

  • Removed all 6 CLI command code blocks from the lifecycle section (Diataxis: concept pages explain what/why, not how)
  • Kept prose explanations for each lifecycle stage
  • Updated lifecycle link text to point readers to the guide for CLI commands
  • Changed icskills: [icp-cli] to icskills: [] in frontmatter

Add same-subnet, ingress-only, and no-replicated-mode limitations
that developers need to know when designing multi-canister architectures.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds the foundational “Canisters” concept page to the docs, explaining what canisters are and how they work within the Internet Computer’s execution and messaging model.

Changes:

  • Replaces the placeholder page with a full conceptual overview (execution model, message types, memory model, IDs/principals, lifecycle, controllers, internals).
  • Adds cross-links to related concept and guide pages (cycles/reverse gas, HTTPS outcalls, chain fusion, lifecycle management, certified variables).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread docs/concepts/canisters.md Outdated
Comment thread docs/concepts/canisters.md Outdated
Comment thread docs/concepts/canisters.md Outdated
- Distinguish official CDKs (Motoko, Rust) from community-supported languages
- Fix misleading query call authenticity wording (not threshold-signed)
- Qualify orthogonal persistence as Motoko-specific
@marc0olo
Copy link
Copy Markdown
Member Author

Feedback addressed:

  • Distinguished official CDKs (Motoko, Rust) from community-supported languages (TypeScript, Python) to avoid implying equal official support
  • Fixed query call wording: clarified that query responses are not threshold-signed by the subnet and should be treated as unverified without certified variables
  • Qualified orthogonal persistence as Motoko-specific in the memory model table

@marc0olo marc0olo merged commit da297d4 into main Mar 13, 2026
@marc0olo marc0olo deleted the docs/concepts-canisters branch March 13, 2026 17:36
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.

2 participants