Skip to content

feat(proxy): enforce shared scheduled network maintenance - #100

Merged
lusu007 merged 1 commit into
mainfrom
feat/network-maintenance
Oct 19, 2026
Merged

lusu007 merged 1 commit into
mainfrom
feat/network-maintenance

Conversation

@lusu007

@lusu007 lusu007 commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

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.bypass OR 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:build passed, 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.

@lusu007
lusu007 merged commit ffb606f into main Oct 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant