Artifact d3e899b794152a75346f21d7d77d9363f917983e0caf3313d6ee8e59aebe189e:
- File docs/rfcs/erratum/submanifests-00-s7.2-peer-capability-pragma.md — part of check-in [6588d1bb3b] at 2026-10-19 17:04:49 on branch trunk — submanifests §7.2: the gate reads a send-submanifests pragma, not the announced version; every Fossil release announces a version that reads as pre-S (user: dmestas, size: 4887) [annotate] [blame] [check-ins using]
Erratum — draft-fossil-submanifests-00 §7.2
| Document | draft-fossil-submanifests-00 |
| Section | 7.2 — Peer-Version Gate (what the sender reads to decide whether the peer can receive an S-bearing artifact) |
| Type | Technical (the gate keys on a version integer that a non-implementing peer will announce) |
| Status | Applied in draft-fossil-submanifests-00 (2026-10-19) |
| Reported | 2026-10-17 |
| Submitter | Dan Mestas |
| Found via | Reviewing go-libfossil's implementation of the gate against zit's; both had fixed the threshold at 22900 |
1. Summary
§7.2 gates S-bearing artifacts on "the remote peer's announced version",
with "a threshold to be fixed at the first release implementing this
specification". Both implementations fixed it at 22900, the version
integer of Fossil 2.29, reasoning that it was the first value above the
newest release. Fossil has no plans to implement sub-manifests, in 2.29
or later, so 22900 is exactly what Fossil 2.29 will announce, and any
>= threshold matches some future Fossil. Once such a Fossil syncs with
a repository holding trees, the gate passes it S-bearing artifacts and
Fossil rejects them as structural, the silent divergence §8 exists to
prevent. The announced version cannot carry this capability: it belongs
to Fossil's release line, and the implementations of this specification
will be zit, go-libfossil and perhaps libfossil, none of which is a
Fossil release.
2. The text in error
§7.2, first paragraph:
When the remote peer's announced version predates sub-manifest support (a threshold to be fixed at the first release implementing this specification) and a local artifact is of type SUBMANIFEST, or is a manifest carrying an S card, the sender MUST refuse to transmit that artifact, with an explicit error -- never by converting, downgrading, or silently omitting it. The rule parallels the SHA3-256 peer-version gate of [FossilSync], Section 7.6.
3. What the implementations do
zit announced its base version raised to 22900 whenever it could read
trees, and refused S-bearing artifacts to any peer announcing less
(submanifestPeerVersionGate, announcedVersion in src/sync.zig).
go-libfossil implemented the same threshold and recorded the collision
with Fossil 2.29 as its deviation SM-7.2-1. Fossil itself tests the
announced version only for < 20000 (SHA3 support) and >= 22700
(the xfer field-count check), and ignores any pragma it does not know
([FossilSync] §3.5).
4. Corrected text
Replace §7.2's title and first paragraph with:
7.2. Peer Capability Gate
A peer that reads sub-manifests (Section 5) announces it with the flag pragma send-submanifests. A client sends it in every request, in the leading pragma run after client-version; a server sends it in every reply, in the leading pragma run after server-version, on a clone reply as on any other. The pragma states what the peer can read; it is independent of the enable-submanifests setting (Section 8.1) and of the avoid-submanifests pragma below. A peer that does not implement this specification never sends it and ignores it when received ([FossilSync], Section 3.5). The gate does not read the announced version: Fossil does not implement sub-manifests, so every version integer a Fossil release announces denotes a peer that does not read them.
When the remote peer has not sent send-submanifests and a local artifact is of type SUBMANIFEST, or is a manifest carrying an S card, the sender MUST refuse to transmit that artifact, with an explicit error -- never by converting, downgrading, or silently omitting it. A server decides from the request it is answering; a client decides from the replies it has received in the session, and a client uploads only in answer to a gimme, which arrives in a reply, so the server's announcement precedes the first artifact the client could send. A peer that has not sent the pragma is treated as one that does not read sub-manifests. The rule parallels the SHA3-256 peer-version gate of [FossilSync], Section 7.6, in its refusal; it differs in what it reads.
5. Observable consequence of the uncorrected text
A repository holding tree manifests, served by an implementation of the
uncorrected text, syncs with Fossil 2.29 as if Fossil read sub-manifests.
Fossil receives a SUBMANIFEST artifact or a manifest with an S card and
reports unrecognized card; its check-in graph is truncated at the first
tree. With the corrected text a Fossil peer of any version is refused
those artifacts with an explicit error, as §7.2 intends.
6. Implementations
zit sends and reads send-submanifests, gates on it, and announces its
base version again. go-libfossil will switch from the 22900 threshold to
the pragma so the two stay interoperable.