feat(lint): expose scheduled_events() query function in Starlark rules#692
Open
Andries-Smit wants to merge 2 commits into
Open
feat(lint): expose scheduled_events() query function in Starlark rules#692Andries-Smit wants to merge 2 commits into
Andries-Smit wants to merge 2 commits into
Conversation
Adds a new `scheduled_events()` built-in to the linter's Starlark API so star rules can inspect scheduled event configuration (name, microflow, interval, enabled flag). - Extends `LintReader` with `ListScheduledEvents()` (already implemented by MprBackend and MockBackend — no concrete changes needed there) - Adds `ScheduledEvent` struct and `ScheduledEvents() iter.Seq` on `LintContext`; resolves module names from the catalog `modules` table and converts interval+type to seconds via `intervalToSeconds()` - Registers `scheduled_events` builtin and adds `scheduledEventToStarlark` conversion in `starlark.go` Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AI Code ReviewReview SummaryModerate Issues
Minor Issues
What Looks Good
RecommendationRequest changes to add appropriate test coverage for the new functionality. The implementation is fundamentally sound and follows project conventions, but lacks the required tests per the checklist. Once tests are added, this PR would be ready for approval. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
…tion - Resolve MicroflowID UUID to qualified name via catalog microflows table, falling back to raw UUID when catalog is not built - Document intervalToSeconds zero-return for unrecognised interval types - Add 5 tests: intervalToSeconds, MicroflowName resolution, excluded modules, nil reader, and Starlark builtin end-to-end Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8txDneDb92yxMgD2LCPkR
AI Code ReviewCritical IssuesNone found. Moderate IssuesNone found. Minor Issues
What Looks Good
RecommendationApprove. The PR is well-implemented with excellent test coverage and follows project conventions. The minor integer overflow concern is extremely low-risk given the expected values for scheduled event intervals in Mendix applications. No changes are required before merging. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
scheduled_events()built-in to the linter's Starlark API so star rules can inspect scheduled event configuration (name, microflow, interval, enabled flag).LintReaderwithListScheduledEvents()(already implemented by MprBackend and MockBackend — no concrete changes needed there)ScheduledEventstruct andScheduledEvents() iter.SeqonLintContext; resolves module names from the catalogmodulestable and converts interval+type to seconds viaintervalToSeconds()scheduled_eventsbuiltin and addsscheduledEventToStarlarkconversion instarlark.go