fix(events): fail closed on unknown notify state#176
Merged
Conversation
cxymds
marked this pull request as ready for review
July 22, 2026 00:42
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.
Pull Request
Description
Make event destination management fail closed unless Console has a trusted notification-module state and a successful target-list response. Console now prefers
notify_enabledfrom/target/list, falls back to/module-switchesonly when the field is absent for old-server compatibility, preserves previously trusted rows after refresh failures, and exposes distinct loading, disabled, unverifiable, and load-failure states.Type of Change
Testing
All 344 tests passed. The production build generated all 32 static routes successfully. Browser smoke testing confirmed the built Console loads without framework or console errors and correctly redirects an unauthenticated
/events-targetrequest to login; authenticated state screenshots were not available in the isolated local session.Checklist
Related Issues
Screenshots (if applicable)
N/A. This change reuses existing alerts, buttons, and table surfaces; authenticated runtime states are covered by the production state-module and page contract tests.
Additional Notes
Compatibility behavior is deliberate: a missing
notify_enabledfield triggers the legacy/module-switchesrequest, but a presentnull,undefined, string, number, 403, or network failure remains unknown and disables Add/Delete. This prevents delegated administrators from being forced onto theServerInfoAdminActionpermission domain once the new RustFS response is available.Adversarial validation verdicts:
truefrom a trusted response enables mutations, with no authorization changes or sensitive output.