feat: add Wake-on-LAN functionality with validation and tests - #27
feat: add Wake-on-LAN functionality with validation and tests#27vincentBesseau wants to merge 2 commits into
Conversation
|
Warning Review limit reached
Next review available in: 47 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe SDK adds typed Wake-on-LAN options and a ChangesWake-on-LAN API
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Integration as GladysIntegration
participant Core as Gladys core
participant Endpoint as /network/wake
Integration->>Integration: Validate WakeOnLanOptions
Integration->>Core: POST /network/wake
Core->>Endpoint: Forward validated options
Endpoint-->>Core: Success response
Core-->>Integration: Promise<SuccessResponse>
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@lib/gladys-integration.js`:
- Around line 1021-1026: Update the wakeOnLan validation around the existing
options.mac and options.address checks to reject syntactically invalid MAC
addresses and non-IPv4 address values, not just empty strings, before sending
the /network/wake request. Preserve acceptance of valid documented values, and
add tests confirming malformed non-empty MAC and address inputs make no request.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4cca7cb0-7b09-416e-a12a-77a106c8721b
📒 Files selected for processing (4)
index.d.tslib/gladys-integration.jstest/helpers/fake-gladys-server.jstest/wake-on-lan.test.js
|
Implemented in : #28 |
Summary by CodeRabbit
New Features
Bug Fixes