fix(build): пересобрать main.js с фиксом завершения self-update (issue #31)

This commit is contained in:
Dushnilin
2026-08-13 22:51:56 +03:00
parent c1a21ef97b
commit 4bc68d7e8e
2 changed files with 93 additions and 28 deletions
+7
View File
@@ -20,9 +20,15 @@ trap cleanup EXIT
fail() {
printf 'FAIL: %s\n' "$1" >&2
ls -la "$WORK_DIR" >&2 || true
exit 1
}
assert_stale_uc_ready() {
[ -f "$STALE_UC" ] || fail "stale.uc is missing right before ucode runs"
[ -s "$STALE_UC" ] || fail "stale.uc is empty right before ucode runs"
}
# ── the identity check exists and is used ────────────────────────────────────
grep -q 'function pid_is_component_worker' "$UPDATES_UC" \
|| fail "pid_is_component_worker() is gone; a recycled pid can keep a dead job running forever"
@@ -77,6 +83,7 @@ print((length(stale_calls) > 0 ? "stale" : "running") + "\n");
DRIVER
# A live worker is not stale.
assert_stale_uc_ready
ln -s /bin/sleep "$WORK_DIR/component-action-worker"
"$WORK_DIR/component-action-worker" 30 &
worker_pid=$!