Conversation
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.
Adds durable activation evidence so an automation that starts a workflow run can never lose that run's terminal outcome before acknowledging it. This is part of the Kickside automation-engine redesign (workflows as a writable destination with exactly-once delivery).
ensure_activation(dataflow_id, admission_key): idempotent. Repeating the same key never increments the generation. A different key for the same dataflow returns a typedCONFLICT.get_activation_evidence: returns the terminal status, outcome and generation, which are recorded when the workflow reaches a terminal state.ack_terminal(dataflow_id, admission_key, generation): compare-and-set acknowledgement. It is idempotent; a mismatched key or generation returnsCONFLICT, and missing evidence returnsUNAVAILABLE.DELETE_WORKFLOW: refuses withCONFLICTwhile a keyed activation has unacknowledged evidence. It cascades normally after the acknowledgement. Unkeyed legacy rows keep today's behavior.dataflowsrow first (FOR UPDATEon PostgreSQL, a writer-lock no-op update on SQLite). No nested pool acquisition happens inside a transaction.10_admission_evidence: identical constraints on PostgreSQL and SQLite, including partial indexes, and a backfill ofever_activated.client.luaandactivation_repo.luaare split into cohesive modules,client/admission.luaandpersist/activation/*.Tests: native
make test-*passes on SQLite (1,032) and PostgreSQL (993). Lint's one warning is pre-existing (func_child_output_testfixpoint). Two independent reviews passed.