1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! The registry document: which repository identities exist, which checkouts
//! belong to each, and where the rules file lives.
//!
//! Version 6 is version 5's identities, checkouts, and rules reference, with the
//! two inferred identity fields taken away. The document is replaced atomically
//! under process-shared locks, and a v2–v5 document is migrated lazily on read.
//!
//! **An identity records no publication classification.** Versions 2 through 5
//! wrote a `workflow` and a `repo_type` beside each identity, both inferred at
//! registration from one fact — whether the origin had a host — and neither
//! settable afterwards. Every decision they made is the resolved publication policy's
//! now, which the rules file configures per organisation or per repository, so
//! this shape does not name them: a document that still carries them is migrated
//! past them — `store` drops exactly those two keys on the rewrite and keeps every
//! other key it has no opinion on — and nothing consults what they said.
//!
//! **Release targets are deliberately not reachable from here.** The release-targets
//! document is found at its conventional path under the state root and nowhere else,
//! so this document is byte for byte the same whether or not a host configures any —
//! see `docs/inferred-surface.md` for why a key here was withdrawn rather than
//! defended.
//!
//! Nothing here declares `deny_unknown_fields`, and that is deliberate: a document a
//! *newer* build wrote must still load here, carrying whatever keys that build
//! named. `store` is what keeps those keys — it reads the remainder this shape
//! ignored and writes it back — so an older build meeting a newer host's registry
//! degrades rather than stopping it.
use BTreeMap;
use PathBuf;
use ;
/// The registry document as it is stored on disk.
/// One repository identity. Every checkout that normalizes to the same origin
/// shares this metadata.
/// One registered checkout of a repository identity.