@@ -54,11 +54,101 @@ message IngestResponse {
5454 string id = 1 ;
5555}
5656
57+ // GetRequestHistoryByRequestIDRequest selects one request history by the ID
58+ // returned from Ingest.
59+ message GetRequestHistoryByRequestIDRequest {
60+ // Logical queue containing the request.
61+ string queue = 1 ;
62+ // Globally unique request identifier returned from Ingest.
63+ string request_id = 2 ;
64+ // Maximum entries to return. Zero selects the server default.
65+ int32 page_size = 3 ;
66+ // Opaque continuation token. Empty selects the first page.
67+ string page_token = 4 ;
68+ }
69+
70+ // GetRequestHistoryByURIRequest selects one request history by its exact commit URI.
71+ message GetRequestHistoryByURIRequest {
72+ // Logical queue containing the request.
73+ string queue = 1 ;
74+ // Exact VCS-agnostic commit URI supplied by the selected request.
75+ string uri = 2 ;
76+ // Maximum entries to return. Zero selects the server default.
77+ int32 page_size = 3 ;
78+ // Opaque continuation token. Empty selects the first page.
79+ string page_token = 4 ;
80+ }
81+
82+ // ValidationResult is the immutable validation verdict for one scope.
83+ message ValidationResult {
84+ // Degree measures how broken the scope is on [0.0, 1.0]. Zero is fully
85+ // green and one is fully broken.
86+ double degree = 1 ;
87+ }
88+
89+ // HistoryEntry is one retained request state or lifecycle event.
90+ message HistoryEntry {
91+ // Opaque stable identity of this logical occurrence within the request.
92+ string entry_id = 1 ;
93+ // Occurrence time in Unix milliseconds.
94+ int64 timestamp_ms = 2 ;
95+ // Exactly one occurrence kind is populated.
96+ oneof occurrence {
97+ // Durable request state reached by the request.
98+ string request_state = 3 ;
99+ // Event that occurred without changing the request state.
100+ string event = 4 ;
101+ }
102+ // Newer request that caused a superseded state. Empty when not applicable.
103+ string superseded_by_request_id = 5 ;
104+ // Build associated with the occurrence. Empty when no build applies.
105+ string build_id = 6 ;
106+ // Stable domain reason for a terminal request outcome. Empty otherwise.
107+ string outcome_reason = 7 ;
108+ // Recorded validation verdict. Present only when the occurrence established
109+ // an immutable validation fact.
110+ ValidationResult result = 8 ;
111+ }
112+
113+ // RequestHistory contains immutable request context and one ordered page of entries.
114+ message RequestHistory {
115+ // Globally unique request identifier.
116+ string request_id = 1 ;
117+ // VCS-agnostic commit URI validated by the request.
118+ string uri = 2 ;
119+ // Validation scope selected for the request.
120+ string build_strategy = 3 ;
121+ // Baseline URI for incremental validation. Empty for a full build.
122+ string base_uri = 4 ;
123+ // Entries ordered by occurrence time and stable entry identity.
124+ repeated HistoryEntry entries = 5 ;
125+ }
126+
127+ // GetRequestHistoryByRequestIDResponse contains one page of request history.
128+ message GetRequestHistoryByRequestIDResponse {
129+ // Selected request history and immutable context.
130+ RequestHistory history = 1 ;
131+ // Opaque continuation token. Empty on the final page.
132+ string next_page_token = 2 ;
133+ }
134+
135+ // GetRequestHistoryByURIResponse contains one page of request history.
136+ message GetRequestHistoryByURIResponse {
137+ // Selected request history and immutable context.
138+ RequestHistory history = 1 ;
139+ // Opaque continuation token. Empty on the final page.
140+ string next_page_token = 2 ;
141+ }
142+
57143// Stovepipe provides the Stovepipe API.
58144service Stovepipe {
59145 // Ping returns a response indicating the service is alive
60146 rpc Ping (PingRequest ) returns (PingResponse ) {}
61147 // Ingest admits a queue's newly observed commit into the validation pipeline and returns
62148 // the minted request ID. The caller hands off asynchronously; validation happens later.
63149 rpc Ingest (IngestRequest ) returns (IngestResponse ) {}
150+ // GetRequestHistoryByRequestID returns retained history for one request ID.
151+ rpc GetRequestHistoryByRequestID (GetRequestHistoryByRequestIDRequest ) returns (GetRequestHistoryByRequestIDResponse ) {}
152+ // GetRequestHistoryByURI returns retained history for one exact commit URI.
153+ rpc GetRequestHistoryByURI (GetRequestHistoryByURIRequest ) returns (GetRequestHistoryByURIResponse ) {}
64154}
0 commit comments