Status checks name the next step when the helper is down

The management path dropped the job path's specific message (helper port closed with the
loader up, or no loader at all, or a helper too old: #447) and always said "not running or
is an old version". Status, process list and every other management call now carry it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K3cPwhp3UrzayBfyy9PDcN
This commit is contained in:
phantomptrandClaude Opus 5.5 committed 2026-10-16 06:29:07 -07:00
1 parent 3ba4656c68
commit e0d3bd7851
3 files changed
+13 -2

No files matched your search

+1 -1
View File
@@ -278,7 +278,7 @@ impl AvaTransport {
pub(crate) fn ensure(&self, console: &str, label: &str) -> Result<()> {
use crate::console::{require_in, HELPER_NOT_AVA1, NOT_PAIRED};
require_in(self.pool(), console, gen::CAP_MGMT).map_err(|f| match f.reason.as_str() {
HELPER_NOT_AVA1 => mgmt::helper_not_ava1(label),
HELPER_NOT_AVA1 => mgmt::helper_not_ava1_because(label, &f.detail),
NOT_PAIRED => MgmtError {
label: label.to_string(),
status: gen::ERR_NOT_PAIRED,
@@ -719,6 +719,8 @@ async fn a_console_without_cap_mgmt_is_helper_not_ava1_without_a_request() {
for m in [m::HW_INFO, m::FS_LIST, m::NODE_STATUS] {
let e = call(&t, c, m, "X", b"{}", T).await.unwrap_err();
assert!(e.to_string().contains("helper_not_ava1"), "{e}");
// The message says which: an older helper, not "not running or an old version".
assert!(e.to_string().contains("older ps5upload helper"), "{e}");
}
assert_eq!(
n.load(Ordering::SeqCst),
@@ -770,6 +772,9 @@ async fn an_unreachable_console_is_helper_not_ava1() {
.await
.unwrap_err();
assert!(e.to_string().contains("helper_not_ava1"), "{e}");
// Status checks say whether the loader is up, as a job does (#447), not the vague
// "not running or is an old version".
assert!(e.to_string().contains("port 9021"), "{e}");
}
#[tokio::test(flavor = "multi_thread")]
+7 -1
View File
@@ -199,10 +199,16 @@ pub const NOT_PAIRED_MESSAGE: &str =
/// The refusal for a console that has no AVA1 listener (or a helper too old to serve this):
/// `payload rejected <label>: helper_not_ava1: <message>`. The client keys on the token.
pub fn helper_not_ava1(label: &str) -> anyhow::Error {
helper_not_ava1_because(label, HELPER_NOT_AVA1_MESSAGE)
}
/// [`helper_not_ava1`] with the message that says what was found (the helper's port closed and
/// the loader up or not, or a helper too old), so status checks give the same next step as a job.
pub fn helper_not_ava1_because(label: &str, detail: &str) -> anyhow::Error {
MgmtError {
label: label.to_string(),
status: 0,
cause: format!("{HELPER_NOT_AVA1}: {HELPER_NOT_AVA1_MESSAGE}"),
cause: format!("{HELPER_NOT_AVA1}: {detail}"),
}
.into()
}