You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(api): editing an in-progress non-preset weekly/monthly plan is refused as a ramp change #1184
Saving an in-progress plan whose stored ramp is a non-preset weekly or monthly (for example weekly 20%/7d, created through the API) fails with 409 "cannot change the ramp schedule", even when only the name changes.
rampScheduleShapeUnchanged (internal/api/handler_plans.go:431) compares the type, so weekly and custom count as a change even though percent, interval and step count are identical.
For a plan with CurrentStep > 0, preserveRampProgress (internal/api/handler_plans.go:408-423) then refuses the update with 409.
At CurrentStep == 0 the save succeeds, but the stored type becomes custom and the start and next-execution dates are rebuilt.
Before #1183 the form sent immediate for these plans, which also returned 409, so this is not a regression; #1183 made the behaviour visible.
Proposed fix
Treat two ramps as the same shape when percent, interval and total steps match, whatever the type label is, or keep the stored type when an equivalent custom ramp is submitted. Add handler tests for:
a rename of an in-progress weekly 20% plan succeeds and keeps its progress;
a real change of percent or interval is still refused.
Activity
IAmJSD commentedon Oct 20, 2026
Claiming: working on this
fix(api): keep an equivalent ramp when editing a non-preset weekly/mo…