LibTmux.Snapshot.Fixture
Build validated detached snapshots for pure application tests.
Source and package
- Qualified name
-
LibTmux .Snapshot. Fixture - Package
- libtmux-haskell
- Source
- src/LibTmux/Snapshot/Fixture.hs
- LibTmux.Snapshot.Fixture
-
Description#
No operation in this module contacts tmux. Named fixture references can model successive observations; they never equal a live Server generation. Snapshot and live-reference constructors remain hidden. Validation checks graph and metadata laws; wire decoding, tmux normalization and transport limits belong to acquisition rather than fixture construction.
Start with
fixtureOriginandemptyFixture, construct ordinary observation records using this module's reference builders, then callvalidateFixture.What is on here
Its exports fall into these groups, in export-list order:
- Complete fixture inputs
- Validation
Members11#
Common operations4#
- emptyFixture function Empty complete inputs with explicit synthetic metadata: PID 1, epoch 0
and path
fixture:offline. No process or socket exists by implication. The version and every edited field are checked byvalidateFixture. - FixtureError data type A failed graph or complete-snapshot validation, with domain context from the validator. Failed input never becomes an empty snapshot.
- fixtureOrigin function Select a pure fixture namespace. No endpoint lookup or random IO occurs.
- validateFixture function Validate and force owned values using the capture graph's invariants. Successful fixtures have no acquisition interval and carry offline provenance. Their references cannot equal references from a Server scope.
Other members7#
- AttachedClient data type An attached client's native identity and context before graph validation. Validation resolves its values from the same snapshot; it never trusts a caller-supplied nested attachment record.
- Fixture data type Ordinary finite inputs. Validation applies the captured graph's laws; record construction or updates alone do not establish those laws.
- fixtureGeneration function The offline generation for
Fixturemetadata. Replacing it with a connection generation causesvalidateFixtureto reject the metadata. - FixtureOrigin data type A named offline namespace. Equal names deliberately compare equal, so tests can model successive observations. This cannot represent a Server.
- paneRef function Construct a pane reference without consulting or targeting a daemon.
- sessionRef function Construct a session reference that belongs only to this offline origin.
- windowRef function Construct a physical window reference without granting live authority.
Guides#
Pages that discuss LibTmux.Snapshot.Fixture.