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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
//! alkgit: git smart protocol for the alk family.
//!
//! A pure protocol crate (ADR-010, the alktty/alktunnels template) on
//! alkcall channels — the `alk/git` ALPN: the git smart protocol as
//! producer/consumer halves over the alk-family call fabric. The crate
//! carries no binary and no front doors — the alkhttp `git`/`lfs`
//! features and alkssh are family infrastructure (docs/architecture/
//! doors.md); a downstream app embeds this crate, brings its own door,
//! and supplies the backends. The shipped substrate composition is the
//! separate `alkgit-substrate` crate; this crate is substrate-free by
//! construction. The architecture specs are `docs/architecture/`
//! (transport.md, backend.md, doors.md + the ADRs); each API's contract
//! stamps are on the items themselves.
//!
//! # The backend seam (ADR-018)
//!
//! Everything the wire layer runs *through*: the `#[async_trait]` +
//! `Send + Sync` trait family every backend implements (the shipped
//! impls are the substrate crate's) — [`GitRegistry`] /
//! [`GitRegistryStore`] (the registry family) and [`GitRefs`] /
//! [`GitPackGen`] / [`GitPackIngest`] (the object-storage family, the
//! prepare/apply split with the [`PreparedPush`] seam); the repo
//! record family ([`RepoRecord`], the repo-id grammar
//! [`validate_repo_id`]); the error model ([`RegistryError`] +
//! [`StorageError`]); the budget model ([`Limits`], ADR-009 — wall
//! clock, request bodies, advertisement refs, negotiation rounds,
//! haves per round, the pack size, the packless peek window, the
//! blocking-pool concurrency); and the wire shapes both transport
//! directions speak ([`RefLine`], [`RefUpdate`], [`RefOutcome`],
//! [`PushOptions`]).
//!
//! # The session substrates and serving entries (ADR-005)
//!
//! Two substrate mechanisms, both taking the ADR-007
//! [`AuthorizedRepo`] marker by type so a session cannot reach the
//! wire unchecked:
//!
//! - **duplex** (§1, the pkt-line framing layer the native transport
//! drives): [`Session`] (the request reader with the stop-delimiter
//! discipline, the writer machinery, the [`RawTail`] raw-tail
//! escape), the [`Sideband`] blocking-side sink, and the serving
//! entries — [`serve_duplex`] (advertisement-once + command loop /
//! one-request push, under the wall clock) with the resolve→authorize
//! front [`serve_duplex_resolved`].
//! - **stateless** (§2, the smart-http framing facts the http door
//! mounts): [`StatelessRequest`] (the capability-dump skip, the
//! delim-aware split, the flush-only probe, the raw-tail escape),
//! [`StatelessResponse`] (one-shot flush, never `0002`), the
//! [`BodyReader`] door-body adapter, and the entries —
//! [`serve_stateless_post`] (one POST = one command invocation) and
//! [`serve_stateless_advertisement`] (the `info/refs` GET emission).
//!
//! # The protocol machines
//!
//! V2 fetch ([`advertise_v2`] — the honest capability list;
//! [`serve_ls_refs`] — the ls-refs grammar;
//! [`serve_fetch_round`] + [`parse_fetch_args`] — ADR-014's ack loop
//! and argument grammar with the rounds/haves/pack budgets) and
//! receive-pack ([`advertise_v0`] — the V0 push advertisement;
//! [`parse_push_request`] + [`serve_receive_pack`] — ADR-013 §3–11 as
//! amended by ADR-020 §1: command grammar, the bounded packless peek
//! with the duplex/stateless tail disciplines, prepare-under-permit
//! ingestion with the single CAS home, and the substrate-owned status
//! report framing via [`bridge_pack_source`], the pack stream the raw
//! tail hands through — [`PackSourceFault`] is its typed budget class).
//! The transport-side ACL completes the layer: [`authorize`] (the
//! ADR-011/015 policy), [`validate_ref_name`] (ADR-013 §9's deny-list).
//!
//! # The transport (producer half)
//!
//! The direct-ALPN [`GitAdapter`] — the `alk/git` `ProtocolHandler`
//! whose session boundary is the ADR-016 preamble: the request-line
//! grammar ([`RequestLine`], [`parse_request_line`],
//! [`read_request_line`]) and the channels open op
//! ([`register_openable`] — the `channels/git/sub` establisher gate,
//! ADR-016 §1). The `git/repo/*` op family ([`register_repo_ops`],
//! ADR-012 §3/§5 with the ADR-015 two-tier gate) rides the same
//! registry.
//!
//! # The consumer half
//!
//! [`GitSession`] (ADR-017, in the POC-X-validated shape of ADR-023):
//! a typed git client over gix-transport's git-daemon `Connection` on
//! the alkcall `BiStream` compat halves, split into flat sibling
//! modules (one workstream one file): `session` carries the
//! construction + handshake workstream and the shared drain helpers
//! both clients build on; `session_fetch` the fetch workstream —
//! [`GitSession::ls_refs`] / [`GitSession::fetch`], the client side of
//! the V2 grammar above; `session_push` the hand-rolled push
//! workstream ([`GitSession::push_advertisement`],
//! [`GitSession::push`]) — all bounded by the client-direction budget
//! kinds, no credentials on the session surface (their types re-export
//! through `session`, so the crate's public paths are unchanged).
pub use GitAdapter;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;