pandra-guild.lock
pandra-guild.lock sits beside pandra-guild.toml and pins every remote member of the guild to one package: the digest of the package and, for a member from Git, the commit it was built from. Everyone who runs a member runs those bytes, and a package that does not match its pin fails before anything starts. Commit it with the guild file; pandra guild lock, pandra guild add, and pandra guild remove write it, and nobody edits it by hand. How to use it is in pinning and approving.
An example
A guild with a member from a registry, a member from Git, and a path member locks to:
version = 1
[[member]]
name = "reviewer"
oci = "ghcr.io/acme/reviewer:1.2.0"
digest = "sha256:4f2a..."
[[member]]
name = "docs-writer"
git = "https://github.com/acme/agents"
path = "docs-writer"
tag = "v0.3.0"
revision = "3f1c2d4e5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d"
digest = "sha256:9b1e..."version is the version of the lockfile format. Each [[member]] entry is matched to its member by name, repeats the member's source keys, and adds the digest of the package and, for a Git member, the resolved revision. A path member has no entry: it is your own checkout, and its own pandra.lock pins what it depends on.
When it is stale
The lockfile is stale when a remote member's source differs from its entry, or when an entry has no member. Both sides are compared after normalization, as for pandra.lock, so spelling a source differently does not make it stale.
A lockfile is required as soon as the guild has a remote member. While it is missing or stale, pandra guild pull, trust, sync, and run of a remote member fail with lockfile_missing or lockfile_stale, list what changed, and give pandra guild lock as the step, before they fetch, approve, or start anything:
$ pandra guild pull
error: pandra-guild.lock is out of date with the guild file
the member `reviewer` differs from its pandra-guild.lock entry in `oci`: ghcr.io/acme/reviewer:1.3.0 in the guild file, ghcr.io/acme/reviewer:1.2.0 in pandra-guild.lock
To bring pandra-guild.lock up to date with the guild file:
pandra guild lockpandra guild list shows the same as a blocker of every remote member. A quest that uses a remote member stops before its first step and lists the same problem and step. A path member runs while the lockfile is missing or stale. A lockfile that cannot be read fails with lockfile_invalid.
Commands that change it
| Command | What it does to the lockfile |
|---|---|
pandra guild lock | Pins every remote member that has no entry or whose entry is stale, keeps every other pin, and removes entries that have no member. |
pandra guild lock --upgrade [NAME] | Resolves every member's tag or branch again, or one member's, and pins them again. A digest never moves. |
pandra guild add NAME SOURCE | Writes the member into the guild file, then does what pandra guild lock does, so it pins the member it added or changed when it is a remote member, and removes its old pin when its new source is a path. |
pandra guild remove NAME | Removes the member from the guild file, then does what pandra guild lock does, so it removes the member's entry when it had one. |
pandra guild lock --check | Changes nothing and needs no network: exits 1 when the lockfile is stale, or missing although it is required, and 0 otherwise. |
No other command changes it. --lock-update on pandra guild run and pandra guild sync updates a member's own pandra.lock, never the guild's lockfile.