Skip to content

Add schedule start lifecycle locking#312

Merged
jjoonleo merged 2 commits into
devfrom
codexd/schedule-start-lock
May 13, 2026
Merged

Add schedule start lifecycle locking#312
jjoonleo merged 2 commits into
devfrom
codexd/schedule-start-lock

Conversation

@jjoonleo
Copy link
Copy Markdown
Contributor

Summary

  • Add server-owned schedule lifecycle timestamps with startedAt and finishedAt migrations.
  • Add idempotent POST /schedules/{scheduleId}/start that freezes preparation snapshots and returns schedule plus preparations.
  • Guard schedule edits, schedule-specific preparation edits, deletion, and finish with explicit lifecycle rules.
  • Refactor punctuality scoring to count only explicitly finished NORMAL and LATE schedules.
  • Document the frontend API changes in docs/schedule-start-api.md.

Frontend impact

  • Schedule responses include nullable startedAt and finishedAt.
  • Alarm window responses include nullable startedAt and finishedAt.
  • Finish now rejects unstarted schedules with SCHEDULE_NOT_STARTED.
  • Started schedules use frozen schedule-specific preparation snapshots, so default preparation edits do not affect running schedules.

Validation

  • JAVA_HOME="$HOME/.sdkman/candidates/java/17.0.12-oracle" ./gradlew test

@jjoonleo jjoonleo marked this pull request as ready for review May 13, 2026 12:46
@jjoonleo jjoonleo force-pushed the codexd/schedule-start-lock branch from 5e6a0fb to 0c433ba Compare May 13, 2026 12:59
@jjoonleo jjoonleo merged commit a333830 into dev May 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant