@@ -234,6 +234,16 @@ exit 73
234234 receiptScope : "github-egress-proof:1:loopback" ,
235235 } ) ;
236236 assert . equal ( submissions . length , 1 ) ;
237+ const emptySinkSubmissions = githubEgressTelemetrySubmissions ( {
238+ metricsPath : path . join ( scratch , "missing-egress.jsonl" ) ,
239+ rateLimitPath : path . join ( scratch , "missing-rate-limits.jsonl" ) ,
240+ receiptScope : "github-egress-proof:1:missing-sink" ,
241+ } ) ;
242+ assert . equal ( emptySinkSubmissions . length , 1 ) ;
243+ assert . equal ( emptySinkSubmissions [ 0 ] . metrics . length , 1 ) ;
244+ assert . equal ( emptySinkSubmissions [ 0 ] . metrics [ 0 ] . unit , "invocation" ) ;
245+ assert . equal ( emptySinkSubmissions [ 0 ] . metrics [ 0 ] . attempted , false ) ;
246+ assert . equal ( emptySinkSubmissions [ 0 ] . metrics [ 0 ] . telemetryComplete , false ) ;
237247
238248 const workerPort = await availablePort ( ) ;
239249 let worker = await startWorker ( workerPort , persistPath , workerLogPath ) ;
@@ -246,6 +256,13 @@ exit 73
246256 fetch : rewriteFetch ( worker . origin ) ,
247257 } ) ;
248258 assert . deepEqual ( firstUpload , { accepted : true , deduped : false } ) ;
259+ const emptySinkUpload = await submitGitHubEgressTelemetry ( {
260+ baseUrl : "https://proof.invalid" ,
261+ webhookSecret : proofSecret ,
262+ submission : emptySinkSubmissions [ 0 ] ,
263+ fetch : rewriteFetch ( worker . origin ) ,
264+ } ) ;
265+ assert . deepEqual ( emptySinkUpload , { accepted : true , deduped : false } ) ;
249266 const beforeRestart = await getJson ( `${ worker . origin } /api/github-egress-observability?hours=1` ) ;
250267 assertPublicView ( beforeRestart ) ;
251268
@@ -298,6 +315,7 @@ exit 73
298315 public_read_fallback_wire_attempts : 1 ,
299316 target_app_wire_attempts : 1 ,
300317 incomplete_unknown_route_wire_attempts : 1 ,
318+ empty_sink_incomplete_invocations : 1 ,
301319 restart_rows_preserved : true ,
302320 duplicate_upload_deduped : true ,
303321 output_and_exit_preserved : true ,
@@ -559,7 +577,7 @@ function assertPublicView(view) {
559577 assert . equal ( view . rate_limit_observations . length , 1 ) ;
560578 assert . equal ( view . privacy . pool_identity , "withheld" ) ;
561579 const totals = countBy ( view . rows , "unit" ) ;
562- assert . deepEqual ( totals , { invocation : 18 , member : 1 , wire_attempt : 19 } ) ;
580+ assert . deepEqual ( totals , { invocation : 19 , member : 1 , wire_attempt : 19 } ) ;
563581}
564582
565583function privacyScan ( serialized ) {
0 commit comments