Snapshots (.plx)

Deterministic JSON documents with integrity hashing. Implemented in parallax-snapshot.

Format

FieldDescription
magicMust be PARALLAX_PLX
format_versionSNAPSHOT_FORMAT_VERSION (1)
idUUID
created_atUTC timestamp
runtimeOrigin / target runtime kind
labelOptional
stateExecutionState shell (capabilities, heap JSON, metadata)
pirFull PirDocument
content_hashSHA-256 hex of canonical {format_version, runtime, state, pir}

Loaders reject bad magic, unsupported versions, invalid PIR, and hash mismatches (InvalidSnapshot).

CLI

# Capture
plx snapshot examples/demo.py -o demo.plx --label demo

# Inspect
plx inspect demo.plx
plx inspect demo.plx --json

# Restore into a runtime
plx restore demo.plx --target javascript

During migrate:

plx migrate examples/demo.py --to javascript --snapshot migrated.plx -o migrated.js

What is stored

For the supported binding-capture path, the important payload is pir.bindings. Stack frames, instruction pointers, and async state are typically empty — capabilities say so.

Integrity model

Snapshots are not cryptographic signatures. The content hash detects accidental corruption and casual edits. Treat them like build artifacts: transfer over trusted channels if the binding data is sensitive.