This specification defines openflange.lock.yaml, the file that records what each pipe reference of a project was resolved to: exact location, contract version, revision and an integrity hash. It defines how the hash is computed, how references are resolved and fetched safely, and what a locked run must verify.
This document is published at https://openflange.org/lock/v0.1. Its identifier, openflange.org/lock/v0.1, is that URL without the scheme, and is the value documents of this kind carry in spec:.
At a glance #
- Identifier:
openflange.org/lock/v0.1— the value ofspec:in documents of this kind - Published at: https://openflange.org/lock/v0.1 (raw Markdown: https://openflange.org/lock/v0.1.md)
- Version: 0.1.0-draft
- Status: experimental (feature maturity labels are listed in the document)
- Updated: 2026-12-03
- JSON Schemas (2020-12):
- Related specifications:
- Pipeline: https://openflange.org/pipeline/v0.1
- Pipe: https://openflange.org/pipe/v0.1
- Registry: https://openflange.org/registry/v0.1
- HTTP Pipe Protocol: https://openflange.org/http/v0.1
- CLI protocol: https://openflange.org/cli/v0.1
Minimal example #
The smallest valid lockfile with one local dependency (the hash is illustrative):
spec: openflange.org/lock/v0.1
dependencies:
"./pipes/lowercase":
resolved: pipes/lowercase
version: 0.1.0
integrity: sha256-2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae1. Introduction #
Pipeline files refer to pipes flexibly: a version range, a branch, a registry name. A lockfile records what each of those references was resolved to — the exact location, the contract version, the revision and an integrity hash — so that the same pipeline runs the same code tomorrow, on another machine and in CI.
The lockfile is named openflange.lock.yaml. It is meant to be committed
to version control.
1.1 Conventions #
The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY and OPTIONAL are to be interpreted as described in RFC 2119 and RFC 8174 when, and only when, they appear in capitals.
Fenced examples whose info string contains openflange:<kind> are normative
and machine-checked against
https://openflange.org/schemas/lock-v0.1.schema.json.
1.2 Citing this document #
Normative statements are cited by section number, for example
lock/v0.1 §4.2, and numbered or bulleted rules within a section by their
position, for example lock/v0.1 §4.2(3). Section numbers are stable
within v0.1: sections are appended, never renumbered. Every heading has a
stable fragment identifier derived from its text (lower-cased; characters
other than letters, digits, spaces, hyphens and underscores removed; spaces
replaced by hyphens), so a section is addressable as
https://openflange.org/lock/v0.1#<fragment>. Cross-references to other
OpenFlange specifications are absolute URLs of that form. This document
does not rely on images; its diagrams are text.
2. Terminology and maturity #
The terms pipe, source, sink, pipeline, subpipeline, node, port, stream, run and dataset are defined in the Pipe specification, section 2; workflow is reserved and not used here. In this document:
- reference — the value of a node's
pipekey (Pipeline specification, section 4). - project root — the directory containing the lockfile.
- resolution — turning a reference into an exact location and content.
- locked run — a run that must not deviate from the lockfile.
| Feature | Maturity |
|---|---|
| Lockfile format (3) | experimental |
| Integrity computation (4) | experimental |
Resolution of path, std:, git:, npm:, https: and registry references (5) |
experimental |
pypi:, cran:, oci: |
recognised; resolution reports E_UNSUPPORTED in v0.1 |
Locked runs, resolve, update (6) |
experimental |
| Safe fetching rules (7) | experimental |
Nothing is stable or deprecated in v0.1.
3. Format #
spec: openflange.org/lock/v0.1
dependencies:
"./pipes/lowercase":
resolved: pipes/lowercase
version: 0.1.0
revision: null
integrity: sha256-2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae
"./pipes/mask-email":
resolved: pipes/mask-email
version: 0.1.0
revision: null
integrity: sha256-fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9
"std:filter@0.1":
resolved: std:filter@0.1.0
version: 0.1.0
revision: null
integrity: sha256-18ac3e7343f016890c510e93f935261169d9e3f565436429830faf0934f4f8e4
"openflange/normalize-and-mask-email@^0.1":
resolved: git:https://github.com/openflange/openflange-go#3f1c2b7a9d0e4f5a6b7c8d9e0f1a2b3c4d5e6f70:examples/email
version: 0.1.2
revision: 3f1c2b7a9d0e4f5a6b7c8d9e0f1a2b3c4d5e6f70
integrity: sha256-3e23e8160039594a33894f6564e1b1348bbd7a0088d42c4acb73eeaed59c009d
dependencies:
- "./pipes/lowercase"
- "./pipes/mask-email"
"npm:@acme/geo-pipes@^2#pipes/geocode/OPENFLANGE.md":
resolved: npm:@acme/geo-pipes@2.3.1#pipes/geocode/OPENFLANGE.md
version: 2.3.1
revision: 5d41402abc4b2a76b9719d911017c592
integrity: sha256-ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb
"https://pipes.example.com/v1/pipes/validate-email":
resolved: https://pipes.example.com/v1/pipes/validate-email
version: 0.1.0
revision: 9f2c1e7
integrity: sha256-252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111(All hashes, commits and packages in this example are illustrative.)
The file is YAML, parsed with the safe YAML rules of the Pipe specification, section 4.2.
| Key | Meaning |
|---|---|
spec |
REQUIRED. The constant openflange.org/lock/v0.1. |
dependencies |
REQUIRED. Map from reference to lock entry. |
Keys. The key is the reference exactly as written in the pipeline
file, with one normalisation: a relative path reference is rewritten to be
relative to the project root (still beginning with ./ or ../, with /
separators), so that the same pipe referenced from pipeline files in
different directories has one entry and different pipes never collide.
Entries.
| Key | Required | Meaning |
|---|---|---|
resolved |
yes | The exact location: a path relative to the project root; std:<name>@<exact version>; npm:<pkg>@<exact version>[#subpath]; git:<url>#<full commit hash>[:subpath]; or the HTTPS URL of a remote pipe. |
version |
yes | The pipe's contract version, from its manifest or definition. |
revision |
no | The immutable revision where one exists: Git commit hash, npm dist shasum, the revision reported by a remote server; null otherwise. |
integrity |
yes | sha256-<64 lower-case hex digits> (section 4). |
dependencies |
no | The references of this pipe's own dependencies (the pipe values of a composite's nodes), each of which is itself a key of the lockfile. Relative references inside a fetched package are written relative to that package's root. |
A tool writing a lockfile MUST write keys in a stable (sorted) order and
MUST preserve x- extension keys. Entries no longer referenced SHOULD be
pruned by resolve.
4. Integrity #
integrity is the SHA-256, in lower-case hexadecimal with the prefix
sha256-, of a byte string that depends on the kind of dependency.
Packages (path, git:, npm:, registry). The hash covers the manifest
and the implementation files it references:
Collect the file set: the pipe's
OPENFLANGE.md, plus every file its frontmatter references —implementation.path, a relativeimplementation.command[0], and every portschema.path. For apipelineimplementation this is the pipeline file; the pipes that pipeline uses are separate dependencies with their own entries.Express each file's path relative to the directory of the manifest, with
/separators and no leading./.Sort the paths by their UTF-8 byte sequences.
For each file in order, append a length-prefixed record:
text<path> 0x00 <length> 0x00 <content>where
<path>is the path's UTF-8 bytes,<length>is the number of bytes of the file's content written in ASCII decimal with no sign, no leading zeros and no separators (0for an empty file), and<content>is the file's bytes exactly as stored. Nothing is appended after the content.Hash the concatenation of all records.
The length prefix makes the encoding unambiguous: no choice of file names and contents can make two different file sets produce the same byte string.
Worked example. A package with two files (they are in the
specification repository under examples/lock-integrity/, and the hash
below is recomputed by the repository's checker). OPENFLANGE.md, 251
bytes, every line ending with a single LF:
---
spec: openflange.org/pipe/v0.1
id: double
version: 0.1.0
inputs:
in: {}
outputs:
out: {}
implementation:
type: script
language: starlark
path: double.star
---
# Double
Implements the [OpenFlange](https://openflange.org/) specification.double.star, 47 bytes:
def process(item, params):
return item * 2The file set is {OPENFLANGE.md, double.star}. Sorted by bytes,
OPENFLANGE.md comes first (O is 0x4F, d is 0x64). The hash input is
therefore, in order (331 bytes in total):
| Bytes | Content |
|---|---|
| 13 | OPENFLANGE.md |
| 1 | 0x00 |
| 3 | 251 |
| 1 | 0x00 |
| 251 | the bytes of OPENFLANGE.md |
| 11 | double.star |
| 1 | 0x00 |
| 2 | 47 |
| 1 | 0x00 |
| 47 | the bytes of double.star |
and the lock entry's integrity is:
sha256-15d63b847e6f49f702c034416dbb06ec405c907576f0d452d32a4a8fc8bbf042It can be reproduced with ordinary tools:
{ printf 'OPENFLANGE.md\000251\000'; cat OPENFLANGE.md
printf 'double.star\00047\000'; cat double.star; } | sha256sumFiles are hashed as bytes: no newline normalisation, no trimming. A
referenced file that is missing or escapes the package root is an error
(E_PATH), not an empty contribution.
Supporting files that the manifest does not reference (data read by a
script, a node_modules tree) are not covered. For git: and npm:
dependencies the revision pins them; for local paths nothing does, and
authors who need them covered SHOULD reference them from the manifest.
Standard library (std:). The hash of the runner's canonical manifest
file for that pipe, computed as above (a single record). It changes when the
contract changes.
Remote pipes (https:). The SHA-256 of the served definition: the
exact response body of GET {base}/pipes/{pipeId}. A remote contract
version does not guarantee an immutable implementation; the server may
redeploy without changing the definition. The runner records the revision
the server reports, if any, and that is the most that can be pinned.
Local relative paths are locked by integrity only: there is no
revision, and resolved is just the path.
5. Resolution #
openflange resolve (or an equivalent API) walks every pipeline file and
composite manifest reachable from the project, and for each reference:
- Classifies it by form (Pipeline specification, section 4). An
unrecognised form is
E_REF;pypi:,cran:andoci:areE_UNSUPPORTED. - Resolves it to an exact location:
- path — the directory or manifest, after path-safety checks;
std:— the highest standard-library version the runner implements that satisfies the range;- registry — through the configured index
(Registry specification, section 8),
to a
git:,npm:orhttps:location; the registry's manifest integrity is verified; git:— the ref is resolved to a full commit hash; without a ref, the default branch's head at resolution time;npm:— the highest published version satisfying the range; the package tarball is fetched and unpacked without running lifecycle scripts;https:— the definition is fetched.
- Reads the manifest, validates it, and computes
version,revisionandintegrity. - Recurses into composite pipes, recording their references under
dependencies.
Rules:
- Consistency. Within one lockfile a reference key resolves to exactly one entry. Transitive and local dependencies are resolved by the same procedure as direct ones.
- Cycles. A composite that directly or transitively depends on itself
is
E_CYCLE. - Completion, not churn.
resolvekeeps existing entries that are still valid (the reference is unchanged and, for local paths, the integrity still matches) and adds missing ones. It does not move a locked dependency to a newer version. openflange update [ref]re-resolves every entry, or only the named reference and the entries reachable only through it, to the newest versions the references allow.- A runner MUST check before execution that it can actually run what was
resolved (adapter, language, features) and report
E_UNSUPPORTEDotherwise; resolving a reference does not imply being able to execute it.
Where the lockfile lives: next to the pipeline file or manifest being run, or in the nearest ancestor directory that contains one. Resolved packages are kept in a cache outside the project; the cache is not part of this specification and MUST NOT be needed to interpret a lockfile.
6. Locked runs #
openflange run --locked (and equivalent APIs):
- every reference encountered MUST have an entry — otherwise
E_LOCK; - the content obtained for each entry MUST hash to its
integrity— otherwiseE_LOCK; this includes local paths (a locally edited pipe fails a locked run untilresolveorupdateis run); - no reference is re-resolved: no registry lookup, no range evaluation, no
branch lookup. Content may be fetched from the exact
resolvedlocation if it is not cached; - for a remote pipe, the definition fetched at run time MUST hash to
integrity; if the server now reports a differentrevision, the runner MUST warn, and MAY be configured to fail (E_LOCK); - a lockfile that is malformed, or whose
specis not supported, isE_LOCK.
Without --locked, a runner uses lock entries when present and valid,
resolves what is missing, and SHOULD say when it had to resolve something
that was not locked. It MUST NOT silently rewrite the lockfile during
run.
7. Security considerations #
Resolution fetches and unpacks content chosen by untrusted references. A resolver MUST:
- Bound every fetch in size and time, and bound unpacked size and file count.
- Use HTTPS only; plain HTTP is permitted for loopback addresses.
- Prevent SSRF: refuse private, loopback, link-local and other non-public address ranges (checked on the connected address), unless the user addressed such a host explicitly; and not follow redirects to such ranges, to another scheme, or — with credentials — to another host.
- Never run package lifecycle scripts: npm installs use
--ignore-scripts(or an equivalent that does not execute package code); Git checkouts run no hooks, filters or submodule commands from the repository; nothing is built. - Prevent path traversal during unpacking: reject archive entries with
absolute paths,
..segments or symbolic links pointing outside the destination; apply the package-root rules of the Pipe specification to every manifest path. - Treat fetched manifests as malicious until validated: safe YAML, size limit, schema validation, before anything else is read.
- Keep secrets out of the lockfile:
resolvedURLs MUST NOT contain credentials; registry and Git credentials come from the user's configuration and are sent only to the host they belong to. - Resist resource exhaustion: bound recursion depth and the number of dependencies.
Limits of what a lockfile gives:
- Integrity proves that content is unchanged, not that it is safe. Permissions are still enforce-or-refuse at run time, a subprocess is still not a sandbox, and trusted mode still grants real authority.
- A remote pipe's implementation is not pinned (section 4).
- Unreferenced supporting files of local pipes are not covered.
8. Compatibility and versioning #
- The format is identified by
openflange.org/lock/v0.1inspec. A tool MUST refuse (E_LOCK) a lockfile whosespecit does not support rather than guess. - Tools MUST preserve entries and
x-keys they do not understand when rewriting. - A change to the integrity computation is a new lock
specversion; lockfiles are regenerated withopenflange update. - While
experimental, a later 0.x version MAY change incompatibly, with aCHANGELOG.mdentry.
See COMPATIBILITY.md in the specification repository.
9. Deferred #
Not part of v0.1: signatures and provenance attestations; multiple
integrity algorithms; lockfile entries for pypi:, cran: and oci:
distributions; workspaces with several lockfiles; vendoring commands;
hashing of whole package trees; WASM artifacts. Execution-related
deferrals (event-time watermarks, session windows, checkpointing,
distributed scheduling, reconnect, dynamic ports) are listed in the
Pipeline specification and do not affect the lockfile.