fix(installer): use core.common in runtime healthcheck and fix CLI guard in ucode modules
This commit is contained in:
@@ -7,8 +7,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: TACHYON\n"
|
"Project-Id-Version: TACHYON\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2026-09-17 11:53+0300\n"
|
"POT-Creation-Date: 2026-09-17 12:45+0300\n"
|
||||||
"PO-Revision-Date: 2026-09-17 11:53+0300\n"
|
"PO-Revision-Date: 2026-09-17 12:45+0300\n"
|
||||||
"Last-Translator: Dushnilin <dushnilin@gmail.com>\n"
|
"Last-Translator: Dushnilin <dushnilin@gmail.com>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"Language: \n"
|
"Language: \n"
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: TACHYON\n"
|
"Project-Id-Version: TACHYON\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2026-09-17 14:53+0300\n"
|
"POT-Creation-Date: 2026-09-17 15:45+0300\n"
|
||||||
"PO-Revision-Date: 2026-09-17 14:53+0300\n"
|
"PO-Revision-Date: 2026-09-17 15:45+0300\n"
|
||||||
"Last-Translator: Dushnilin\n"
|
"Last-Translator: Dushnilin\n"
|
||||||
"Language-Team: none\n"
|
"Language-Team: none\n"
|
||||||
"Language: ru\n"
|
"Language: ru\n"
|
||||||
|
|||||||
+1
-1
@@ -765,7 +765,7 @@ healthcheck() {
|
|||||||
err "Installed runtime reports version $_version, expected $TACHYON_RELEASE_TAG"
|
err "Installed runtime reports version $_version, expected $TACHYON_RELEASE_TAG"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
ucode -L /usr/lib/tachyon -e 'require("core.constants");' >/dev/null 2>&1 || { err "ucode cannot load Tachyon runtime"; return 1; }
|
ucode -L /usr/lib/tachyon -e 'require("core.common");' >/dev/null 2>&1 || { err "ucode cannot load Tachyon runtime"; return 1; }
|
||||||
ok "Healthcheck passed"
|
ok "Healthcheck passed"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: TACHYON\n"
|
"Project-Id-Version: TACHYON\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2026-09-17 14:53+0300\n"
|
"POT-Creation-Date: 2026-09-17 15:45+0300\n"
|
||||||
"PO-Revision-Date: 2026-09-17 14:53+0300\n"
|
"PO-Revision-Date: 2026-09-17 15:45+0300\n"
|
||||||
"Last-Translator: Dushnilin\n"
|
"Last-Translator: Dushnilin\n"
|
||||||
"Language-Team: none\n"
|
"Language-Team: none\n"
|
||||||
"Language: ru\n"
|
"Language: ru\n"
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: TACHYON\n"
|
"Project-Id-Version: TACHYON\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2026-09-17 11:53+0300\n"
|
"POT-Creation-Date: 2026-09-17 12:45+0300\n"
|
||||||
"PO-Revision-Date: 2026-09-17 11:53+0300\n"
|
"PO-Revision-Date: 2026-09-17 12:45+0300\n"
|
||||||
"Last-Translator: Dushnilin <dushnilin@gmail.com>\n"
|
"Last-Translator: Dushnilin <dushnilin@gmail.com>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"Language: \n"
|
"Language: \n"
|
||||||
|
|||||||
@@ -2236,7 +2236,7 @@ function module_exports() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourcepath(1) != null && sourcepath(1) != "")
|
if ((sourcepath(1) != null && sourcepath(1) != "") || ARGV[0] == null)
|
||||||
return module_exports();
|
return module_exports();
|
||||||
|
|
||||||
exit(main(ARGV));
|
exit(main(ARGV));
|
||||||
@@ -258,7 +258,7 @@ function module_exports() {
|
|||||||
return constants_map();
|
return constants_map();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourcepath(1) != null && sourcepath(1) != "")
|
if ((sourcepath(1) != null && sourcepath(1) != "") || ARGV[0] == null)
|
||||||
return module_exports();
|
return module_exports();
|
||||||
|
|
||||||
let mode = ARGV[0] || "";
|
let mode = ARGV[0] || "";
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ function module_exports() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourcepath(1) != null && sourcepath(1) != "")
|
if ((sourcepath(1) != null && sourcepath(1) != "") || ARGV[0] == null)
|
||||||
return module_exports();
|
return module_exports();
|
||||||
|
|
||||||
// CLI surface exists for the shell test suite, which has no way to import a
|
// CLI surface exists for the shell test suite, which has no way to import a
|
||||||
|
|||||||
@@ -590,7 +590,7 @@ function module_exports() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourcepath(1) != null && sourcepath(1) != "")
|
if ((sourcepath(1) != null && sourcepath(1) != "") || ARGV[0] == null)
|
||||||
return module_exports();
|
return module_exports();
|
||||||
|
|
||||||
let mode = ARGV[0] || "";
|
let mode = ARGV[0] || "";
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ function module_exports() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourcepath(1) != null && sourcepath(1) != "")
|
if ((sourcepath(1) != null && sourcepath(1) != "") || ARGV[0] == null)
|
||||||
return module_exports();
|
return module_exports();
|
||||||
|
|
||||||
let mode = ARGV[0] || "";
|
let mode = ARGV[0] || "";
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ function module_exports() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourcepath(1) != null && sourcepath(1) != "")
|
if ((sourcepath(1) != null && sourcepath(1) != "") || ARGV[0] == null)
|
||||||
return module_exports();
|
return module_exports();
|
||||||
|
|
||||||
let mode = ARGV[0] || "";
|
let mode = ARGV[0] || "";
|
||||||
|
|||||||
@@ -383,7 +383,7 @@ function module_exports() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourcepath(1) != null && sourcepath(1) != "")
|
if ((sourcepath(1) != null && sourcepath(1) != "") || ARGV[0] == null)
|
||||||
return module_exports();
|
return module_exports();
|
||||||
|
|
||||||
let mode = as_string(ARGV[0]);
|
let mode = as_string(ARGV[0]);
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ function run(argv, usage_path) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourcepath(1) != null && sourcepath(1) != "") {
|
if ((sourcepath(1) != null && sourcepath(1) != "") || ARGV[0] == null) {
|
||||||
return {
|
return {
|
||||||
run,
|
run,
|
||||||
nft_queue_overlap
|
nft_queue_overlap
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ function module_exports() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourcepath(1) != null && sourcepath(1) != "")
|
if ((sourcepath(1) != null && sourcepath(1) != "") || ARGV[0] == null)
|
||||||
return module_exports();
|
return module_exports();
|
||||||
|
|
||||||
let mode = ARGV[0] || "";
|
let mode = ARGV[0] || "";
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function module_exports() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourcepath(1) != null && sourcepath(1) != "")
|
if ((sourcepath(1) != null && sourcepath(1) != "") || ARGV[0] == null)
|
||||||
return module_exports();
|
return module_exports();
|
||||||
|
|
||||||
validator.run_expected(KIND, USAGE, ARGV);
|
validator.run_expected(KIND, USAGE, ARGV);
|
||||||
@@ -17,7 +17,7 @@ function module_exports() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourcepath(1) != null && sourcepath(1) != "")
|
if ((sourcepath(1) != null && sourcepath(1) != "") || ARGV[0] == null)
|
||||||
return module_exports();
|
return module_exports();
|
||||||
|
|
||||||
validator.run_expected(KIND, USAGE, ARGV);
|
validator.run_expected(KIND, USAGE, ARGV);
|
||||||
@@ -1346,7 +1346,7 @@ function module_exports() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourcepath(1) != null && sourcepath(1) != "")
|
if ((sourcepath(1) != null && sourcepath(1) != "") || ARGV[0] == null)
|
||||||
return module_exports();
|
return module_exports();
|
||||||
|
|
||||||
// CLI surface for the shell test suite, which cannot import a ucode module.
|
// CLI surface for the shell test suite, which cannot import a ucode module.
|
||||||
|
|||||||
@@ -3254,7 +3254,7 @@ function module_exports() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourcepath(1) != null && sourcepath(1) != "")
|
if ((sourcepath(1) != null && sourcepath(1) != "") || ARGV[0] == null)
|
||||||
return module_exports();
|
return module_exports();
|
||||||
|
|
||||||
let mode = ARGV[0];
|
let mode = ARGV[0];
|
||||||
|
|||||||
@@ -64,4 +64,7 @@ grep -Fq "export const FAKEIP_CHECK_DOMAIN = 'fakeip.podkop.fyi';" "$FRONTEND_CO
|
|||||||
grep -Fq "export const IP_CHECK_DOMAIN = 'ip.podkop.fyi';" "$FRONTEND_CONSTANTS" ||
|
grep -Fq "export const IP_CHECK_DOMAIN = 'ip.podkop.fyi';" "$FRONTEND_CONSTANTS" ||
|
||||||
fail "LuCI diagnostics must use the deployed public IP endpoint"
|
fail "LuCI diagnostics must use the deployed public IP endpoint"
|
||||||
|
|
||||||
|
ucode -L "$TACHYON_LIB" -e 'let c = require("core.constants"); exit(c.TACHYON_CONFIG_NAME == "tachyon" ? 0 : 1);' || \
|
||||||
|
fail "requiring core.constants from inline eval failed"
|
||||||
|
|
||||||
printf 'constants ownership checks passed\n'
|
printf 'constants ownership checks passed\n'
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ if grep -qi 'jsdelivr' "$INSTALLER"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
grep -Fq '/usr/bin/tachyon component_action sing_box "$_action"' "$INSTALLER" || fail "sing-box must be delegated to component_action"
|
grep -Fq '/usr/bin/tachyon component_action sing_box "$_action"' "$INSTALLER" || fail "sing-box must be delegated to component_action"
|
||||||
|
grep -Fq 'require("core.common")' "$INSTALLER" || fail "runtime healthcheck must require core.common"
|
||||||
|
|
||||||
export TACHYON_INSTALLER_TEST=1
|
export TACHYON_INSTALLER_TEST=1
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user