-
Notifications
You must be signed in to change notification settings - Fork 0
Tutorial 06 Metadata Verification and Production Gates
Tawan edited this page Apr 21, 2026
·
9 revisions
Every artifact should be treated as a pair:
artifact
artifact.meta.json
The artifact is executable RISC-V assembly or ELF. The metadata sidecar records source identity, target profile, artifact hash, schema layout, runtime requirements, scheduler information, and verifier obligations.
Compile normally:
cellc build --jsonOr request metadata directly:
cellc metadata src/main.cell --target riscv64-elf --target-profile spora -o /tmp/main.meta.jsoncellc verify-artifact build/main.elfPin the target profile:
cellc verify-artifact build/main.elf --expect-target-profile spora
cellc verify-artifact build/main.elf --expect-target-profile ckbVerify source units on disk:
cellc verify-artifact build/main.elf --verify-sourcesUse production checks:
cellc verify-artifact build/main.elf --production
cellc verify-artifact build/main.elf --deny-fail-closed
cellc verify-artifact build/main.elf --deny-runtime-obligationsUse check mode for CI:
cellc check --all-targets --production
cellc check --target-profile portable-cell --json
cellc check --target-profile ckb --jsonImportant policy flags:
| Flag | Purpose |
|---|---|
--production |
Reject unsafe or incomplete lowering paths. |
--deny-fail-closed |
Reject metadata that contains fail-closed runtime features or obligations. |
--deny-symbolic-runtime |
Reject symbolic Cell/runtime features. |
--deny-ckb-runtime |
Reject CKB runtime features when they are not allowed for the workflow. |
--deny-runtime-obligations |
Reject runtime-required verifier obligations. |
Useful fields include:
target_profileartifact_formatartifact_hash_blake3artifact_size_bytessource_hash_blake3source_content_hash_blake3source_unitsmetadata_schema_versionactionslocksschemaruntimeverifier_obligations- scheduler witness metadata for Spora profile builds
For a package that must remain portable:
cellc fmt --check
cellc check --target-profile portable-cell --all-targets --production
cellc build --target riscv64-elf --target-profile spora --production
cellc verify-artifact build/main.elf --expect-target-profile spora --verify-sources --productionFor CKB:
cellc check --target-profile ckb --production
cellc build --target riscv64-elf --target-profile ckb --production
cellc verify-artifact build/main.elf --expect-target-profile ckb --verify-sources --productionContinue with LSP and Tooling.