Preserve cancellation event payload identifiers in duroxide.history#180
Draft
Copilot wants to merge 3 commits into
Draft
Preserve cancellation event payload identifiers in duroxide.history#180Copilot wants to merge 3 commits into
duroxide.history#180Copilot wants to merge 3 commits into
Conversation
Co-authored-by: pinodeca <32303022+pinodeca@users.noreply.github.com>
Co-authored-by: pinodeca <32303022+pinodeca@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix cancellation failure event payload to include instance_id
Preserve cancellation event payload identifiers in May 27, 2026
duroxide.history
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.
Cancellation terminal events could be persisted with
event_data.instance_id = ""andevent_data.execution_id = 0, even when the owningduroxide.historyrow had correct identifiers. This broke payload-only consumers that correlate events without joining back to history keys.Runtime payload normalization at history write boundary
duroxide._normalize_history_event_payload_identifiers) andBEFORE INSERTtrigger onduroxide.history.event_datais valid JSON object:instance_idwhen missing/empty fromNEW.instance_idexecution_idwhen missing/non-numeric/zero fromNEW.execution_idDeterministic guard installation during worker initialization
DROP TRIGGER IF EXISTS+CREATE TRIGGER).Regression coverage for cancellation path
tests/e2e/sql/23_cancel_history_payload_ids.sqlto verify cancelled-instance history payload identifiers match row identifiers for events carrying those fields.