Conversation
The committed schemas had drifted from their TypeScript sources; this is a plain regeneration with no source changes. Two user-visible effects: - entrypoint.not_found was still typed as an array of RouteRule, but it became a rules string block. The config editor rejected the block form that config.example.yml documents. - RuleDo missed the named option block for middleware actions in rules. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Mirrors the backend addition of opt-in sleep/wake notifications, sent through the providers under providers.notification. - config/config.ts gains defaults.idlewatcher.notify, the global opt-in. - providers/idlewatcher.ts gains the notify event vocabulary and the three flat proxy.idle_notify* Docker labels. - src/lib/api.ts and the JSON schemas are regenerated. Without the schema update the config editor would reject the new keys, since every generated schema sets additionalProperties: false. Verified with ajv: defaults.idlewatcher.notify and the Docker labels accept the documented shapes and reject unknown events and keys. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
@taljaards is attempting to deploy a commit to the GoDoxy Team on Vercel. A member of the Team first needs to authorize it. |
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe API and configuration types now support idlewatcher sleep/wake notifications. Route schemas define notification settings for HTTP, file-server, and stream routes, including provider targets and Docker labels. ChangesIdlewatcher notifications
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Merge Risk: 🟡 Moderate · up to This adds opt-in idlewatcher notifications but also requires notification configuration in HTTP and stream route schemas. Existing routes may be rejected if defaults are not applied before validation, so compatibility handling should be confirmed before merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
✨ Simplify code
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. A rabbit hops through config bright Comment |
Follows the backend cut: the notify config is now just {enabled, to},
firing on sleep and wake. Removes the event vocabulary and the
proxy.idle_notify_events label, and regenerates api.ts and the schemas.
Verified with ajv: defaults.idlewatcher.notify and the Docker labels
accept the remaining shapes and now reject `events` along with any other
unknown key.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
@coderabbitai review |
|
Resolves the three JSON schema conflicts by regenerating them from the merged TypeScript sources, rather than hand-merging minified JSON. The result carries both sides: upstream's optional cidr_whitelist.allow, the string-typed entrypoint not_found and the RuleDo middleware block, plus this branch's idlewatcher notify config. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Mirrors yusing/godoxy#264, which adds opt-in sleep/wake notifications for idlesleep routes. Without the type and schema update the config editor rejects the new keys, since every generated schema sets
additionalProperties: false.Changes
config/config.ts—defaults.idlewatcher.notify, the global opt-in.providers/idlewatcher.ts— the notify event vocabulary, plus the three flatproxy.idle_notify*Docker labels forDockerRoutes.src/lib/api.ts— regenerated from the swagger in the backend PR. Purely additive:IdlewatcherNotifyConfig,IdlewatcherNotifyEvent, andnotifyonIdlewatcherConfig.config.schema.json,routes.schema.json,docker_routes.schema.json— regenerated.Stacking
Based on #19 (stale schema regeneration), so this diff stays limited to my own changes. Merge #19 first; until then this PR shows both commits.
Merge order
The backend PR regenerates
swagger.json, which is the input forapi.tshere. They can merge in either order — nothing breaks in between, the editor just won't accept the new keys until this one lands.Verification
Generators run via
npxrather thanbunx(no bun on my machine — same tools, same flags). Both reproduce the committed output byte-for-byte on unchanged input, which is what makes the diffs trustworthy.Validated the generated schemas against real config shapes with ajv:
defaults.idlewatcher.notifyacceptsenabled/to/events, and rejects unknown events and unknown keysproxy.idle_notify*Docker labels accept the documented formsNote on the route-level case, pre-existing
routes.schema.jsongainsnotify, but route-levelidlewatcher:in file-provider YAML does not validate today regardless:routes.tsuses the swagger-generatedIdlewatcherConfig, where every field isrequiredandidle_timeoutis a nanosecond int enum, so evenidlewatcher: {idle_timeout: 30m}fails. I verified this fails identically before and after this PR.The fix is presumably to give the nested route config a hand-written type with
Durationstrings, the wayhealthcheckalready has —Partial<>alone is not enough because of the duration typing. That is a behaviour change for all existing idlewatcher fields, so I left it out and am flagging it instead. Happy to do it as a follow-up if you want it. It may be the same thing as the//FIXME: fix thisonDockerRoutes.🤖 Generated with Claude Code
Note
Add sleep/wake notification config to idle-watcher
IdlewatcherNotifyConfiginterface with anenabledflag and a list of notification provider namesidle_notifyandidle_notify_toproperties toIdleWatcherConfigin idlewatcher.ts, supporting Docker label mappings for comma-separated provider targetsdefaults.idlewatcher.notifysection in config.ts for route-level notification defaultsnotifyis required onIdlewatcherConfigin api.ts; existing callers that do not supply it will fail type checksMacroscope summarized ce9a5df.
Summary by CodeRabbit
New Features
Documentation