Register four IPC channels nobody registered, and guard the exit (#155) - #156
Merged
Conversation
Error invoking remote method 'rbac:list-roles':
No handler registered for 'rbac:list-roles'
`rbac:list-roles`, `rbac:upsert-role`, `rbac:delete-role` and
`web:user-roles` were declared in ipc.ts, exposed by the preload and
called by the panel — and none of them had a handler. Every one has
answered "no handler registered" since the day it was written, so named
roles have never worked at all.
It stayed hidden because the panel loaded them inside a chain that
swallowed the rejection, which is also why the API keys after them never
appeared (#153). Fixing that chain in the last release is what made this
visible, which is the whole argument for surfacing errors instead of
eating them.
The class of bug now has a test: every channel the PRELOAD exposes must
be registered in `register.ts`. It found `web:user-roles` immediately —
a second one I had not been told about.
That test was vacuous twice before it worked, and both times only
breaking it on purpose showed that:
Commenting the handler out left `IPC.rbacList` sitting in the comment,
the scan found it, and the gate stayed GREEN over a channel that
answers nothing. Comments are stripped first now.
Then it flagged three channels that were fine, because they are
registered as `H(\n IPC.x,` across two lines and the pattern wanted
them on one.
---
MSMS no longer closes silently while a server is running. It names the
servers that are up and asks. Confirmed, it stops them the way an
operator would: `immediate` is gone, so the configured countdown is
broadcast to players and the world gets time to save. Anything still up
after 45 seconds is killed rather than left orphaned holding the world
files.
Asked on the window's own close as well as on before-quit — a dialog
that appears after the window has already gone reads as the app having
crashed and then argued about it.
---
The API key panel now links to the route reference this install serves
itself — so it always matches the running version — and to the
repository for the written documentation and the source. Both surfaces,
desktop and web.
README updated: version, the new shutdown behaviour, touch on the map,
named roles, and the map page taking the site's colours.
Verified: 12/12 gates. Removing the handler again fails with "the
preload calls rbacList and nothing registers a handler".
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.
Closes #155.
No handler registered for 'rbac:list-roles'rbac:list-roles,rbac:upsert-role,rbac:delete-roleandweb:user-roleswere declared inipc.ts, exposed by the preload and called by the panel — and none of them had a handler. Every one has answered "no handler registered" since the day it was written, so named roles have never worked.It stayed hidden because the panel loaded them inside a chain that swallowed the rejection — which is also why the API keys after them never appeared (#153). Fixing that chain last release is what made this visible, which is the whole argument for surfacing errors rather than eating them.
The class of bug now has a test
Every channel the preload exposes must be registered in
register.ts. It foundweb:user-rolesimmediately — a second one nobody had reported.It was vacuous twice before it worked, and only breaking it on purpose showed that:
IPC.rbacListin the comment. The scan found it and the gate stayed green over a channel that answers nothing.H(\n IPC.x,across two lines and the pattern wanted one.the preload calls rbacList and nothing registers a handler— exactly the one removed.Closing MSMS with a server running
It refuses and names the servers that are up. Confirmed, it stops them the way an operator would:
immediateis gone, so the configured countdown is broadcast to players and the world gets time to save. Anything still up after 45 seconds is killed rather than left orphaned holding the world files.Asked on the window's own close as well as on
before-quit— a dialog that appears after the window has already gone reads as the app having crashed and then argued about it.API keys: where to read more
The key panel links to the route reference this install serves itself, so it always matches the running version, and to the repository for the written documentation and the source. Both surfaces.
README
Version, the new shutdown behaviour, touch on the map, named roles, and the map page taking the site's colours.
12/12 gates.