# Test and publish

## The proof ladder

| Level        | Command                             | Proves                                                                   |
| ------------ | ----------------------------------- | ------------------------------------------------------------------------ |
| Manifest     | `dryv pack validate .`              | The manifest, filesystem and engine semantics agree                      |
| Resources    | `dryv pack inspect .`               | Which resources exist, who owns them, which renderer handles them        |
| Renderer     | `dryv pack doctor .`                | The renderer and any action runtime are ready                            |
| Render       | `dryv pack test .`                  | The pack renders against the engine's sample IR in an isolated directory |
| Real project | `tests/check.sh` + `tests/fixture/` | The generated code compiles and passes its own tests                     |

Project-controlled actions need workspace trust. Skip them while iterating with `dryv pack test . --no-actions`.

## A fixture worth having

Every official pack carries a `tests/fixture/` project (a `dryv.yaml`, authored contracts and the target's own test config) and a `tests/check.sh` that generates, installs and runs the target's compiler and tests. The generated output is only "correct" if the target accepts it.

## Write a README that describes

`dryv pack describe <id>` and the website show your README, so write for a user who has never seen the pack:

- what it generates and for which stack;
- what it **needs** from other packs (capability names) and what it **provides**;
- the `inputs` a project can set;
- a minimal `dryv.yaml` snippet.

## Versions and the registry

Git is the source of truth for versions. The registry keeps only each pack's **latest published state** and the commit it was published from. `dryv pack add` pins that commit in the project's `dryv.yaml`, so builds repeat exactly.

The pack registry is part of the Dryv Platform and is served by the Platform API (`https://api.dryvcode.com`). Reading it is public, and you can browse it at [packs.dryvcode.com](https://packs.dryvcode.com). Publishing a pack, and using private packs, needs a Platform sign-in (`dryv login`). Testing and using packs locally needs no sign-in.

Official packs are published by the maintainers from the [dryvcode/packs](https://github.com/dryvcode/packs) repository through the Platform registry API. Publishing is deliberate and manual.

A pack is publishable when it has `info.purpose`, `info.summary`, `info.languages`, a `README.md`, a `key` of the form `<layout>.<purpose>.<name>` that matches its folder, and the commit is clean. Bundles are built from a commit, so commit first. Published packs are retired, never deleted, and can be renamed.

## Checklist before you publish

- [ ] `dryv pack validate .` and `dryv pack test .` pass
- [ ] The fixture project builds and its tests pass
- [ ] README explains needs, provides, inputs and a sample `dryv.yaml`
- [ ] `CHANGELOG.md` records the change
- [ ] No template reads a context path `dryv context show` cannot explain
