Skip to content

test(cron): cover PR #217's target guard for a directory-less channel - #294

Merged
convyusboy merged 1 commit into
boonfrom
ridho/eng-21405-boon-web-directoryless-target-regression
Oct 15, 2026
Merged

convyusboy merged 1 commit into
boonfrom
ridho/eng-21405-boon-web-directoryless-target-regression

Conversation

@convyusboy

@convyusboy convyusboy commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Related: ENG-21405 (Linear)

What Problem This Solves

Adds regression coverage proving resolveDeliveryTarget correctly rejects a
raw email-shaped delivery target for a directory-less channel (modeled
faithfully on anychat-boon-web's real messaging contract: looksLikeId
only, no directory, no resolveTarget), both for an explicit delivery.to
and for a session-inherited one.

Why This Change Was Made

While investigating ENG-21405 (OPENCLAW-FLEET-10E/10F: Boon Web outbound
delivery failing with thread_id is required (contract v3) for an email
target), I suspected PR #217's cron-resolver guard (ENG-18097) was being
bypassed somewhere between it and the cron failure-notification lane, since
the live error kept recurring on a release that contains that fix.

This test proves that theory wrong: the real end-to-end
resolveDeliveryTarget path — not just the narrow resolveChannelTargetForDelivery
function PR #217's own unit test exercises — already rejects this exact
target ([email protected]) with "Unknown target" today, for both
resolution modes.

Live root-causing (SSM/SSH on the affected MACC host) found the real cause:
the anychat-boon-web plugin install on that box is frozen at v0.0.9-alpha
(2026-08-04), which predates the looksLikeId/target-grammar guard entirely
— core (openclaw) advanced through many releases on that host while the
plugin never updated. A misconfigured cron job's delivery target
(a raw customer email) then cascaded into 705 delivery-queue rows via
sendCrashRecoveryNotice re-sending to the same broken target. Neither of
those is a core code gap, so this PR does not change production behavior —
it documents that the guard already holds, closing the loop on the
AC item "Add unit test for email-targeted outbound dispatch on Boon Web" at
the core/cron layer (the plugin repo's own outbound.test.ts already covers
the plugin-layer throw).

User Impact

None — test-only change. No production code is modified.

Evidence

node scripts/run-vitest.mjs src/cron/isolated-agent/delivery-target.directory-less-channel.test.ts
  Test Files  1 passed (1)
  Tests  3 passed (3)

node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfo
  (clean)

node_modules/.bin/oxfmt --check / scripts/run-oxlint.mjs (scoped to this file)
  (clean)

Not run: pnpm check:changed (Testbox/Crabbox) — test-only change touching
one file in an already-covered module; scope is narrow enough that the above
local proof is sufficient per this repo's validation policy.


Summary by cubic

Adds regression tests proving resolveDeliveryTarget already rejects email-shaped delivery targets on a directory-less channel, closing the loop on ENG-21405's Boon Web outbound delivery failures. Test-only change; no production code is modified.

  • Models anychat-boon-web's real target grammar (ID-only, no directory) and confirms PR fix(cron): report unusable cron delivery targets at resolution time #217's guard (ENG-18097) holds end-to-end through resolveDeliveryTarget, not just the narrow function its own unit test covers.
  • Covers explicit email targets, session-inherited email targets (both rejected with "Unknown target"), and valid thread-<id> targets (forwarded).
  • Root-caused the live Sentry errors to a stale plugin install (v0.0.9-alpha) plus a misconfigured cron job on one customer host, not a core code gap.

Written for commit e088862. Summary will update on new commits.

View guided diff Turn on auto-fix

@convyusboy
convyusboy requested a review from a team October 15, 2026 06:11

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cubic analysis

No issues found across 1 file

Linked issue analysis

Linked issue: ENG-21405: [Sentry][Fleet] OPENCLAW-FLEET-10E: Boon Web outbound delivery fails when targeting email without active thread_id

Status Acceptance criteria Notes
⚠️ Add a Boon Web email-targeted outbound test The tests verify resolveDeliveryTarget rejects explicit and inherited email targets, but they do not exercise message dispatch.

Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

View guided diff | Turn on auto-fix | Re-trigger cubic

@boon-hermes-bot boon-hermes-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

  • Correctness: Adds focused regression tests in src/cron/isolated-agent/delivery-target.directory-less-channel.test.ts verifying that resolveDeliveryTarget correctly rejects explicit and session-inherited email targets ([email protected]) with "Unknown target" when targeted at a directory-less channel (anychat-boon-web), while properly preserving valid thread-<id> targets.
  • Contract & Scope: Faithfully replicates the plugin's looksLikeId-only grammar without introducing out-of-boundary dependencies. No production runtime changes.
  • Verification: Local Vitest passed (3/3 tests in src/cron/isolated-agent/delivery-target.directory-less-channel.test.ts), tsgo clean, oxfmt and oxlint clean. All 29 GitHub CI check runs green.

Related: ENG-21405 (Linear)

Adds an end-to-end regression test driving the real resolveDeliveryTarget
path against a faithful copy of anychat-boon-web's actual target grammar
(looksLikeId-only, no directory, no resolveTarget) with the exact email
from ENG-21405 ("[email protected]"), for both an explicit
delivery target and a session-inherited one.

Both are correctly rejected with "Unknown target" on current main. This
confirms PR #217's cron-resolver guard (ENG-18097) already covers this
shape of misconfiguration end-to-end, not just the narrow function its
own unit test exercises. Written during ENG-21405's investigation, which
root-caused the live Sentry errors (OPENCLAW-FLEET-10E/10F) to a stale
anychat-boon-web plugin install (v0.0.9-alpha, predating this guard
entirely) plus a misconfigured cron job on one customer box, not a core
code gap — this test documents that the resolver itself already behaves
correctly.

Co-Authored-By: Claude Opus 5 <[email protected]>
@convyusboy
convyusboy force-pushed the ridho/eng-21405-boon-web-directoryless-target-regression branch from eabd471 to e088862 Compare October 15, 2026 06:56
@convyusboy
convyusboy merged commit 3b45dfb into boon Oct 15, 2026
144 checks passed
@convyusboy
convyusboy deleted the ridho/eng-21405-boon-web-directoryless-target-regression branch October 15, 2026 07:11
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants