@@ -40,6 +40,9 @@ export interface Tier1ErrorFacts {
4040 /** `navigator.onLine`. `false` is proof the visitor's network is down, so the failure is
4141 * not ours; `true` proves nothing, so it is not treated as evidence either way. */
4242 online ?: boolean ;
43+ /** `isOpaqueNetworkFailure(e)`: the browser's own transport failure, e.g. the mount's
44+ * `TypeError: Failed to fetch` when the bundler cannot be reached. */
45+ opaqueNetworkFailure ?: boolean ;
4346 /** The DEV-2527 demo-monitoring flag. Deliberately an input, so the gate ORDER is tested. */
4447 monitorDemos : boolean ;
4548}
@@ -66,7 +69,7 @@ const COMPILE_TITLE = "Tier-1 compile failed";
6669/**
6770 * Decide how a Tier-1 error is reported, or that it is not.
6871 *
69- * Order is load-bearing twice .
72+ * Order is load-bearing three times .
7073 *
7174 * The compiler-asset branch comes **first, ahead of the `monitorDemos` gate**. That flag is
7275 * DEV-2527's temporary demo instrumentation and has a documented teardown
@@ -79,6 +82,10 @@ const COMPILE_TITLE = "Tier-1 compile failed";
7982 * The evaluated-throw stand-down (DEV-2552) comes next: a throw from a module that already
8083 * started evaluating belongs to the in-preview reporter, which files it with the preview's
8184 * own stack, tier, framework and demo id. Reporting it here as well filed one fault twice.
85+ *
86+ * The opaque transport failure (the mount's `TypeError: Failed to fetch`) stands down third,
87+ * after both of those and before the `monitorDemos` gate: it is not a diagnostic about the
88+ * visitor's code, and `sandpack.bundler_unreachable` already counts it.
8289 */
8390export function tier1Report ( facts : Tier1ErrorFacts ) : Tier1Report | null {
8491 if ( facts . compilerUnavailable ) {
@@ -109,6 +116,9 @@ export function tier1Report(facts: Tier1ErrorFacts): Tier1Report | null {
109116 } ;
110117 }
111118 if ( facts . name === "SandpackEvaluationError" ) return null ;
119+ // The bundler never loaded on the visitor's network: nothing about their source, and
120+ // `sandpack.bundler_unreachable` already counts it.
121+ if ( facts . opaqueNetworkFailure ) return null ;
112122 if ( ! facts . monitorDemos ) return null ;
113123 return {
114124 tags : { surface : "demo-runtime" , kind : "sandpack-compile" , tier : "1" } ,
0 commit comments