Browse architecture
Main page
LayerStack architecture

One durable filesystem truth. Many isolated workspaces.

LayerStack orders immutable B, L, and S layers in a newest-first manifest. Each session leases that chain, projects it through OverlayFS with a private upperdir, and changes durable truth only through conflict-aware atomic publication.

The stack is durable. The execution view is leased. Mutation is private. Publication is atomic.

Persistent core

manifest.json

newest first
L000024published delta
S000018compacted run
B000001shared base

Visible order

manifest-owned

Retention

lease-pinned

The LayerStack loop

A workspace is a temporary projection. Publication returns it to the stack.

Storage and the namespace process substrate are independent roots. They meet in a leased overlay view; private mutations become durable only when capture and publication close the loop.

Durable truth

LayerStack store

The manifest defines the visible filesystem. Immutable layers carry base bytes, published changes, and compacted history; leases decide what may be reclaimed.

manifestordered view
B* · L* · S*immutable bytes
leasesstable pins
Leased projection

Overlay workspace view

Pinned lowerdirs and a fresh upperdir become one workspace inside the holder's mount namespace.

Private mutation

Execute and edit

Commands and live file operations read the union while every write, copy-up, and deletion stays in the session upperdir.

Return path

Capture, resolve, and prepend one L* layer

upperdir changes
per-path OCC
atomic publish

Publication closes the loop by prepending the resolved changeset to the LayerStack manifest.

Squash is a maintenance side loop. It compacts eligible L/S runs and remounts safe live sessions without changing visible bytes; it is not the end of every request.

Durable
One newest-first manifest orders immutable B, L, and S layers.
Stable
A lease pins the exact lower-layer chain used by a live session.
Private
Commands and file operations mutate only the session upperdir.
Atomic
A resolved changeset becomes one new L layer, or publication rejects it.