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
//! Longitudinal contributor profiling.
//!
//! Why: a single code review sees one change. Aggregating months of a
//! contributor's commits into period batches shows what a per-PR view cannot —
//! which issues keep coming back, which stopped, and which way quality is
//! moving. Contributor profiling is tga's domain: it is the crate that already
//! owns commit history, identity resolution, and period trends (#5468).
//!
//! What: the pipeline runs in stages, each usable on its own:
//!
//! 1. [`selector`] — turn a login, name, or email into a canonical identity.
//! 2. [`batch`] — bucket that contributor's history into [`PeriodBatch`] windows.
//! 3. [`diff_sampler`] — attach a stratified sample of real diffs per period.
//! 4. [`batch_reviewer`] — build each period's review prompt, send it through
//! `trusty_common::inference`, and parse its answer.
//! 5. [`synthesizer`] — tag findings across periods and derive the trajectory.
//! 6. [`reporter`] — render JSON and Markdown.
//!
//! Stages 1–3 are fully deterministic, as is the first half of stage 5. Stages
//! 4 and 5 reach a model, and since #5464 they do so through
//! `trusty_common::inference` — so profiling needs no Cargo edge to
//! trusty-review. A run that skips the model still produces a complete profile
//! with a fallback narrative; a run where SOME periods failed reports that in
//! [`PeriodRunSummary`] rather than presenting them as clean (#5465).
//!
//! Stages 4 and 5 both constrain their answer with a JSON Schema, and since
//! #5588 both hand it over through
//! [`trusty_common::inference::ChatRequest::response_schema`] where the provider
//! can enforce it — [`schema_delivery`] owns that fork, and the prose fallback
//! behind it.
//!
//! [`reporter_github`] publishes the rendered report to a per-contributor
//! GitHub issue thread, and `tga profile` drives the whole pipeline from the
//! command line (both #5465).
//!
//! Ported from trusty-review's `src/profile/` under #5463. The port drops that
//! crate's `Finding`/`Effort`, LLM client, review config, and GitHub client; see
//! [`types::finding`] for why the finding DTO is tga-native.
//!
//! Test: each submodule carries its own tests; see the `Test:` pointers there.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use deliver_schema;
pub use ;
pub use ;
pub use ;