Compare commits

..

3 Commits

Author SHA1 Message Date
librelad
b83b647d16 Merge claude/2 2026-05-31 02:07:08 +01:00
librelad
5d16ad0695 chore(arrays): list files_task.sh in files_source.sh (regen 2nd pass)
A self-referential array — files_source.sh enumerates the arrays/ files — only
picks up a newly-created arrays/ file on the next regen pass. The task-folder
move created files_task.sh; this pass adds it to source_scripts so the committed
arrays match a fresh regen (and make_release's stale-array guard stays happy).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-31 02:07:08 +01:00
librelad
d604fd7b4d fix(task): make the regen-poll throttle stamp actually writable
maybeRegenPoll truncates $REGEN_POLL_STAMP (.regen_poll_at) to throttle the
self-heal 'regen webui' poll, but the stamp lives in the docker-install-owned
TASK_DIR — the manager-run processor can't write there, so the truncate
EACCES'd every poll (swallowed by || true). The stamp never updated, so the
throttle read last=0 forever and 'regen webui' ran on every idle tick (and
spammed the journal ~16x/min).

Fix: pre-create the stamp world-writable in setupTaskDir, exactly like the
lock file and FIFO already are (runFileOp install -m 666). Truncate then
lands, the mtime advances, and the poll throttles to REGEN_POLL_INTERVAL.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-31 02:04:24 +01:00
2 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,7 @@ source_scripts=(
"source/files/arrays/files_source.sh"
"source/files/arrays/files_ssh.sh"
"source/files/arrays/files_start.sh"
"source/files/arrays/files_task.sh"
"source/files/arrays/files_update.sh"
"source/files/arrays/files_webui.sh"
"source/files/arrays/function_manifest.sh"

View File

@ -157,6 +157,13 @@ setupTaskDir() {
# it. Create-if-absent to keep a stable inode for flock across restarts.
[[ -e "$LOCK_FILE" ]] || runFileOp install -m 666 /dev/null "$LOCK_FILE" 2>/dev/null
runFileOp chmod 666 "$LOCK_FILE" 2>/dev/null
# Same story for the regen-poll throttle stamp: pre-create it world-writable so
# maybeRegenPoll's `: > "$REGEN_POLL_STAMP"` truncate (run as the manager) lands
# instead of EACCES'ing in this docker-install-owned dir. Without it the stamp
# never updates, the throttle reads last=0 forever, and `regen webui` fires on
# every idle poll instead of once per REGEN_POLL_INTERVAL.
[[ -e "$REGEN_POLL_STAMP" ]] || runFileOp install -m 666 /dev/null "$REGEN_POLL_STAMP" 2>/dev/null
runFileOp chmod 666 "$REGEN_POLL_STAMP" 2>/dev/null
# Establish ownership via the root-owned helper: the unprivileged dir owner
# can't reclaim files an earlier run left root/manager-owned (e.g. a root-owned
# task_processor.log), which would then block the daemon's log appends.