feat(proto): add scheduler command state schemas - #191
Conversation
yordis
commented
May 29, 2026
- Scheduler commands need a shared lifecycle contract so replayed decisions stay consistent across command handlers.
- Schedule definition history needs a clear boundary from runtime delivery history so execution records do not pollute command state.
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
PR SummaryLow Risk Overview Introduces Reviewed by Cursor Bugbot for commit d570593. Bugbot is set up for automated code reviews on this repo. Configure here. |
WalkthroughIntroduces two new protobuf schema definitions for the scheduler domain. The first defines a ChangesSchedule State and Event Protocol Definitions
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
🧹 Nitpick comments (1)
proto/trogonai/scheduler/schedules/state/v1/state.proto (1)
1-1: Confirm Protobufedition = "2024"is valid; document enum/state semantics
edition = "2024"is a supported Protobuf Editions value (requiresprotoc32.0+). With that concern addressed, consider adding brief documentation for theStateValuelifecycle—especially the intended meaning/terminal nature ofMISSINGvsDELETED, and how pause/resume relates toPRESENT_ENABLED/PRESENT_DISABLED.🤖 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 `@proto/trogonai/scheduler/schedules/state/v1/state.proto` at line 1, Confirm the Protobuf edition value is correct (edition = "2024" requires protoc 32.0+); then add short documentation comments in state.proto for the StateValue enum and related messages explaining lifecycle semantics: clarify that MISSING represents an object that was never present (or not yet observed) and is terminal for lookup results, DELETED denotes a previously present object that has been removed and is a terminal deletion state, and that PRESENT_ENABLED vs PRESENT_DISABLED represent active vs paused presence (pause/resume transitions map between PRESENT_ENABLED and PRESENT_DISABLED without being terminal); reference the StateValue enum and any message types using it so consumers understand terminal vs transitional states and pause/resume behavior.
🤖 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.
Nitpick comments:
In `@proto/trogonai/scheduler/schedules/state/v1/state.proto`:
- Line 1: Confirm the Protobuf edition value is correct (edition = "2024"
requires protoc 32.0+); then add short documentation comments in state.proto for
the StateValue enum and related messages explaining lifecycle semantics: clarify
that MISSING represents an object that was never present (or not yet observed)
and is terminal for lookup results, DELETED denotes a previously present object
that has been removed and is a terminal deletion state, and that PRESENT_ENABLED
vs PRESENT_DISABLED represent active vs paused presence (pause/resume
transitions map between PRESENT_ENABLED and PRESENT_DISABLED without being
terminal); reference the StateValue enum and any message types using it so
consumers understand terminal vs transitional states and pause/resume behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9cb89829-efc6-4b8e-9870-b83817aa43b5
📒 Files selected for processing (2)
proto/trogonai/scheduler/schedules/state/v1/state.protoproto/trogonai/scheduler/schedules/v1/events.proto