Part II — Intermediate Development · Chapter 11 · Lesson 6 of 6 · 4 min read
Chapter 11 Checkpoint: Publish and Consume a Signed Package
Checkpoint level: Intermediate
Purpose: Apply manifests, locks, sources, permissions, archives, checksums, and signatures in one end-to-end publishing workflow.
Release note: commands, field names, and syntax in this checkpoint are illustrative. Verify them against your installed v0.63 release before relying on them.
Checkpoint outcomes
By completing this checkpoint, you will demonstrate that you can:
- write a complete manifest with version constraints and a permission section;
- build, inspect, and sign a package archive;
- publish it to a registry under a signing policy;
- consume it from a locked, reproducible project;
- audit permissions and verify integrity in CI; and
- respond correctly to a tampering simulation.
Scenario
Your team maintains input_checks, a validation library used by order_rules. You will release version 1.3.0, which adds a quantity validator. The library must request no permissions, must be signed with the team release key, and must install from a locked project on a clean machine.
11C.1 Project layout
input_checks/
pea.toml
src/validators.pea
tests/validators_test.pea
README.md
order_rules/
pea.toml
pea.lock
src/rules.pea
keys/team-release-2026.pub
11C.2 Publisher manifest
[package]
name = "input_checks"
version = "1.3.0"
description = "Validation helpers for order rules"
[dependencies]
[permissions]
file_read = false
file_write = false
http = false
process = false
11C.3 Consumer manifest and policy
[package]
name = "order_rules"
version = "0.4.0"
[dependencies]
input_checks = "^1.3.0"
[dev-dependencies]
test_helpers = "^0.2.0"
[registry_policy]
allowed_registries = ["https://registry.example.com"]
require_signature = true
require_checksum = true
[trust]
keys = [{ id = "team-release-2026", file = "keys/team-release-2026.pub" }]
11C.4 Required workflow
- Run the library tests and confirm they pass.
- Build the archive and list its contents.
- Remove any file that should not ship.
- Sign the archive with the team release key.
- Verify the signature locally.
- Publish to the registry.
- In order_rules, update the dependency and regenerate the lock.
- Review the lock diff: version, source, and checksum.
- Commit the manifest and lock together.
- On a clean machine, run a locked install, verify, audit, and test.
11C.5 Reference commands
cd input_checks
pea test
pea package --list
pea package --sign --key $RELEASE_KEY
pea verify dist/input_checks-1.3.0.peapkg
pea publish dist/input_checks-1.3.0.peapkg
cd ../order_rules
pea update input_checks
pea install --locked
pea verify --all
pea audit --permissions
pea test
The release key is supplied through a secret, never stored in the repository.
11C.6 Required test matrix
| Case | Change | Expected result |
|---|---|---|
| A | Clean locked install of signed 1.3.0 | Install, verify, audit, and tests pass |
| B | Archive byte altered after publishing | Checksum mismatch; install stops |
| C | Archive re-signed with an unknown key | Untrusted-key error; install stops |
| D | Signature file removed | Missing-signature error under policy |
| E | Library adds http = true in 1.3.1 | Policy denies the permission; install stops |
| F | Manifest constraint changed without updating the lock | Locked install refuses to proceed |
| G | Path source left in the consumer manifest | CI source policy rejects the build |
11C.7 Tampering simulation
Run cases B through E on a copy of the project. For each, record the exact error, the stage that caught it, and the action a reviewer should take. Restore the clean state and rerun case A before submitting.
11C.8 Acceptance criteria
- The library archive contains only intended files.
- The archive is signed and verifies against the trusted key.
- The consumer lock records version, source, and checksum.
- A clean-machine locked install succeeds.
- The audit shows no permissions for input_checks.
- Every negative case fails at the expected stage.
- No private key or secret appears in either repository.
11C.9 Submission package
- both manifests and the consumer lock;
- the archive file list;
- verification and audit output for case A;
- a results table for cases A through G;
- the trusted-key approval record; and
- a short release note for 1.3.0.
11C.10 Assessment rubric
| Area | Evidence of mastery |
|---|---|
| Manifests | Constraints and permissions are precise and minimal. |
| Reproducibility | The lock is reviewed and the clean install matches it. |
| Integrity | Checksum and signature checks are enforced. |
| Trust | Keys are approved and recorded; no secrets leak. |
| Policy | Sources, registries, and permissions are restricted. |
| Incident handling | Each failure is classified and handled without overriding checks. |
Completion standard: Case A passes, every negative case fails at the documented stage, and the learner can explain which control caught each failure.
11C.11 Reflection questions
- Which control would have caught a compromised mirror?
- Why is a checksum alone insufficient on first install?
- What would you change if the library genuinely needed network access?
- How would you rotate the release key without breaking consumers?
11C.12 Optional extensions
- Add a second trusted key and practise rotation.
- Publish a prerelease and confirm the consumer constraint ignores it.
- Add an expiring unsigned exception and confirm CI flags it after expiry.
Chapter 11 summary
You can now declare dependencies with precise constraints, lock them for reproducible builds, choose appropriate sources, restrict package permissions, inspect archives, and enforce checksums, signatures, and registry policy. Together these controls let a team publish and consume packages with evidence rather than assumption.
Transition to Part III
Part III moves inside the runtime. Chapter 12 begins with from source text to tokens, syntax trees, and semantic checks, explaining how PeaLang turns the files you have been packaging into executable structure.
Checkpoint status: Ready for review.