新 repo 的工人不再靠人記得:課程工人 course-hand+開場點名「有票卻沒工人」(inkstone/ISEP#118)

- agents/course-hand.md:管 inkstone/ax-courses、course_gen、llm-wiki-template(c7358 leo「你可以製作一個」)
  假設:llm-wiki-template 也歸課程工人(同為課程素材),總管不同意就把它拆出去
- hooks/lib/roster.py:`負責 repo` 可列多個(、或逗號),新增 which()/uncovered();find() 與閘本身未動
- scripts/roster which 改走 roster.which
- scripts/isep-nag 第④類:org 裡有開著的票、名單上卻沒人負責的 repo,只進開場長版、不進 Telegram
- 測試:roster-guard 25→31、overdue-nag 36→43;兩種突變(拿掉票數條件/只認第一個 repo)都會紅
- 文件:worker-roster.md 回答「新 repo 的工人誰在什麼時候加」;README/plugin.json 工人 8、scripts 65(樹上實數)

待總管定版(改了 agents/scripts,要升版才裝得上)。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-14 13:13:12 +08:00
parent 25da674615
commit d2f706a16c
11 changed files with 304 additions and 19 deletions
+49
View File
@@ -206,6 +206,55 @@ CH=$(printf '%s' "$IN" | CLAUDE_CODE_CHILD_SESSION=1 bash "$HOOK" 2>/dev/null)
[ -z "$CH" ] && ok "㉟ 子 session 不叫(subagent 開工不是 leo 開工)" \
|| no "㉟ 子 session 不叫" "實得:$CH"
echo "── G 群:有票卻沒有工人的 repoinkstone/ISEP#118)──────────────────"
# 假名單:只有一位管 acme/staffed 的工人,不碰真的 agents/
mkdir -p "$TMP/roster"
cat > "$TMP/roster/staffed.md" <<'MD'
---
name: staffed-hand
description: 測試用
---
**負責 repo**acme/staffed、acme/also-staffed
## 開工前先讀
## 紅線
MD
cat > "$TMP/gap.json" <<'JSON'
{"milestones": [], "issues": [],
"repos": [
{"full_name":"acme/staffed","open_issues_count":4},
{"full_name":"acme/also-staffed","open_issues_count":1},
{"full_name":"acme/new-course","open_issues_count":5},
{"full_name":"acme/quiet","open_issues_count":0},
{"full_name":"acme/frozen","open_issues_count":3,"archived":true}
]}
JSON
GR=$(ISEP_ROSTER_DIR="$TMP/roster" python3 "$NAG" --fixture "$TMP/gap.json" --now "$NOW" 2>&1)
GS=$(ISEP_ROSTER_DIR="$TMP/roster" python3 "$NAG" --fixture "$TMP/gap.json" --now "$NOW" --short 2>&1)
GJ=$(ISEP_ROSTER_DIR="$TMP/roster" python3 "$NAG" --fixture "$TMP/gap.json" --now "$NOW" --json 2>&1)
has "$GR" "有票卻沒有工人的 repo1 個)" && has "$GR" "acme/new-course5 張票開著)" \
&& ok "㊱ 新開、有票、名單上沒人的 repo 被點名(連同幾張票)" \
|| no "㊱ 點名缺工人的 repo" "實得:$(printf '%s' "$GR" | tr '\n' ' ' | head -c 300)"
has "$GR" "agents/" && ok "㊲ 講得出出路:去 agents/ 補工人(不是開例外閘)" || no "㊲ 出路" "沒講"
if has "$GR" "acme/staffed" || has "$GR" "acme/also-staffed" || has "$GR" "acme/quiet" || has "$GR" "acme/frozen"; then
no "㊳ 不該叫的不要叫" "有人的/沒票的/封存的被點名了"
else
ok "㊳ 有工人的(含多 repo 的第二個)、沒票的、封存的都不叫"
fi
has "$GS" "查過了,沒有" && ! has "$GS" "工人" \
&& ok "㊴ Telegram 短版不提工人(派工是總管的事,不吵 leo)" \
|| no "㊴ 短版不提工人" "實得:$GS"
printf '%s' "$GJ" | python3 -c '
import json,sys
assert json.load(sys.stdin)["findings"]["repos_without_worker"] == [{"repo":"acme/new-course","open":5}]
' 2>/dev/null && ok "㊵ --json 帶得出同一份清單" || no "㊵ --json" "$(printf '%s' "$GJ" | head -c 200)"
GN=$(ISEP_ROSTER_DIR="$TMP/沒有這個目錄" python3 "$NAG" --fixture "$TMP/gap.json" --now "$NOW" 2>&1)
has "$GN" "沒查到" && ! has "$GN" "acme/staffed" \
&& ok "㊶ 名單讀不到 ⇒ 講「沒查到」,不把每個 repo 都說成缺人" \
|| no "㊶ 名單讀不到" "實得:$(printf '%s' "$GN" | tr '\n' ' ' | head -c 300)"
GO=$(python3 "$NAG" --fixture "$TMP/full.json" --now "$NOW" 2>&1)
has "$GO" "沒查到" && ok "㊷ 舊格式 fixture(沒有 repos)⇒ 講「沒查到」,前三類照舊" \
|| no "㊷ 舊格式相容" "實得:$(printf '%s' "$GO" | tail -3 | tr '\n' ' ')"
echo
printf '通過 %d 條,失敗 %d 條\n' "$PASS" "$FAIL"
[ "$FAIL" = 0 ]