Skip to content

infra: consolidate interface spec files, add team ownership and CI workflows#220

Open
marc0olo wants to merge 5 commits intomainfrom
infra/interface-spec-ownership
Open

infra: consolidate interface spec files, add team ownership and CI workflows#220
marc0olo wants to merge 5 commits intomainfrom
infra/interface-spec-ownership

Conversation

@marc0olo
Copy link
Copy Markdown
Member

@marc0olo marc0olo commented May 7, 2026

Summary

  • Content audit: Verified all 7 ic-interface-spec split files are 1:1 with the portal source. All 4 attachment files are byte-for-byte identical. No content was lost; the only differences from the portal are expected frontmatter, cross-file link rewrites, and one intentional adaptation (dead internetcomputer.org/docs/ links replaced with live local paths).

  • Inline Candid interface: Restored the portal's inline ic.did embed in the management canister spec (docs/references/ic-interface-spec/management-canister.md). A new plugins/remark-include-file.mjs remark plugin handles file=<rootDir>/... code fence attributes at build time, using the project's own unist-util-visit@5 (avoids the version conflict from remark-code-import).

  • File consolidation: Moved all interface spec attachments into a single flat public/references/ directory:

    • public/reference/ic.didpublic/references/ic.did
    • public/references/_attachments/certificates.cddlpublic/references/certificates.cddl
    • public/references/_attachments/requests.cddlpublic/references/requests.cddl
    • public/references/_attachments/http-gateway.didpublic/references/http-gateway.did
  • File rename: docs/references/http-gateway-spec.mddocs/references/http-gateway-protocol-spec.md (matches portal filename; all internal links and sidebar updated).

  • CODEOWNERS: Added required reviewers for spec files and attachments:

    • docs/references/ic-interface-spec/*@dfinity/interface-spec @dfinity/team-dsm @dfinity/consensus @dfinity/dx
    • docs/references/http-gateway-protocol-spec.md — same
    • docs/references/management-canister.md — same
    • docs/references/execution-errors.md@dfinity/team-dsm @dfinity/dx
    • All four files in public/references/ individually — same as interface-spec
  • CI workflows (ported and adapted from dfinity/portal):

    • interface-spec.yml — validates .cddl files (docker cddl-cli) and .did files (didc) on every PR touching spec files, and on push to main
    • interface-spec-tag.yml — labels any PR that touches spec files with interface-spec; creates the label automatically on first run (idempotent)
    • interface-spec-slack.yml — posts to #interface-spec on Slack when a non-draft PR is opened or marked ready for review (requires SLACK_API_TOKEN secret)

Notes

  • SLACK_API_TOKEN secret needs to be added to the repo for the Slack workflow to function.
  • One numeric claim in docs/references/execution-errors.md needs DSM/Consensus confirmation: "wasm64 modules can use up to 6 GiB of heap memory." This appears in portal/canisters.mdx and our cycles-costs.md but not in portal/resource-limits.mdx. Please verify against the runtime implementation before merging.

Sync recommendation

informed by dfinity/portal — .github/workflows/interface-spec.yml, .github/workflows/interface-spec-tag.yml, .github/workflows/interface-spec-slack.yml

- Move ic.did from public/reference/ into public/references/ alongside the
  other spec attachments (flat structure, no _attachments nesting)
- Rename public/references/_attachments/{certificates.cddl,requests.cddl,
  http-gateway.did} → public/references/ (removes the _attachments indirection)
- Update all internal doc links to the new paths
- Add CODEOWNERS entries for @dfinity/interface-spec @dfinity/team-dsm
  @dfinity/consensus @dfinity/dx covering docs/references/ic-interface-spec/*,
  docs/references/http-gateway-spec.md, and public/references/*.{did,cddl}
- Add three CI workflows ported from dfinity/portal:
  interface-spec.yml     – validates cddl and candid files on PR/push-main
  interface-spec-tag.yml – labels PRs that touch spec files; creates the
                           interface-spec label automatically if absent
  interface-spec-slack.yml – posts to #interface-spec on PR open/ready
@marc0olo marc0olo requested a review from a team as a code owner May 7, 2026 15:45
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

🤖 Here's your preview: https://uc7il-jaaaa-aaaam-ai2gq-cai.icp0.io

marc0olo added 2 commits May 7, 2026 17:53
Matches the portal source filename (http-gateway-protocol-spec.md).
Updates all internal links, sidebar slug, CODEOWNERS entry, and workflow
path triggers.
@marc0olo
Copy link
Copy Markdown
Member Author

marc0olo commented May 7, 2026

Content verification note — please confirm one value

As part of adding @dfinity/team-dsm and @dfinity/consensus as CODEOWNERS, we audited all numeric claims in docs/references/execution-errors.md. Every value checks out against portal/resource-limits.mdx or the IC interface spec except one:

docs/references/execution-errors.md line 106 and 125:
"ICP imposes limits on both the main memory (Wasm heap, up to 4 GiB for wasm32 or 6 GiB for wasm64) per canister..."

  • portal/resource-limits.mdx lists only 4 GiB without a wasm32/wasm64 distinction (likely out of date)
  • portal/docs/building-apps/essentials/canisters.mdx says "maximum size limitation of 6 GiB, both 32-bit and 64-bit heap storage are supported"
  • Our own docs/references/cycles-costs.md already states 4 GiB (wasm32) / 6 GiB (wasm64)

The 6 GiB figure is internally consistent across this repo but is not explicitly stated in the IC interface spec or the portal resource limits table. Could someone from @dfinity/team-dsm or @dfinity/consensus confirm the 6 GiB wasm64 heap limit from the runtime side before this merges?

marc0olo added 2 commits May 7, 2026 18:35
…ude-file

Brings back the portal's inline Candid interface view. Adds a custom
remark plugin (plugins/remark-include-file.mjs) that reads a file at
build time and injects its contents into a code block using a file= meta
attribute:

  ```candid file=<rootDir>/public/references/ic.did

The plugin uses the project's own unist-util-visit (v5) to avoid the
version conflict that remark-code-import (which bundles v4) introduced.
A download link is kept alongside the inline embed for direct access.
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.

1 participant