fix: preserve native Codex recurrence during loop re-enable - #84
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 839e6ad7e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| name, | ||
| status: "ACTIVE", | ||
| rrule: config.rrule, | ||
| rrule: args.rrule ? config.rrule : undefined, |
There was a problem hiding this comment.
Restore recurrence when the task has none
When an owned automation has lost its rrule field or stores an empty string, automationStatus still considers it registered because ownership identity only covers id, created_at, and cwds. Passing undefined here then activates the task without restoring a cadence, while enable persists a valid recurrence in its config and reports success, so the supposedly enabled loop may never be scheduled. Preserve the stored recurrence only when it is nonempty; otherwise pass the configured recurrence or reject the task.
Useful? React with 👍 / 👎.
| existingAutomation.rrule.startsWith("RRULE:") | ||
| ? existingAutomation.rrule | ||
| : `RRULE:${existingAutomation.rrule}` |
There was a problem hiding this comment.
Normalize before checking the recurrence prefix
For a stored canonical recurrence whose prefix differs only by case or surrounding whitespace, such as rrule:freq=weekly, the previous direct normalizeRrule call accepted it because that helper trims and uppercases first. This case-sensitive precheck now prepends another prefix, producing RRULE:RRULE:FREQ=... and making re-enable fail. Apply the same trim/case normalization before deciding whether the native value needs a prefix.
Useful? React with 👍 / 👎.
## [2.31.1](v2.31.0...v2.31.1) (2026-09-14) ### Bug Fixes * preserve native Codex recurrence during loop re-enable ([#84](#84)) ([37e7e20](37e7e20))
|
🎉 This PR is included in version 2.31.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Codex stores native task recurrence as
FREQ=.... Re-enabling a loop after a native task update rejected that value because fclt validates canonical recurrence asRRULE:FREQ=....Normalize the native value at the adapter boundary and preserve the task's stored recurrence unless the caller explicitly changes cadence. Project and global regression fixtures verify re-enable, disable, ownership, and preservation of authored task fields.
Validation: lint, typecheck, 73 focused tests, and compiled binary verification pass. The actual paused task now passes enable dry-run and remains byte-for-byte unchanged. No schedule activation or state-directory relocation.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.