Automation Model Launch -> Primary - #1047
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Warning Review limit reached
Next review available in: 34 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe automation service now tracks cron expressions, replaces changed schedules, validates current rule state before execution, suppresses stale runs, and handles nullable run results. Integration tests cover configuration reloads, updated execution settings, stale callbacks, and disabled queued occurrences. ChangesCron schedule reload handling
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/desktop/src/main/services/automations/automationService.ts (1)
3497-3546: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winRevalidate the rule inside the serialized queue.
Line 3537 passes the captured
currentRuletorunRule. If another run already occupies the per-rule queue, a reload can disable the rule or change its schedule or permissions before this run starts. The queued run then executes the obsolete configuration.Re-read and validate the rule after the queue becomes available and before
runRuleNowstarts. Skip the claimed occurrence when the rule is disabled or its trigger no longer matches. Add a named regression test:skips a queued scheduled occurrence after config reload. Start a blocking run, fire the schedule callback, reload a disabled or changed rule, release the first run, and assert that no second session starts.As per coding guidelines, “For computer-use changes, enforce policy and artifact ownership in code paths rather than relying only on prompts.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/desktop/src/main/services/automations/automationService.ts` around lines 3497 - 3546, The scheduled callback currently passes the captured currentRule into runRule, allowing queued executions to use stale configuration. Update the per-rule queued execution path around runRule and runRuleNow to re-read and validate the rule after the queue is available, skipping the claimed occurrence when the rule is missing, disabled, or its schedule trigger no longer matches; add the regression test named “skips a queued scheduled occurrence after config reload” covering a blocked run, config reload, release, and assertion that no second session starts.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@apps/desktop/src/main/services/automations/automationService.ts`:
- Around line 3497-3546: The scheduled callback currently passes the captured
currentRule into runRule, allowing queued executions to use stale configuration.
Update the per-rule queued execution path around runRule and runRuleNow to
re-read and validate the rule after the queue is available, skipping the claimed
occurrence when the rule is missing, disabled, or its schedule trigger no longer
matches; add the regression test named “skips a queued scheduled occurrence
after config reload” covering a blocked run, config reload, release, and
assertion that no second session starts.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 612c7e73-7a05-4349-9a6f-187c6388c20a
📒 Files selected for processing (2)
apps/desktop/src/main/services/automations/automationService.test.tsapps/desktop/src/main/services/automations/automationService.ts
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/desktop/src/main/services/automations/automationService.ts`:
- Around line 3251-3272: Update the promise callback before runRuleNow in
runRule so manual triggers execute using the rule selected by triggerManually
before applying the stale-rule guard, while disabled or missing automations
retain their distinct manual-run outcome. Keep stale suppression for
queued/non-manual executions, and move the suppression log so every suppressed
trigger is logged rather than only schedule triggers.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: d2842920-bd80-4916-a6f4-1e50768ffd1d
📒 Files selected for processing (2)
apps/desktop/src/main/services/automations/automationService.test.tsapps/desktop/src/main/services/automations/automationService.ts
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary by CodeRabbit