Skip to content

Report launch-path failures through reportError - #443

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-7136-launch-path-failures-in-webhook-triggers-and-workflow-deploy
Aug 29, 2026
Merged

TheGreatAxios merged 3 commits into
mainfrom
cl-7136-launch-path-failures-in-webhook-triggers-and-workflow-deploy

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Fixes CL-7136 — https://linear.app/abklabs/issue/CL-7136

Problem

Two "don't fail the caller, don't lose the signal" paths only wrote a log line, with no refId or tenant/run context:

  • packages/webhook-triggers/src/launch.ts:152-169 — the input message failed to deliver after every retry
  • packages/workflow-deploy-source/src/record-on-deploy.ts:77-88 (recordOrLog) — the deploy-source record write failed

Change

  • Both sites now call reportError from @corbits/error-sink with operation, tenantId, and an extra payload naming the run (instanceId/triggerId/attempts for the webhook case, anchorRunId for the deploy-source case); the webhook case also passes agentId (the run's triggerAddress).
  • Dropped the now-redundant log.error calls and their now-unused @intx/log imports; renamed recordOrLog to recordOrReport to match.
  • Added @corbits/error-sink as a workspace:* dependency of both packages.

Tests

  • packages/webhook-triggers/test/launch.test.ts: new cases assert reportError fires with the run's context on exhausted delivery, and doesn't fire on success. Verified red (failing against pre-change src) before the implementation, green after.
  • packages/workflow-deploy-source/test/record-on-deploy.test.ts: same red/green pattern for a recording failure.

Notes

  • PR Relaunch live agents when their inference credential rotates #427 (cl-6687-rotated-api-keys-never-reach-live-agents) also touches packages/webhook-triggers/src/launch.ts (adds a recordLaunchSources call after launch). This PR's diff is confined to the delivery-failure block so the two should rebase cleanly.
  • bun.lock's diff includes a few unrelated lines (a @corbits/memory github-ref resolution swap) that reappear on any fresh bun install in this repo right now, independent of this change — kept rather than hand-edited.
  • Machine load was too high for a full bun run check; ran focused gates instead: package tsc --noEmit, bun test for both packages, prettier/eslint on changed files, check:browser-safe-subpaths, and check:no-product-tenancy. CI is the full gate.

@TheGreatAxios
TheGreatAxios force-pushed the cl-7136-launch-path-failures-in-webhook-triggers-and-workflow-deploy branch from b1269bb to 708ca2d Compare August 28, 2026 12:42
Red first: both fail against the current log-only paths, proving the
gap before the fix lands.
The webhook-trigger delivery-retry exhaustion and the deploy-source
recording failure were both log-only calls with no refId or
tenant/run context -- the exact gap @corbits/error-sink exists to
close. Route both through reportError instead.

Fixes CL-7136.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7136-launch-path-failures-in-webhook-triggers-and-workflow-deploy branch from 252ffde to 0b3566c Compare August 29, 2026 05:01
@TheGreatAxios
TheGreatAxios merged commit 975e7a2 into main Aug 29, 2026
5 checks passed
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.

1 participant