Artifact 163ab43a0e9b44f32fa2a4f9ca0c7e05fe013aa0de49af95f1952457d887463d:
- File projects/fossil/briefs/repo-state.md — part of check-in [73947490fd] at 2026-07-07 14:14:30 on branch trunk — Track RepoState brief in Fossil suite pack (user: dmestas, size: 4779) [annotate] [blame] [check-ins using]
RepoState RFC Brief
Document identity
- Title:
The Fossil Distributed Version Control System: Repository State and Check-in Resolution - Working docname:
draft-fossil-repo-state-00 - Role in the suite: later-added companion RFC that specifies the derived repository-state semantics that could not remain implicit inside Artifact and Sync.
Objective
Specify how a Fossil repository derives repository views from the crosslinked set of stored structural artifacts.
The document owns the computation of:
- the check-in DAG built from manifest parent cards,
- crosslink processing from stored structural artifacts into repository tag state,
- tag propagation and blocking,
- branch membership,
- leaves and open leaves,
- symbolic-name resolution,
- and the
current-trunkcheck-in derived from the artifact set plus the repository-local main-branch setting.
The document is a companion to Artifact, which defines the card and hash syntax whose downstream effect is computed here, and to Sync, which moves the artifacts between peers.
Clean-room capability target
A clean-room implementer must be able to:
- build the check-in DAG from stored manifests and their parent references,
- crosslink structural artifacts into repository tag state,
- compute branch membership from propagated branch tags,
- enumerate leaves and open leaves with closed-marker handling,
- resolve a symbolic branch or tag name to a single check-in,
- and resolve
current-trunkfrom the repository default branch configuration plus the derived repository state.
Required section inventory
The document should keep this section shape:
- Introduction
- Scope
- Terminology
- Check-in DAG Construction
- Linkage record shape
- Primary parent vs. merge parents
- Ancestry direction and traversal
- Crosslink Processing
- T-card syntax validation
- Crosslink procedure
- Rejection conditions
- Comment rendering of crosslink effects
- Serialization of tag artifacts
- Tag Types and Propagation
- Tag Type Values
- Storage Model
- Direct Application Procedure
- Propagation Algorithm
- Blocking Conditions
- Branch Membership and Naming
- Branch of a check-in
- Branch creation
- Enumerating branches
- A note on branch current
- Leaves
- Definition
- Normative leaf test
- Maintenance algorithm
- Open leaves and closed-marker semantics
- Leaf-set enumeration and ambiguity
- Triggers for re-evaluation
- Relationship to name resolution
- Symbolic Name Resolution
- Scope
- Rule
- Procedure
- Branch-walk rule
- Distinguishing name resolution from open-leaf enumeration
- Current Trunk and Forks
- Worked Example: Fork with a Closed Leaf
- IANA Considerations
- Security Considerations
- Normative References
Boundaries and dependencies
- Artifact dependency: Artifact owns the byte-level grammar of the P and T cards, artifact-hash syntax, content-type determination, and delta-manifest reconstruction. RepoState consumes that syntax and specifies the downstream repository-state effect.
- Delta dependency: Delta remains the byte-level content-delta format beneath delta-manifest/file reconstruction; RepoState does not redefine delta encoding.
- Sync dependency: Sync owns transport, admission, and artifact exchange between peers. RepoState assumes the repository already has the relevant artifacts and defines the derived views over the resulting stored set.
- File-tree boundary: RepoState determines which check-in constitutes a given repository state; materializing that check-in's file tree stays in Artifact's delta-manifest/file reconstruction procedures.
Required emphasis points
- Name resolution and open-leaf enumeration are distinct and must not be collapsed.
- Closed-ness and leaf-ness do not filter symbolic-name resolution unless the rule explicitly says so.
current-trunkis derived from the repository-local default branch name together with the artifact set; it is not a synchronized wire value.- Branch and tag propagation follow the primary-parent/primary-child chain and do not cross merge edges.
Known reviewer watch points
Keep these explicit so the document does not drift back into source-familiarity assumptions:
- exact-equal-
mtimeties between candidate check-ins need either a deterministic stated rule or an explicit implementation-defined note; do not invent an unstated tie-breaker, - representative branch-entry and merge-target child choice need deterministic wording if they remain part of the public behavior,
- the worked example should show the divergence between symbolic-name resolution and open-leaf enumeration when a newer closed leaf exists.