PeaBox Lab › PeaLang › Learn › Chapter 23 › Lesson 3

Part IV — Expert Production Engineering · Chapter 23 · Lesson 3 of 6 · 2 min read

Lesson 3: Building and Inspecting Artifacts

Lesson level: Expert

Purpose: Build and inspection steps provide reproducible artifact evidence. They do not demonstrate a full browser runtime.

Learning Objectives

3.1 Concepts

Use the CLI to compile a trusted .pea source into the container and inspect its manifest. The documented forms are pea wasm-build input.pea output.wasm and pea wasm-inspect output.wasm. Inspect records the format and policy, not successful execution. The CLI wasm-inspect prints the manifest; the Python inspect_wasm function additionally returns embedded PEAC. Capture compiler version, source digest, and the artifact identity alongside these reports.

3.2 Annotated Example

Run pea check rules.pea, pea wasm-build rules.pea rules.wasm, and pea wasm-inspect rules.wasm. Annotation: these commands create and inspect a packaging artifact. For engine behavior, run the same source through the interpreter and VM separately. Preserve source identity consistently when comparing artifact bytes; timestamps and source paths in related formats can affect reproducibility.

3.3 Guided Practice

Identify what evidence each command produces. Distinguish a parsing failure, an invalid container header, missing custom sections, and a compatible container without executable exports.

3.4 Common Mistakes

Do not repair an artifact by editing arbitrary bytes, overwrite approved output before verification, or use an inspection-only PASS as an execution gate.

3.5 Hands-On Lab

Deliverable: Tested integration, artifact identities, support states, and safe error evidence.

3.6 Review Questions

What does the CLI inspector print? What additional content does the Python inspector expose? Why is a packaging test separate from an execution test?

3.7 Applied Challenge

Automate an artifact admission report containing version, source identity, manifest, permitted capabilities, byte-size bound, and actual executable export evidence.

Lesson Summary

Build and inspection steps provide reproducible artifact evidence. They do not demonstrate a full browser runtime.

Lesson status: Draft complete; ready for review. Source-checked, not browser-execution validated.

← Previous Next →