Files
alkgit/docs/architecture/README.md
T
glm-5.3-flash 82653c31b6 docs(architecture): ADR-017 — consumer half, GitSession as typed client (review 001 A-5)
- new ADR-017: GitSession is a real typed client in v1 (ls_refs/fetch/
  push), grounded in the two deployment use cases — the p2p replicator
  is the named downstream and needs the client protocol layer; the
  thin-wrapper reading is superseded
- fetch client reuses gix-protocol (async-client) over a custom
  alkcall gix_transport::client::Transport impl (handshake writes the
  ADR-016 request line on the direct path; the channels open-op params
  carry it otherwise); push hand-rolled to ADR-013's shapes (gitoxide
  has no send-pack client)
- storage-agnostic: packs stream both ways to caller-owned consumers;
  no in-session credentials (alkcall transport authenticates); client
  sessions carry ADR-009 Limits (client is also internet-facing)
- manifest: gix-protocol/gix-transport gain async-client features
  (verified against published tree, MSRV 1.88)
- amend ADR-010 (consumer-half bullet) and ADR-012 §4 (the deferred
  gix-protocol call — resolved; rider superseded); backend/transport/
  overview/doors wording; review 001 A-5 marked resolved

verification: cargo check (default, --all-features, --no-default-features,
--features sha256), cargo +1.88 check, cargo test, clippy
-D warnings, fmt --check — clean across the matrix
2026-09-29 09:24:47 +00:00

5.2 KiB

status, last_updated
status last_updated
draft 2026-09-25

alkgit Architecture

Phase 1 (SDD) output for alkgit — the git payload service of the alk family: a pure protocol crate on alkcall channels (the alk/git ALPN), following the alktty/alktunnels template (ADR-010). Phase 0 research lives in docs/research/; every design claim here traces to a POC finding or research doc, or is flagged as an open question.

Current State

Phase 1, architecture committed to the pure-protocol-crate shape (ADR-010; OQ-09 resolved). POC-1/2/3 validated the git protocol half end-to-end against real git 2.43. Previous cycles settled the auth/backend theme (ADR-011, ADR-012). This cycle settled the wire surface against real-client captures: the receive-pack push state machine (ADR-013, OQ-04) and the V2 multi-round negotiation ack loop (ADR-014, OQ-02). All wire-layer design is now capture-grounded; the remaining open questions are the publish-freeze timing (OQ-03, a release decision), sha256 policy (OQ-05, deferred on ecosystem need), and the grant-key identity namespace (OQ-16, deferred on the first cross-assembly deployment — blocks nothing in v1). ADR-015 resolved review 001's A-1 (the repo-op gate) with the manage grant tier; ADR-016 resolved its A-3 (the native session preamble — {repo, service} open-op params, the git-daemon request line on the direct path, and the service dimension in the session tuple); ADR-017 resolved its A-5 (the consumer half: GitSession is a real typed fetch/push client in v1 — the direct-connection primitive for the p2p replicator deployment).

Architecture Documents

Doc Area Status
overview.md Cross-cutting: crate shape, halves, security invariants draft
transport.md Wire layer: substrates, V2 state machines, upload/receive-pack draft
backend.md Backend traits + feature-gated gix implementation draft
doors.md Door mappings: alkhttp git feature, alkssh requirement, native path draft
open-questions.md Centralized OQ tracker —

ADRs

ADR Decision Status
001 Workspace crate decomposition (5 crates) Superseded (ADR-010)
002 Session boundary (identity, repo, stream, limits) Accepted
003 Protocol V2-first with honest capability advertisement Accepted
004 Pack pipeline (data::output gen / data::input ingestion) Accepted
005 Session substrate types (duplex + stateless APIs) Accepted
006 HTTP adapter composition (alkgit-owned router factory) Superseded (ADR-010)
007 ACL runs before any advertisement/ref line Accepted
008 Wire repo names are registry IDs, never paths Accepted
009 Bounded-resources budget model Accepted
010 Pure protocol crate (alktty/alktunnels template) Accepted
011 Per-repo authorization (grants in records, policy in core) Accepted
012 Registry backing, write surface, CRUD ops, feature split Accepted
013 receive-pack state machine (V0-framed push, thin-pack, unpack-first CAS) Accepted
014 V2 negotiation ack loop (no ready, wait-for-done stays) Accepted
015 Manage grant tier + repo-op gate (admin scope OR manage grant) Accepted
016 Native session preamble ({repo, service} params, request line, service in tuple) Accepted
017 Consumer half — GitSession typed fetch/push client (custom alkcall Transport + gix-protocol, hand-rolled push) Accepted

Open Questions

All unresolved questions are tracked in open-questions.md with stable OQ-IDs, priorities, and cross-references. Remaining: OQ-03 (publish freeze inventory — partially resolved, blocked on first-publish timing), OQ-05 (sha256, deferred on ecosystem need), and OQ-16 (grant-key identity namespace, deferred on the first cross-assembly record-sharing deployment). The wire-layer questions (OQ-02, OQ-04) resolved this cycle with ADR-014/ADR-013.

Document Lifecycle

Status Meaning Transitions
draft Under active development; may change significantly → reviewed when its OQs are resolved
reviewed Architecture final; implementation may begin; changes need review → stable when implementation verified
stable Locked; changes require review, may warrant an ADR → deprecated when superseded
deprecated Superseded; kept for reference Removed when no longer referenced