Skip to content

ADR-00048: An SWFS operation is handed a revision to hold, as a FUSE operation is

Field Value
Status accepted
Date 2026-12-01

Context and Problem Statement

The SWFS provider was given a revision one file at a time, so a clone or a sync walked the whole tree and downloaded every file's content before it returned. The FUSE provider held its state, and was handed a revision whole. Align the SWFS provider with the FUSE provider sets out the problem, the design and the alternatives. This record marks where the implementation departs from accepted ADRs.

How should an SWFS operation take the revision a clone or a sync moves the instance to?

Decision Drivers

The proposal's goals: a clone or a sync whose cost follows the change and not the repository, and one path through each command for both virtual providers.

Considered Options

  • Hand an SWFS operation the revision through the hand-over FUSE takes.
  • The alternatives the proposal rejects (Alternatives Considered).

Decision Outcome

Chosen option: "hand an SWFS operation the revision through the hand-over FUSE takes", for the reasons the proposal gives. The SWFS provider answers FilesystemProvider::holds_state as true, and a clone or a sync hands its operation the target revision (InstanceOperationImpl::hold_state).

This supersedes two records, each in one respect. The rest of what each decided stands.

  • ADR-00042: its driver that the provider interface carries no state hand-over for SWFS. A command still stores a link or layer change inside the operation that makes it.
  • ADR-00034: a clone limited to a dependency set is refused on SWFS, as on FUSE. The mount still filters what it serves by the view, and a failed operation still keeps what the working tree showed.

The change that makes this decision concrete implements the proposal in part. Two things the proposal describes are not built yet:

  • Link and layer commands. The proposal keeps every link and layer command SWFS supports, by making Lore's refusals follow what a provider can serve. Until that is built they follow whether the provider holds its state, so link add, a commit of a link alone or of a layer, and a sync of an instance that holds a layer are refused on SWFS, where they succeeded. ADR-00036 stands: the mount still serves each link and layer from its own repository, and the proposal returns these commands to what that record describes.
  • --prefetch. An SWFS clone still ignores it.

Consequences

  • Good, because an SWFS clone or sync downloads neither the tree nor file content.
  • Bad, because an SWFS instance is no longer fully readable offline straight after a clone, and a clone limited to a dependency set is refused.
  • Bad, because the link and layer commands above are refused on SWFS until the rest of the proposal is built. This is a regression, not a decision.

More Information

The proposal's SWFS holds its state (G1) covers the hand-over, links and layers, and selective sync, and its Compatibility covers what breaks. Revisit this record when the refusals follow what a provider can serve: the regression above ends then.