Repository navigation
fix(runner): skip the exit sentinel when picking a boot failure cause (DEV-3370) - #427
Merged
Merged
Conversation
… (DEV-3370) failureDetail fell back to the last log line when no line announced or mentioned a cause. For a boot that dies in cp, that line is the wrapper's own __RUNNER_EXIT__:<code> sentinel, so the Sentry title named the sentinel and hid the real error. The sentinel is now stripped from each line, including when it is glued onto an unterminated last line, and stays in the tail so the exit code remains visible. 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
A Tier-2 boot that dies in
cp -alwas reported to Sentry with the title__RUNNER_EXIT__:1(Sentry DEMOS-T), which hides the real error.failureDetailpicks a cause in three tiers (an announcing line, a mentioning line, then the last line). Thecp: cannot create hard link ... File existslines match no marker, so the fallback took the last line, which is the wrapper's own__RUNNER_EXIT__:<code>sentinel written by the boot wrapper inworkers/api/src/index.ts. This is a reporting misclassification only. The underlying "File exists" boot failure is not fixed here, because the cause could not be established from one event whose boot log is a 2500-byte tail.The fix strips a trailing
__RUNNER_EXIT__:\d+from each log line when choosing a cause and drops the line if nothing remains. This also covers a sentinel glued onto an unterminated last line. The sentinel stays in the tail, so the exit code is still visible.execFailureDetailneeds no change: its only caller isdescribeBuildFailure, which uses a direct sandbox exec result, not the boot wrapper.Types of changes
runner/) changeHow was this verified?
Added tests in
runner/pipeline/container-boot-failure.test.mjsfor the DEMOS-T log, a sentinel-only log, a glued sentinel, and a non-zero sentinel after an announced cause. The sentinel-only, cp-collision and glued-sentinel tests fail against the old source and pass with the fix. The announced-cause test passes on the old source too and only guards against regression. The container-boot-failure and failure-log test files pass (38/0) and the runtime typecheck is clean.pnpm testinrunner/has one failure,theme-presets-version.test.mjs("the pin tracks its own major's starter bucket"), which also fails on master because the authoring handsontable pin (18.1.1) trails bucket 18 (18.1.2); the fix is tracked in #424. An independent review of the diff was done and its findings are applied.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 locallyNone of these apply: this changes runner runtime code only, and there is no example change.
Related issue(s):
Note
Low Risk
Reporting-only change to how boot log lines are chosen for issue titles; no boot, install, or exec behavior changes.
Overview
Boot failures were sometimes titled in Sentry as
__RUNNER_EXIT__:1becausefailureDetail’s last-line fallback picked the API boot wrapper’s exit sentinel instead of real tool output (e.g.cp: … File existslines that don’t match cause markers).failureDetailnow builds cause candidates by stripping a trailing__RUNNER_EXIT__:<code>from each line (including when glued to an unterminated last line) and dropping lines that become empty. The sentinel stays intailso exit codes remain in context.execFailureDetailis unchanged.Reviewed by Cursor Bugbot for commit 1125a8b. Bugbot is set up for automated code reviews on this repo. Configure here.