Expand description
Ports: the traits the engine’s business logic owns and adapters implement.
Dependency direction only (ADR 0020). These exist so pipeline,
invariants, tree, worktree and crates/stack never name
gitio::Repo — each function’s bound list is a reviewable statement of
exactly how much git it is allowed to touch, and invariants can no longer
so much as express git log.
Consumed by static dispatch. There is exactly one implementation of
each git port, gitio::Repo, and ADR 0020 forbids a second one — a fake
git for tests included. Invariants 1–4 compare the engine’s reconstruction
against git’s own answer; against a fake they would compare the fake with
the fake and pass while proving nothing (ADR 0002). Tests use hermetic
temporary repositories and real git.
The two runtime-open abstractions in this crate — llm::LlmBackend and
lang::Language — are deliberately NOT here. They are dyn because config
and a plugin registry pick them at run time; nothing in this module is
chosen at run time.
There is no trait Git: ObjectReader + … convenience supertrait, and there
must not be: the whole value is that a consumer’s bounds name what it
actually needs.
Structs§
- Attr
Value - One
check-attranswer for one path. - Commit
Identity - Author/committer identity for a synthetic commit. Domain data: a renderer decides who its commits belong to.
- Commit
Summary - Filed
Review - One review as the catalogue sees it.
Enums§
- Index
Entry - One record to feed a scratch index.
- Review
Identity - What a review was opened as. The id is a hash of this, so the id alone cannot answer what a review’s endpoints mean today.
Traits§
- Ancestry
- Placing one review’s head against another’s.
- Artefact
Store - Somewhere the model can read the pre-group document from (ADR 0022).
- Attribute
Source - gitattributes lookup, for the generated-file hint — never enumeration.
- Commit
History - History browsing for the review-source picker.
- Commit
Writer commit-tree. Separate fromIndexSessionbecause it does not touch an index — it takes a tree oid already written.- Config
Source - Where configuration comes from.
- Diff
Source - Canonical enumeration (ADR 0005: total, no exclusions, ever).
- Grouping
Cache - The grouping cache (ADR 0009).
- Index
Session - A scratch index, alive as long as the value. Dropping it removes the temporary index file; blobs it wrote stay in the odb, unreferenced.
- Object
Reader - Reading objects out of the odb.
- Object
Writer - Writing objects into the odb. Loose and unreferenced (so gc-able) by
design — the engine creates a ref only where
RefWritersays so. - Range
Resolver - Turning what the user typed into diff endpoints. Consumed only by
pipeline: nothing downstream of resolution ever re-resolves. - Recount
Source - Invariant 4’s independent patch source, and nothing else.
- RefWriter
update-ref. The only port in the engine that mutates repository state a user can see, with exactly one consumer: the shadow-branch renderer.- Repo
Layout - Where this repository’s differential state lives. Path policy is domain
(
plan::grouping_cache_dir,plan::review_dir); this only says where the repository keeps its shared git directory. - Review
Catalogue - Every review filed in this repository, and the joins between them.
- Review
Store - One review’s sidecar (ADR 0013).
- Tree
Builder - Opening a scratch index. Never the user’s index, never a checkout (ADR 0011).
- Tree
Resolver - Peeling an endpoint to its tree oid — the one thing invariant 3 compares against.
- Working
Copy - Reading the working copy. Only the ADR-0017 snapshots use this.