Add change-detection and trigger registry (#8) - #9
Merged
Conversation
* Add change-detection and trigger registry - Add ChangeDetectionJob and TriggerState model with migration - Introduce TriggerCollection and stable trigger `unique_key` values - Add ChangeDetecting concern for detector triggers and scheduler support - Have RecurringTasksConfig schedule ChangeDetectionJob for detectors - Make RunWorkflowJob accept `trigger_key` and payload; pass payload to workflow - Add tests and fake trigger; update schema, docs, HTTP client, and add pg gem * Update app/models/r3x/trigger_state.rb Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Remove HTTP/Discord helpers from WorkflowContext - Remove fetch_body, discord_output, and http_client methods. - Change made in `lib/r3x/workflow_context.rb`. - Reduce hidden dependencies and side effects in the context. - Encourage injection of HTTP clients/outputs for testability. * Make enqueueing atomic for change detection - Make trigger state update and job enqueue atomic in ChangeDetectionJob - Add argument normalization to RunWorkflowJob and ChangeDetectionJob - Add test that simulates enqueue failure and preserves trigger state - Adjust test payload expectation to use symbolized keys - Update AGENTS.md to document Solid Queue transactional behavior --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…workflow_job, workflow_context, and tests
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.
unique_keyvaluestrigger_keyand payload; pass payload to workflowUpdate app/models/r3x/trigger_state.rb
Remove HTTP/Discord helpers from WorkflowContext
lib/r3x/workflow_context.rb.