Files
CyberStrikeAI/docs/en-US
Sycun e80668b2e9 feat: make a restart part of the one-click update, and recover the page by itself
The console now knows what it is running: the status endpoint compares the binary
identity captured at startup (size + nanosecond mtime) with the file on disk, so
an update, a rollback or a CLI run that swapped the binary without a restart is
reported as needsRestart (with the build time) - a state that used to live only in
one job's result and vanished with the process. That state grows a persistent
banner and POST /api/system/update/restart (409 when there is nothing to activate
or a job owns the tree, 400 without a hook), so a forgotten tick is one click
instead of a shell login.

The restart tick defaults to on exactly where it is safe: launchd/systemd leave
markers in the environment (XPC_SERVICE_NAME, INVOCATION_ID/JOURNAL_STREAM) and
the box follows them; an operator's own choice is never second-guessed afterwards.

While the process is down the console becomes a recovery view that probes the
status endpoint every 2 seconds: 200 means the old process still answers, a dead
socket means it is on its way out, and a 401 - only a new process can fail to know
the session - reloads the page back to #system-update. A job poll that dies during
a requested restart is the restart in flight, not a failure to toast.

Also fixed: updateT now asks i18next not to escape interpolated values, because
the console escapes at render time - the apply confirm dialog has been showing
branch names with / ever since they contained a slash, and the new banner
showed dates the same way.

Tests: 7 new console contract tests (36 total: banner, tick default, restart
confirm/refusal, watchdog 200-vs-401, timeout copy, the in-flight poll death) plus
handler tests for the stamp and the endpoint, all mutation-probed; docs describe
the pending-restart state and the self-recovery.
2026-10-07 22:53:32 +08:00
..
2026-07-07 14:04:18 +08:00
2026-07-17 17:17:10 +08:00
2026-07-23 20:17:17 +08:00
2026-07-07 14:04:18 +08:00
2026-07-20 16:54:50 +08:00
2026-07-07 14:04:18 +08:00
2026-07-07 14:04:18 +08:00
2026-07-11 11:30:50 +08:00
2026-07-07 14:04:18 +08:00
2026-07-07 14:04:18 +08:00
2026-07-07 14:04:18 +08:00
2026-07-07 14:04:18 +08:00
2026-07-08 14:21:10 +08:00
2026-07-21 21:04:53 +08:00
2026-07-07 14:04:18 +08:00
2026-07-10 21:35:49 +08:00
2026-07-11 11:30:50 +08:00
2026-07-11 11:30:50 +08:00
2026-07-07 14:04:18 +08:00
2026-07-07 14:04:18 +08:00
2026-07-07 14:04:18 +08:00
2026-07-24 16:43:01 +08:00
2026-07-23 19:14:09 +08:00
2026-07-07 14:04:18 +08:00
2026-07-31 21:06:22 +08:00