From 2265dcd59c5ee3ed8bff40a4d1a033f1f3da0988 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Mon, 7 Sep 2026 12:52:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(schedule):=20=E6=A2=9D=E7=9B=AE=E9=95=B7?= =?UTF-8?q?=E5=BA=A6=E9=82=A3=E9=81=93=E8=AD=A6=E5=91=8A=E6=9C=AC=E4=BE=86?= =?UTF-8?q?=E8=AA=AA=E4=B8=8D=E5=87=BA=E8=A9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新加的長度閘門用了 warn 來報「距離上限不到 100」,而這一支只定義 note。 殼回一句「warn: not found」到 stderr,那句提醒一次都沒印出來。 一道說不出話的檢核,跟沒有那道檢核是同一件事——而且它連自己壞了都只在 stderr 留一行,正常輸出上看不出任何異常。 修掉之後它第一次開口就說出一件要處理的事:這台機器的條目有 973 個位元組, 距上限只剩 27。長度大半來自 wiki 存取庫那一系列變數的快照,一支約 40 個 位元組——再多一支頁型變數就裝不起來,而那一次只會回 command too long。 所以訊息裡把這個來源講出來,人才知道要縮哪裡。 這一支之前就踩過同一個坑(另一段檢核也寫了 warn),所以註解裡寫明它只有 note,沒有 warn。 Co-Authored-By: Claude Opus 5 --- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- plugin.json | 2 +- tools/schedule.sh | 5 ++++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 984baa8..1befd39 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-assist", - "version": "0.3.5", + "version": "0.3.6", "description": "助理:事件收攏、健康巡檢與待辦簿(MONITOR_{HASH} wiki 頁)", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index e92c089..13513dc 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-assist", - "version": "0.3.5", + "version": "0.3.6", "description": "助理:事件收攏、健康巡檢與待辦簿(MONITOR_{HASH} wiki 頁)", "skills": "./skills", "jsc": { diff --git a/plugin.json b/plugin.json index 65ce1c1..4a297de 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-assist", - "version": "0.3.5", + "version": "0.3.6", "description": "助理:事件收攏、健康巡檢與待辦簿(MONITOR_{HASH} wiki 頁)", "skills": "./skills/", "jsc": { diff --git a/tools/schedule.sh b/tools/schedule.sh index 7cc5d59..8a24aa7 100755 --- a/tools/schedule.sh +++ b/tools/schedule.sh @@ -731,8 +731,11 @@ crontab_install() { if [ "$_len" -ge "$CRON_LINE_MAX" ]; then die 4 "$_job 的條目有 $_len 個位元組,達到 cron 一行的上限 $CRON_LINE_MAX,這一批裝不進去。條目長度的來源是環境變數快照($SNAPSHOT_NAMES)與 PATH 快照——先看哪一個值特別長,多半是掃描起點或排除清單寫得太長。縮短那個值,或用 JSC_ASSIST_CRON_LINE_MAX 覆寫上限(覆寫之前先確認這台機器的 cron 真的收得下)。" fi + # 這一支只定義 note,沒有 warn。這裡本來寫 warn,於是殼回一句「warn: not found」而那句 + # 提醒一次都沒印出來——條目長到 973 個位元組、距上限只剩 27,而該說話的那道檢核是啞的。 + # 一道說不出話的檢核跟沒有那道檢核是同一件事,而且它連自己壞了都只在 stderr 留一行。 if [ "$_len" -ge $((CRON_LINE_MAX - 100)) ]; then - warn "$_job 的條目有 $_len 個位元組,距離 cron 一行的上限 $CRON_LINE_MAX 不到 100。再多加一個環境變數快照就會裝不進去,而那一次的錯誤訊息只會說 command too long。" + note "$_job 的條目有 $_len 個位元組,距離 cron 一行的上限 $CRON_LINE_MAX 不到 100。再多加一個環境變數快照就會裝不進去,而那一次的錯誤訊息只會說 command too long。條目長度大半來自 wiki 存取庫那一系列變數的快照,一支約 40 個位元組。" fi done