Repository navigation
fix(sentry-monitor): stop paging on ordinary exec exit codes, add unzip to runtime image - #291
Merged
convyusboy merged 2 commits intoOct 14, 2026
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…ssing-binary exits as exceptions buildAfterToolCallCapture fingerprinted every exec exit error as [tool, kind, exitCode] with message text deliberately excluded, so there was one Sentry issue per exit code, not per failure. The exit-code-1 bucket collected every ordinary exec failure fleet-wide -- grep finding nothing, a failing test, a script's own `exit 1` -- none of them host defects. Meanwhile the exit-code-127 bucket hid real missing-binary failures (unzip, convert) behind one shared, misleading title. Exec already distinguishes a plain non-zero exit from a shell lookup failure (126/127) at bash-tools.exec-runtime.ts's isShellFailure before the event ever reaches this plugin. Thread that same split into buildAfterToolCallCapture: - exit-error at 126/127 stays a full exception, with the invoked binary's basename extracted from the shell diagnostic and folded into the fingerprint so two different missing binaries no longer share one issue (handles both bare and absolute-path invocations) - every other exit-error downgrades to a non-paging warning message, matching the existing invalid-input/web_fetch-403-404-429 precedents in the same function The harness path (hook-helpers.ts) never sets errorKind/exitCode and is unaffected -- the fleet uses the embedded-agent path, which populates both. Evidence: pnpm test extensions/sentry-monitor -> 112/112 passed. oxfmt, oxlint, pnpm tsgo:extensions clean. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The agent's exec tool runs arbitrary shell commands in this image, so a self-hosted user's agent asked to extract an uploaded .zip archive needs unzip on PATH. Appended after `tini` rather than inserted alphabetically so both substring assertions in src/dockerfile.test.ts stay intact. Evidence: pnpm test src/dockerfile.test.ts -> 25/25 passed. Co-Authored-By: Claude Sonnet 5 <[email protected]>
convyusboy
force-pushed
the
ridho/eng-21226-sentryfleet-openclaw-fleet-x5-subprocess-exec-captures
branch
from
October 14, 2026 10:38
b7e1239 to
7d06f31
Compare
There was a problem hiding this comment.
LGTM! Verified all changes:
- captures.ts: Clean classification split. Ordinary non-zero exit codes (1..125, 128+) downgrade to non-paging warning messages, while shell command lookup/exec failures (126/127) remain exceptions.
- Fingerprinting: Correctly isolates missing binaries by basename (e.g. unzip, convert) so distinct missing commands do not collapse into a single Sentry issue or get erased by path scrubbing.
- captures.test.ts: Full coverage for downgrade behavior, upstream exceptions, 126/127 exceptions, and distinct fingerprinting across bare and absolute binary paths.
- Dockerfile: unzip added to runtime image after tini, keeping dockerfile.test.ts substring assertions intact.
- CI: All required checks passed.
inassjunus
approved these changes
Oct 14, 2026
convyusboy
deleted the
ridho/eng-21226-sentryfleet-openclaw-fleet-x5-subprocess-exec-captures
branch
October 14, 2026 11:45
convyusboy
added a commit
that referenced
this pull request
Oct 15, 2026
Cut the fork release that ships the six commits on boon since v2026.6.34-boon.7: - #292 (ENG-21407): resolve relative media/PDF paths against the agent workspace in pdf, image_generate, video_generate, and music_generate, instead of the gateway process cwd; delete the image tool's duplicate inline resolution now that the loader owns it canonically. - #289 (ENG-21228): let image, pdf, image_generate, video_generate, and music_generate read agent-rendered files outside the default roots (e.g. /tmp crops) when the agent is permitted host reads outside its workspace, matching the outbound MEDIA: path; a blocked path now returns a denied tool result instead of a raw error that paged Sentry. - #293 (ENG-21406): raise the image tool's default vision timeout 60s -> 150s (above boon-llm-gateway's 120s fallback-chain budget), share one deadline across setup and the provider request, and return a graceful timeout status instead of letting the raw error end the turn; mirrored in the Codex dynamic-tool watchdog; sentry-monitor downgrades image timeouts to a warning. - #291: sentry-monitor no longer pages on ordinary non-zero exec exit codes; only shell lookup failures (126/127) stay exceptions, now fingerprinted per missing binary. Runtime Docker image adds unzip. - #288 (ENG-21227): memory_search no longer pauses/pages Sentry while the index is still building ("missing" identity); only a real "mismatched" embedding provider pauses it. - #294 (ENG-21405, test-only): regression coverage confirming the cron delivery-target guard already rejects a directory-less channel's unknown target end to end; root cause for the live Sentry errors was a stale anychat-boon-web plugin install, not a core gap. Bump root package.json and npm-shrinkwrap.json, all 136 plugin manifests, and the version field in every extension's npm-shrinkwrap.json via pnpm plugins:sync, hand-patched the same way as boon.7 (the npm-shrinkwrap generator still can't regenerate cleanly on this fork: pre-existing, unrelated @sentry/node nested @opentelemetry/resources / sdk-trace-base registry-resolution drift, reproduced again on this base). Verified via test/package-manager-config.test.ts (12/12) and the full release-preflight check suite (plugin versions, inventory, base config schema, bundled channel config metadata, config docs baseline, plugin SDK exports/API baseline/surface budget, root dependency ownership) -- all green except the known shrinkwrap generator drift. Add the 2026.6.34-boon.8 CHANGELOG.md section and the generated extensions/matrix/CHANGELOG.md entry. No config schema, plugin-SDK surface, or plugin source/dependency change in slack/msteams/diagnostics-prometheus; this is a gateway-only roll (bundled-plugin source changes in codex, memory-core, and sentry-monitor ship inside the gateway tarball). Targeted tests for all three touched extensions plus the codex dynamic-tool-execution suite: 1075/1075 passing. Co-authored-by: Claude Sonnet 5 <[email protected]>
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.
What Problem This Solves
Sentry OPENCLAW-FLEET-X5 paged on 1,164 events across 5 customer orgs over 44 days.
buildAfterToolCallCapturefingerprints exec exit errors as[tool, kind, exitCode]with message text deliberately excluded, so every ordinary exec failure that happened to exit 1 fleet-wide —grepfinding nothing, a failing test, a script's ownexit 1— landed in one shared Sentry issue, none of them host defects. A sibling issue, OPENCLAW-FLEET-X9 (exit code 127, 60 events), had the opposite problem: two genuinely different missing binaries (unzip,convert) were hidden behind one shared, misleading title.Why This Change Was Made
POSIX reserves exit codes 126/127 for the shell's own command lookup/exec failure (missing or non-executable binary) — a real host-provisioning defect, not the invoked command's own exit status. The host already draws this exact line before the event reaches the plugin (
isShellFailureinbash-tools.exec-runtime.ts). This PR threads that same split intobuildAfterToolCallCapture: an exit-error at 126/127 stays a full exception, now with the normalized error text folded into its fingerprint so two different missing binaries no longer share one issue; every other exit-error downgrades to a non-paging warning message, matching the existinginvalid-input/web_fetch403/404/429 precedents already in the same function.Separately,
src/agents/utils/tools-manager.ts's fd/rg downloader already shells out tounzip -q(falling back totar xfonly becauseunzipisn't in the runtime image today) — added to the Dockerfile's runtime apt list. Note: this does not fix the fleet's own missing-unzipgap — the paid fleet runs a bare EC2 AMI, not this Docker image; that fix is tracked separately ingetboon/gandalf-manager.User Impact
Sentry noise for ordinary exec exits (tests, greps, scripts) stops paging operators; genuine missing-binary provisioning gaps stay visible and now split into one actionable issue per binary instead of one shared bucket.
openclaw's own fd/rg auto-download path gets a workingunzipinstead of always falling through totar.Evidence
pnpm test extensions/sentry-monitor→ 111/111 passedpnpm test src/dockerfile.test.ts→ 25/25 passedpnpm test extensions/memory-core→ 943/943 passed (unaffected, checked for rebase conflicts against fix(memory): memory search no longer pages Sentry while the index is still building #288)oxfmt --check,node scripts/run-oxlint.mjsonextensions/sentry-monitor,pnpm tsgo:extensions— all cleanRelated: https://linear.app/getboon/issue/ENG-21226/sentryfleet-openclaw-fleet-x5-subprocess-exec-captures-normal (this PR covers the sentry-monitor policy + Docker image side; the fleet AMI/sweep side lands separately in gandalf-manager)
Summary by cubic
Stops
sentry-monitorpaging on ordinary exec exit codes so routine command failures no longer page operators, while keeping genuine missing-binary defects visible. Addsunzipto the runtime image.grepfinding nothing, a script's ownexit 1) now emit a non-paging warning instead of an exception.unzipvsconvertno longer share one issue (handles both bare and absolute-path invocations).unzipto the Dockerfile apt list so a self-hosted agent's exec tool can extract uploaded.ziparchives, and sotools-manager.ts's fd/rg downloader can use itsunzip -qpath instead of always falling through totar.unzipgap; that fleet AMI change is tracked separately ingetboon/gandalf-manager.Written for commit 7d06f31. Summary will update on new commits.