Repository navigation
Return timeout cleanup in the bounded run observation - #1344
Merged
Merged
Conversation
The run observation Waterline reads now carries a top-level timeout_cleanup in the portable shape embedded Workflow 2.40.0 returns: outcome running with the cause, kind, start and deadlines while cleanup is open, then the outcome recorded on the terminal event. Nothing is reported until cleanup is recorded or for a run without the opt-in. The describe divergence now names native's armed and not_entered states and the missing finished_at, and the timeout-cleanup divergences cite native 3.14.0 and embedded 2.40.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The observation returns nothing for a non-object event payload, as embedded does. The terminate and hard-cancel vectors assert the observation's preempted outcome through the database, the unit test covers every status, and the divergence entry dates the running outcome and the observation shape to the release after 3.29.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Independent review: PASS at
🤖 Generated with Claude Code |
|
This was referenced Nov 26, 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.



Follow-up to #1336 for #1201: native's bounded run observation now returns
timeout_cleanup, as the portable contract (workflow/docs/architecture/timeout-cleanup.md, "Describe returns…") and embeddedRunObservationdo.What changes
Observation.
GET /api/workflows/{id}/runs/{run}/observationadds a top-leveltimeout_cleanupfor an opted-in run once cleanup is recorded. It follows embeddedTimeoutCleanup::observe:WorkflowTimeoutCleanupStarted:{outcome: "running", cause: "timeout", timeout_kind, started_at, work_deadline_at, cleanup_deadline_at}.{outcome, timeout_kind, started_at, cleanup_deadline_at, finished_at, failure_id}, keeping only string fields.cancellation_cleanup-only closes, and for runs without the opt-in.The new logic is the pure
timeout_cleanup::observation_event/observation, plus one indexed history read inrun_observation_store.rs.Divergences.
describe-timeout-cleanup-statenow registers native describe's full shape: thearmedandnot_enteredstates where embedded omits the field, and the absentfinished_at. It states that the observation is not divergent.native 3.14.0and embedded 2.40.0 instead of the stale "Native opt-in deadline-triggered timeout cleanup (#1201) #1235 (unreleased)" and 2.29.0.No corpus run opts in, so parity comparators are unchanged.
Tests
the_observation_follows_embeddedcovers the event choice, the running and terminal shapes, the string filtering, and the outcome-less and unknown-outcome cases.the_earliest_hard_deadline_names_the_kind_and_describe_follows_the_stateasserts the observation is absent while armed, matches the running shape fromWorkflowTimeoutCleanupStarted, then equals the terminaltimeout_cleanup.🤖 Generated with Claude Code