@@ -32,7 +32,7 @@ message ContractCaseConfig {
3232 TriggerFunctionHandle trigger_and_test = 14 ;
3333
3434 google.protobuf.StringValue base_url_under_test =
35- 15; // Long term, this will be moved
35+ 15; // Long term, this will be moved
3636}
3737
3838// Indicates a successful response with no payload
@@ -237,47 +237,63 @@ message ResultResponse {
237237message DefinitionRequest {
238238 google.protobuf.StringValue id = 1 ;
239239 oneof kind {
240- // From user calls
240+ // Host language wants to begin a definition
241241 BeginDefinitionRequest begin_definition = 2 ;
242+ // Host language wants to run an example that returns success
242243 RunExampleRequest run_example = 3 ;
244+ // Host language wants to run an example that returns a failure
243245 RunRejectingExampleRequest run_rejecting_example = 4 ;
246+ // Host language wants to strip the matchers from a defintion
244247 StripMatchersRequest strip_matchers = 5 ;
248+ // Host langauge has finished the definition
245249 EndDefinitionRequest end_definition = 6 ;
246- // Answering server driven RPC calls
250+ // Core returns a response to a host call
247251 ResultResponse result_response = 7 ;
248252 }
249253}
250254
251255message BeginVerificationRequest {
256+ // The configuration for this verification
252257 ContractCaseConfig config = 1 ;
258+ // Version strings of all ContractCase components for maintainer logs
253259 repeated google.protobuf.StringValue caller_versions = 4 ;
254260}
255261
256262message AvailableContractDefinitions {
257263}
258264
259265message RunVerification {
266+ // Any configuration overrides for this verification
260267 ContractCaseConfig config = 1 ;
261268}
262269
263270message StartTestEvent {
271+ // The name of this test (human readable)
264272 google.protobuf.StringValue test_name = 1 ;
273+ // An ID for a callback to the test invoker when the core is ready
265274 google.protobuf.StringValue invoker_id = 2 ;
266275}
267276
268277message InvokeTest {
278+ // Callback ID from the host language in a start test event
279+ // Used by the core to invoke a specific test
269280 google.protobuf.StringValue invoker_id = 1 ;
270281}
271282
272283message VerificationRequest {
273284 google.protobuf.StringValue id = 1 ;
274285 oneof kind {
275- // From user calls
286+ // Host language wants to start a verification session
287+ // Used to do initial setup by the core - must be called before
288+ // run_verification
276289 BeginVerificationRequest begin_verification = 2 ;
290+ // Host language wants to know what contracts are available
277291 AvailableContractDefinitions available_contract_definitions = 3 ;
292+ // Host language wants to run a verification
278293 RunVerification run_verification = 4 ;
279- // Answering server driven RPC calls
294+ // Core is responding to a host call
280295 ResultResponse result_response = 5 ;
296+ // Core wants to invoke a specific test
281297 InvokeTest invoke_test = 9 ;
282298 }
283299}
@@ -306,8 +322,8 @@ message ContractResponse {
306322
307323service ContractCase {
308324 rpc ContractDefinition (stream DefinitionRequest )
309- returns (stream ContractResponse ) {}
325+ returns (stream ContractResponse ) {}
310326
311327 rpc ContractVerification (stream VerificationRequest )
312- returns (stream ContractResponse ) {}
328+ returns (stream ContractResponse ) {}
313329}
0 commit comments