Repository navigation
Reminders: skip missed policy, last_run_at and error_class, pause on unknown operation - #110
Merged
Merged
Conversation
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge with the documented migration rollout. SummaryAdds
No new actionable issues were found. Both earlier unnumbered findings are addressed. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Claim due reminder] --> B{Operation declared?}
B -->|No| C[Pause and clear claim]
B -->|Yes| D[Lock actor and reminder; check claim]
D --> E{Skip missed window?}
E -->|Yes| F[Advance time and clear claim]
E -->|No| G[Enqueue message and update run history]
Reviews (4) · Last reviewed commit: "Keep both Unreleased changelog entries" · Reviewed by Greptile |
|
Docs7 for cardmagic/solid-objects-ruby
Commit 1 finding is inline on the changed files. |
Owner
Author
|
@greptileai review |
Owner
Author
|
@greptileai review |
…un-103 # Conflicts: # CHANGELOG.md
Owner
Author
|
@greptileai review |
| its `missed:` policy. The default is `:latest`. The policy can be a symbol or | ||
| a string. | ||
|
|
||
| - `missed: :latest` coalesces missed occurrences (the JS PRD's `run_once`). The |
There was a problem hiding this comment.
Docs conventions: "the JS PRD" is not used anywhere else in the docs; the repository writes "JavaScript".
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.
Refs #103
Summary
schedule(missed:)accepts:skip/"skip"; default stays:latest;:latestand:allunchanged.ReminderStatusgainslast_run_at(Time or nil) anderror_class(String or nil), appended afterhandle. A replace (committed and in-turn read) keepslast_run_atandoccurrence, clearserror_class, sets"scheduled".20261130000000_add_solid_objects_reminder_run_history.rb: addsreminders.last_run_at,reminders.error_class, and widenschk_so_reminders_missedtolatest/all/skip. Doctor lists the new columns.docs/reminders.md(three policies, when a reminder fires, run history fields),docs/architecture.mdcatch-up bullets,CHANGELOG.mdUnreleased.Not added: a reschedule method, a cancel return value, a resume API, mailbox retry count on
ReminderStatus.Evidence
test/integration/reminder_missed_policy_test.rb→ 17 runs, 6 failures, 10 errors (missed reminder policy must be all or latest,undefined method 'error_class', …).After: 17 runs, 102 assertions, 0 failures.
test/models/reminder_run_history_migration_test.rb: applies every earlier migration, insertslatestandallrows, applies the new one; rows survive,skipnow accepted, unknown policy still refused. Fresh install is the suite's own schema.bundle exec rake test→ 1010 runs, 4262 assertions, 0 failures, 0 errors, 39 skips.rake at_least_once,standard,rubocop,rbs,steep,securitypass. PostgreSQL and MySQL run in CI.Merge Danger
Door: two-way for code; the migration is reversible (
downrestores the old check, which fails ifskiprows exist).Blast Radius: schema
Applications must run
bin/rails solid_objects:install:migrationsand migrate before upgrading a scheduler, because every enqueue now writeslast_run_at.ReminderStatushas two more members, so positionalReminderStatus.new(...)callers (unlikely) would break.run_onceno longer raises for an unknown reminder operation; it pauses and returns true.