fix(gateway): explain ignored restart signal

Add actionable operator guidance when an unauthorized SIGUSR1 gateway restart is ignored because unmanaged restart is disabled.

The change is log-only: restart authorization and scheduling semantics are unchanged, and the existing run-loop test now asserts both the reason warning and the recovery hint.

Refs #79577
Refs #78110
Refs #82433

Co-authored-by: wAngByg <281221101+wAngByg@users.noreply.github.com>
This commit is contained in:
Ashd.LW.
2026-05-31 01:38:35 +08:00
committed by GitHub
parent 9e3d5310cc
commit bc77f7a00a
2 changed files with 13 additions and 1 deletions

View File

@@ -1205,6 +1205,13 @@ describe("runGatewayLoop", () => {
expect(gatewayLog.warn).toHaveBeenCalledWith(
"SIGUSR1 restart ignored (not authorized; commands.restart=false or use gateway tool).",
);
expect(gatewayLog.warn).toHaveBeenCalledTimes(2);
expect(gatewayLog.warn).toHaveBeenNthCalledWith(
2,
"An unauthorized SIGUSR1 restart signal was received and ignored. " +
"If a pending gateway restart needs to be applied, run `openclaw gateway restart` " +
"or restart the gateway through your service manager.",
);
});
});