-
Notifications
You must be signed in to change notification settings - Fork 0
fix: preserve native Codex recurrence during loop re-enable #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -671,7 +671,11 @@ async function enableEvolutionLoopScoped(args: { | |
| ); | ||
| } | ||
| if (existingAutomation.exists && !args.rrule && existingAutomation.rrule) { | ||
| config.rrule = normalizeRrule(existingAutomation.rrule); | ||
| config.rrule = normalizeRrule( | ||
| existingAutomation.rrule.startsWith("RRULE:") | ||
| ? existingAutomation.rrule | ||
| : `RRULE:${existingAutomation.rrule}` | ||
| ); | ||
| } | ||
| const scaffold = existingAutomation.exists | ||
| ? { path: join(args.homeDir, ".codex", "automations", name) } | ||
|
|
@@ -697,7 +701,7 @@ async function enableEvolutionLoopScoped(args: { | |
| homeDir: args.homeDir, | ||
| name, | ||
| status: "ACTIVE", | ||
| rrule: config.rrule, | ||
| rrule: args.rrule ? config.rrule : undefined, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When an owned automation has lost its Useful? React with 👍 / 👎. |
||
| }); | ||
| await appendLoopAudit(args, { | ||
| generatedAt: now, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a stored canonical recurrence whose prefix differs only by case or surrounding whitespace, such as
rrule:freq=weekly, the previous directnormalizeRrulecall accepted it because that helper trims and uppercases first. This case-sensitive precheck now prepends another prefix, producingRRULE: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 👍 / 👎.