CL-6326: onTrigger non-fatal body-failure edge (onBodyFailure) - #68
Merged
Conversation
Red/green coverage for a failed body occurrence ending a long-lived onTrigger section (CL-6326): default policy is unchanged, a "continue" policy re-arms past a failed occurrence while a cancelled one is always terminal-is-final, and crash-recovery honors the same policy. Fails against the unmodified vendored runtime; the next commit makes it pass.
A failed body occurrence and a cancelled one were both terminal-is-final, so a single bad turn permanently ended a long-lived, event-driven onTrigger section. Adds onBodyFailure?: "end" | "continue" (default "end", byte-compatible with prior behavior); "continue" lets the section re-arm on its input park after a failed occurrence instead of throwing. Cancellation is unaffected and always ends the section -- it reflects a drain/operator decision, not a turn-level error. The failed occurrence stays durably recorded on the run's own audit log (the existing ChildCompleted commit) regardless of policy, so it is never silent, only non-fatal to the section.
TheGreatAxios
force-pushed
the
cl-6326-onbodyfailure
branch
from
August 20, 2026 04:40
540b635 to
f5658ad
Compare
Extends the vendor/intx/workflow ledger entries for CL-6326: VENDORED.md's local-modifications prose, the package's own VENDORED-FROM delta line, the recomputed kill-dates.txt tree hash, and a docs/revendor-inventory.md entry noting the delta re-applies once PR #59's re-pin lands (upstream's 486a6b1b touched run.ts after this pin).
TheGreatAxios
force-pushed
the
cl-6326-onbodyfailure
branch
from
August 20, 2026 04:42
f5658ad to
d110e84
Compare
TheGreatAxios
marked this pull request as ready for review
August 20, 2026 04:42
This was referenced Aug 20, 2026
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.
Summary
onTriggergains anonBodyFailure?: "end" | "continue"policy field. Default"end"preserves today's terminal-is-final behavior byte-compatibly."continue"lets a body run that endsfailedleave a long-lived, event-driven section subscribed instead of ending the whole run, so one bad turn does not kill the entire conversation's run.cancelledis scoped out of the policy on purpose (confirmed with the ledger owner): it always ends the section, since cancellation reflects a drain/operator decision, not a turn-level error.ChildCompleted{terminalStatus:"failed"}commit lands on the run's own durable audit log before the policy check runs either way —"continue"makes it non-fatal to the section, not unobservable. Verified in tests (CL-6322's spike flagged this as the NO-GO condition: a killed turn that emits no failure signal and hangs to timeout).vendor/intx/workflow/src/runtime/run.ts: the steady-state drive loop andplanOnTriggerResume's crash-recovery counterpart, both readingprimitive.onBodyFailurelive (mirroring howawaitSignal.onTimeoutis read live rather than defaulted at construction).Vendoring
This is a local delta on the current pin (
59f5e7b9), not the pending re-pin in #59 — #59 is held for the packaging milestone. Upstream's486a6b1btouchedrun.tsafter this pin; the delta will need re-applying against the re-pinned tree once #59 lands (noted indocs/revendor-inventory.mdandVENDORED.md).VENDORED.md— extended thevendor/intx/workflowlocal-modifications prose (existing row, not a new one).vendor/intx/workflow/VENDORED-FROM— delta line for this change.scripts/checks/kill-dates.txt— recomputed tree hash;bun run scripts/checks/killdates.tspasses.docs/revendor-inventory.md— new entry under "Open upstream gaps patched in the vendored tree".Upstream report (to file against faremeter/interchange separately):
Test plan
bun test vendor/intx/workflow/src/runtime/run.test.ts— 4 tests, red/green verified by stashing the runtime delta and confirming 2 of the 4 fail against the unmodified vendored code, then pass with it applied.bunx prettier --checkon all touched files.bun run scripts/checks/killdates.tspasses (recomputed hash matches).run.tsin this vendored package (perrunlocal/run-local.ts:8's own note pointing at the intendedruntime/run.test.tslocation).Refs CL-6326.