Repository navigation
feat(proxy): enforce shared scheduled network maintenance - #100
Merged
Merged
Conversation
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 native network maintenance to every Java and Bedrock Velocity proxy using the shared Config Service document
velocity/{environment}/maintenance/active. Scheduled starts, automatic ends, separate estimated ends, configurable announcements, join messages, and maintenance MOTD work from cached state without remote I/O during login or ping.Players with
grounds.maintenance.bypassOR a UUID whitelist entry may join and remain connected. Kicks and announcements enumerate only each proxy's local connections, so every proxy enforces the shared schedule without duplicate cross-proxy broadcasts. Episode identity preserves kick/announcement history through ordinary edits and rescheduling; restarts never replay expired warnings.NATS invalidations refresh the cached document immediately, with guarded 5-second polling as fallback and an independent 1-second schedule tick. The HTTP reader bounds memory and the complete body exchange, rereads projected tokens, and cancels on timeout/shutdown. Invalid reads retain the last valid state. Before the first valid read or after 30 seconds of stale configuration, ordinary new logins fail closed; permission/known-whitelist bypass still works, and configuration outages do not trigger kicks. A recorded automatic end is honored locally even offline. Unconfigured local/dev proxies keep their existing admission behavior.
Validation: complete
:velocity:buildpassed, including Spotless, shaded JAR, and 170 tests. Regressions cover bypass kicks/admission, independent proxy engines, expiry, restart/reschedule deduplication, escaping, strict UUID/type validation, and stalled-body timeout/recovery. Independent security/correctness review completed; whitespace checks passed.The pinned contract and implementation plan are in
docs/superpowers. Portal/API dependencies: https://github.com/groundsgg/grounds-forge/pull/594 and https://github.com/groundsgg/grounds-portal/pull/563. Deploy the same published immutable plugin build to all Stage Java and Bedrock proxies. This PR does not enable maintenance or disconnect live players.