phosphorus: Add fields to FetchCrashes proto.

In order to monitor success of the FetchCrashes API, add fields to the
command output to compare it with crashes found by the RTD.

Also, add a field to each individual crash's information to indicate the
base portion of the name of the crash file (to make it easier for devs
to find the right one in stainless).

BUG=1107005
TEST=./generate.sh succeeds

expand protos for missing crashes

Change-Id: I34cbac80668d9f13f5f2b624c92df01aefe3b5fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/2580192
Reviewed-by: Jared Loucks <jaredloucks@google.com>
Commit-Queue: Miriam Zimmerman <mutexlox@chromium.org>
diff --git a/go/test_platform/phosphorus/fetchcrashes.pb.go b/go/test_platform/phosphorus/fetchcrashes.pb.go
index 9afb4cc..6e7a588 100644
--- a/go/test_platform/phosphorus/fetchcrashes.pb.go
+++ b/go/test_platform/phosphorus/fetchcrashes.pb.go
@@ -27,17 +27,13 @@
 const (
 	// Should not be used.
 	FetchCrashesResponse_STATE_UNSPECIFIED FetchCrashesResponse_State = 0
-	// The prejob succeeded.
-	//
-	// Some prejob failures may not be detectable during execution. These
-	// failures will be detected when parsing results off the prejob logs in a
-	// later step of test_runner.
+	// FetchCrashes succeeded.
 	FetchCrashesResponse_SUCCEEDED FetchCrashesResponse_State = 1
-	// The prejob failed.
+	// FetchCrashes failed.
 	FetchCrashesResponse_FAILED FetchCrashesResponse_State = 2
-	// The prejob hit the requested timeout.
+	// FetchCrashes hit the requested timeout.
 	FetchCrashesResponse_TIMED_OUT FetchCrashesResponse_State = 3
-	// The prejob was aborted externally.
+	// FetchCrashes was aborted externally.
 	FetchCrashesResponse_ABORTED FetchCrashesResponse_State = 4
 )
 
@@ -156,7 +152,11 @@
 	// any.
 	InProgressIntegrationTest string `protobuf:"bytes,3,opt,name=in_progress_integration_test,json=inProgressIntegrationTest,proto3" json:"in_progress_integration_test,omitempty"`
 	// Crash signature (may not be populated for all crash types).
-	Sig                  string   `protobuf:"bytes,4,opt,name=sig,proto3" json:"sig,omitempty"`
+	Sig string `protobuf:"bytes,4,opt,name=sig,proto3" json:"sig,omitempty"`
+	// Base part of crash filename in out dir. All files associated with the crash
+	// will start with this string.
+	// (e.g. chrome.20201202.130102.12345.4567)
+	FilenameBase         string   `protobuf:"bytes,5,opt,name=filename_base,json=filenameBase,proto3" json:"filename_base,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_sizecache        int32    `json:"-"`
@@ -215,6 +215,13 @@
 	return ""
 }
 
+func (m *CrashSummary) GetFilenameBase() string {
+	if m != nil {
+		return m.FilenameBase
+	}
+	return ""
+}
+
 // FetchCrashesResponse defines the output of `phosphorus fetch-crashes`.
 type FetchCrashesResponse struct {
 	// `phosphorus fetch-crashes` exits with exit code 0 unless there is an
@@ -222,10 +229,14 @@
 	// best known state of the prejob execution (see comments on State enum).
 	State FetchCrashesResponse_State `protobuf:"varint,1,opt,name=state,proto3,enum=test_platform.phosphorus.FetchCrashesResponse_State" json:"state,omitempty"`
 	// Details on the uploaded crashes.
-	Crashes              []*CrashSummary `protobuf:"bytes,2,rep,name=crashes,proto3" json:"crashes,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
-	XXX_unrecognized     []byte          `json:"-"`
-	XXX_sizecache        int32           `json:"-"`
+	Crashes []*CrashSummary `protobuf:"bytes,2,rep,name=crashes,proto3" json:"crashes,omitempty"`
+	// Names of crashes that are present only in RTD output
+	CrashesRtdOnly []string `protobuf:"bytes,4,rep,name=crashes_rtd_only,json=crashesRtdOnly,proto3" json:"crashes_rtd_only,omitempty"`
+	// Names of crashes that are present only in FetchCrashes output
+	CrashesTlsOnly       []string `protobuf:"bytes,5,rep,name=crashes_tls_only,json=crashesTlsOnly,proto3" json:"crashes_tls_only,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
 }
 
 func (m *FetchCrashesResponse) Reset()         { *m = FetchCrashesResponse{} }
@@ -267,6 +278,20 @@
 	return nil
 }
 
+func (m *FetchCrashesResponse) GetCrashesRtdOnly() []string {
+	if m != nil {
+		return m.CrashesRtdOnly
+	}
+	return nil
+}
+
+func (m *FetchCrashesResponse) GetCrashesTlsOnly() []string {
+	if m != nil {
+		return m.CrashesTlsOnly
+	}
+	return nil
+}
+
 func init() {
 	proto.RegisterEnum("test_platform.phosphorus.FetchCrashesResponse_State", FetchCrashesResponse_State_name, FetchCrashesResponse_State_value)
 	proto.RegisterType((*FetchCrashesRequest)(nil), "test_platform.phosphorus.FetchCrashesRequest")
@@ -279,38 +304,42 @@
 }
 
 var fileDescriptor_8145b7cb95f95596 = []byte{
-	// 518 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x5f, 0x8b, 0xd3, 0x40,
-	0x14, 0xc5, 0x4d, 0xbb, 0xed, 0x36, 0xb7, 0xbb, 0x4b, 0x1c, 0x15, 0x62, 0x55, 0xb6, 0x16, 0x56,
-	0x0a, 0x42, 0x02, 0x55, 0xc4, 0x37, 0x6d, 0x9b, 0x14, 0x2b, 0xba, 0xbb, 0x24, 0xe9, 0x8b, 0x2f,
-	0x21, 0x9b, 0x4e, 0x93, 0x81, 0x64, 0x26, 0xce, 0x1f, 0xd0, 0x0f, 0xe3, 0x97, 0xf4, 0xd5, 0x17,
-	0xc9, 0x24, 0x75, 0x5d, 0xb0, 0xbe, 0xb5, 0x37, 0xbf, 0x7b, 0xef, 0x39, 0xe7, 0x0e, 0xbc, 0x94,
-	0x58, 0xc8, 0xb8, 0x2a, 0x12, 0xb9, 0x63, 0xbc, 0x74, 0xab, 0x9c, 0x89, 0x2a, 0x67, 0x5c, 0x09,
-	0x77, 0x87, 0x65, 0x9a, 0xa7, 0x3c, 0x11, 0x39, 0x16, 0x4e, 0xc5, 0x99, 0x64, 0xc8, 0xbe, 0x03,
-	0x3b, 0xb7, 0xf0, 0xe8,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, 0x25, 0x51,
-	0xa5, 0xc3, 0x78, 0xe6, 0xee, 0xff, 0x30, 0xe1, 0x12, 0xba, 0xe3, 0x49, 0xf3, 0xec, 0xdd, 0x8c,
-	0xb9, 0x87, 0x5e, 0xf9, 0x4d, 0x5f, 0x23, 0xaf, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x60, 0xc5,
-	0xd3, 0x15, 0x70, 0x03, 0x00, 0x00,
+	// 579 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0xd1, 0x6e, 0xd3, 0x3e,
+	0x14, 0xc6, 0xff, 0x69, 0xd7, 0x6d, 0x39, 0xdd, 0xa6, 0xfc, 0x0d, 0x48, 0x61, 0x80, 0x56, 0x8a,
+	0x86, 0x2a, 0x21, 0x25, 0xd2, 0x40, 0x88, 0x3b, 0x58, 0x9b, 0x4c, 0x14, 0xc1, 0x36, 0xb9, 0xe9,
+	0x0d, 0x37, 0x96, 0xd7, 0xb8, 0xa9, 0xa5, 0xc4, 0x0e, 0xb6, 0x23, 0xb1, 0xd7, 0xe3, 0x05, 0x78,
+	0x17, 0x9e, 0x00, 0xc5, 0x49, 0xd9, 0x2a, 0x51, 0xee, 0x9c, 0x2f, 0xbf, 0xe3, 0xf3, 0x7d, 0xc7,
+	0x36, 0xbc, 0x32, 0x4c, 0x1b, 0x52, 0xe6, 0xd4, 0x2c, 0xa5, 0x2a, 0xc2, 0x72, 0x25, 0x75, 0xb9,
+	0x92, 0xaa, 0xd2, 0xe1, 0x92, 0x99, 0xc5, 0x6a, 0xa1, 0xa8, 0x5e, 0x31, 0x1d, 0x94, 0x4a, 0x1a,
+	0x89, 0xfc, 0x0d, 0x38, 0xb8, 0x83, 0x8f, 0x4f, 0x32, 0x29, 0xb3, 0x9c, 0x85, 0x96, 0xbb, 0xa9,
+	0x96, 0xa1, 0xe1, 0x05, 0xd3, 0x86, 0x16, 0x65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e, 0x83, 0x00, 0x76, 0x2f, 0xce, 0xa7, 0x9f, 0xe3, 0xc8, 0xeb, 0xd4, 0xbf, 0x92, 0xe9,
+	0x97, 0x38, 0x22, 0x57, 0xf3, 0xc4, 0xeb, 0xa2, 0x3e, 0xec, 0x9d, 0x8f, 0xaf, 0x70, 0x12, 0x47,
+	0xde, 0xce, 0x38, 0xfa, 0x3a, 0xce, 0x64, 0xb0, 0x58, 0x29, 0x59, 0xf0, 0xaa, 0x08, 0xa4, 0xca,
+	0xc2, 0xf5, 0x87, 0xd4, 0x21, 0x17, 0x4b, 0x45, 0x9b, 0xf7, 0x16, 0x66, 0x32, 0xdc, 0xf6, 0xbc,
+	0x6e, 0x76, 0x2d, 0xf2, 0xfa, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbc, 0xc9, 0x19, 0x46, 0xe9,
+	0x03, 0x00, 0x00,
 }
diff --git a/src/test_platform/phosphorus/fetchcrashes.proto b/src/test_platform/phosphorus/fetchcrashes.proto
index 2239590..ba5b2ed 100644
--- a/src/test_platform/phosphorus/fetchcrashes.proto
+++ b/src/test_platform/phosphorus/fetchcrashes.proto
@@ -37,13 +37,21 @@
 message CrashSummary {
   // Name of the crashing executable.
   string exec_name = 1;
+
   // If uploads were on, URL at which this crash can be found.
   string upload_url = 2;
+
   // Name of the integration test that was running when this crash happened, if
   // any.
   string in_progress_integration_test = 3;
+
   // Crash signature (may not be populated for all crash types).
   string sig = 4;
+
+  // Base part of crash filename in out dir. All files associated with the crash
+  // will start with this string.
+  // (e.g. chrome.20201202.130102.12345.4567)
+  string filename_base = 5;
 }
 
 // FetchCrashesResponse defines the output of `phosphorus fetch-crashes`.
@@ -52,17 +60,13 @@
   enum State {
     // Should not be used.
     STATE_UNSPECIFIED = 0;
-    // The prejob succeeded.
-    //
-    // Some prejob failures may not be detectable during execution. These
-    // failures will be detected when parsing results off the prejob logs in a
-    // later step of test_runner.
+    // FetchCrashes succeeded.
     SUCCEEDED = 1;
-    // The prejob failed.
+    // FetchCrashes failed.
     FAILED = 2;
-    // The prejob hit the requested timeout.
+    // FetchCrashes hit the requested timeout.
     TIMED_OUT = 3;
-    // The prejob was aborted externally.
+    // FetchCrashes was aborted externally.
     ABORTED = 4;
   }
 
@@ -73,4 +77,10 @@
 
   // Details on the uploaded crashes.
   repeated CrashSummary crashes = 2;
+
+  // Names of crashes that are present only in RTD output
+  repeated string crashes_rtd_only = 4;
+
+  // Names of crashes that are present only in FetchCrashes output
+  repeated string crashes_tls_only = 5;
 }