Repository navigation
fix(runner): stop filing the mount's transport failure as a Tier-1 compile error (DEV-3370) - #425
Merged
Merged
Conversation
…mpile error (DEV-3370) A mount that rejects with the browser's opaque TypeError: Failed to fetch means the bundler never loaded on the visitor's network. It says nothing about their source and sandpack.bundler_unreachable already counts it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Sentry DEMOS-15 ("Tier1CompileError: Tier-1 compile failed") has collected the mount path rejecting with the browser's own
TypeError: Failed to fetch(latest event:compileDiagnostic: "Failed to fetch", cause chainTypeError, reported from the mount.catchinApp.tsx). That means the Sandpack bundler could not be reached on the visitor's network, which says nothing about their source, andsandpack.bundler_unreachablealready counts it.tier1Reportnow takes anopaqueNetworkFailurefact (from the existingisOpaqueNetworkFailure) and stands down for it on the compile branch. Real compile diagnostics (SandpackCompileError), the compiler-asset branch and its own offline gate are untouched. Older events in the issue are keystroke diagnostics and stay as they are.Types of changes
runner/) changeHow was this verified?
Added five cases to
runner/pipeline/tier1-report.test.mjs, including two that feed a realTypeError("Failed to fetch")and a real compile error throughisOpaqueNetworkFailureintotier1Report. The transport-failure cases fail against the oldtier1Report.ts(2 fail, 16 pass) and pass after.node --experimental-strip-types --test pipeline/tier1-report.test.mjs pipeline/fetch-failure.test.mjsis 29 pass, 0 fail. The authoringtsc --noEmitis clean (after building@handsontable/demo-runtime). Not covered: theApp.tsxcall site itself cannot be imported bynode --test, and e2e was not run.Checklist
runner/config/frameworks.json(see CONTRIBUTING.md); otherwise it won't appear on demos.handsontable.compnpm build(andpnpm dev) in the affected example/server-example locallyNot applicable: no example added or changed, runner-only.
Related issue(s):
Note
Low Risk
Runner-only Sentry grouping change with no auth or data impact; misclassification would only affect which errors reach Sentry, and tests lock the new branch order.
Overview
Stops Tier-1 Sandpack mount failures that are plain browser transport errors (e.g.
TypeError: Failed to fetch) from being filed as Tier-1 compile Sentry issues (DEMOS-15 / DEV-3370).reportRuntimeErrorinApp.tsxnow passesopaqueNetworkFailure: isOpaqueNetworkFailure(e)intotier1Report.tier1Reportadds that fact and stands down on the compile-reporting path when it is true—after the compiler-asset and evaluation-error branches, and before themonitorDemosgate—because those events are not visitor source diagnostics and are already covered bysandpack.bundler_unreachable. Compiler-asset reporting and realSandpackCompileErrorpaths are unchanged.Unit tests in
tier1-report.test.mjscover the flag, integration withisOpaqueNetworkFailure, and that compiler-asset reporting is not suppressed by the transport stand-down.Reviewed by Cursor Bugbot for commit ba1b44c. Bugbot is set up for automated code reviews on this repo. Configure here.