teamsmith 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/README.md +4 -4
  2. package/package.json +1 -1
  3. package/skills/teamsmith/CHANGELOG.md +69 -0
  4. package/skills/teamsmith/SKILL.md +20 -13
  5. package/skills/teamsmith/extension/team-inbox-watch.ts +5 -3
  6. package/skills/teamsmith/extension/team-notify.ts +37 -6
  7. package/skills/teamsmith/extension/team.ts +438 -0
  8. package/skills/teamsmith/references/config.md +39 -6
  9. package/skills/teamsmith/references/migration.md +197 -47
  10. package/skills/teamsmith/references/protocol.md +201 -30
  11. package/skills/teamsmith/references/troubleshooting.md +130 -10
  12. package/skills/teamsmith/references/workflows.md +36 -2
  13. package/skills/teamsmith/scripts/lib/cmd-agents.sh +318 -23
  14. package/skills/teamsmith/scripts/lib/cmd-bootstrap.sh +2 -2
  15. package/skills/teamsmith/scripts/lib/cmd-config.sh +349 -67
  16. package/skills/teamsmith/scripts/lib/cmd-draft.sh +4 -4
  17. package/skills/teamsmith/scripts/lib/cmd-help.sh +677 -0
  18. package/skills/teamsmith/scripts/lib/cmd-init.sh +157 -5
  19. package/skills/teamsmith/scripts/lib/cmd-interrupt.sh +461 -0
  20. package/skills/teamsmith/scripts/lib/cmd-meeting.sh +2 -25
  21. package/skills/teamsmith/scripts/lib/cmd-project.sh +30 -103
  22. package/skills/teamsmith/scripts/lib/cmd-reap.sh +277 -0
  23. package/skills/teamsmith/scripts/lib/cmd-reply.sh +3 -3
  24. package/skills/teamsmith/scripts/lib/cmd-review.sh +182 -32
  25. package/skills/teamsmith/scripts/lib/cmd-status.sh +234 -21
  26. package/skills/teamsmith/scripts/lib/cmd-update.sh +36 -7
  27. package/skills/teamsmith/scripts/lib/cmd-watch.sh +564 -46
  28. package/skills/teamsmith/scripts/lib/common.sh +1004 -245
  29. package/skills/teamsmith/scripts/lib/gate-lock.sh +582 -0
  30. package/skills/teamsmith/scripts/panel/draft-send.sh +11 -1
  31. package/skills/teamsmith/scripts/panel/panel.js +211 -211
  32. package/skills/teamsmith/scripts/panel/src/App.tsx +58 -21
  33. package/skills/teamsmith/scripts/panel/src/clipboard.ts +12 -5
  34. package/skills/teamsmith/scripts/panel/src/compose.ts +6 -3
  35. package/skills/teamsmith/scripts/panel/src/data.ts +51 -5
  36. package/skills/teamsmith/scripts/panel/src/layout.ts +209 -69
  37. package/skills/teamsmith/scripts/panel/src/main.tsx +37 -8
  38. package/skills/teamsmith/scripts/panel/src/strings/en.ts +39 -29
  39. package/skills/teamsmith/scripts/panel/src/strings/zh.ts +41 -31
  40. package/skills/teamsmith/scripts/panel/src/types.ts +28 -3
  41. package/skills/teamsmith/scripts/replies.mjs +4 -1
  42. package/skills/teamsmith/scripts/shim/killall +10 -0
  43. package/skills/teamsmith/scripts/shim/pgrep +10 -0
  44. package/skills/teamsmith/scripts/shim/pidof +10 -0
  45. package/skills/teamsmith/scripts/shim/pkill +10 -0
  46. package/skills/teamsmith/scripts/shim/signal-gate +108 -31
  47. package/skills/teamsmith/scripts/shim/tmux +18 -0
  48. package/skills/teamsmith/scripts/strings/commands.tsv +86 -0
  49. package/skills/teamsmith/scripts/strings/help.en.tsv +503 -0
  50. package/skills/teamsmith/scripts/strings/help.zh.tsv +489 -0
  51. package/skills/teamsmith/scripts/team +19 -6
  52. package/skills/teamsmith/templates/AGENTS.section.md.tmpl +8 -1
  53. package/skills/teamsmith/templates/config.sh.tmpl +20 -1
  54. package/skills/teamsmith/templates/pm-prompt.md.tmpl +21 -0
  55. package/skills/teamsmith/tests/README.md +31 -0
  56. package/skills/teamsmith/tests/bg-ledger-harness.mjs +464 -40
  57. package/skills/teamsmith/tests/bg-ledger.sh +168 -10
  58. package/skills/teamsmith/tests/checkout-shape-probe.sh +83 -54
  59. package/skills/teamsmith/tests/config-cli.sh +184 -32
  60. package/skills/teamsmith/tests/fixtures/delivery-truth-real/scenario.sh +7 -1
  61. package/skills/teamsmith/tests/fixtures/p287/lint-good.sh.in +3 -0
  62. package/skills/teamsmith/tests/fixtures/p287/lint-hardcoded.sh.in +3 -0
  63. package/skills/teamsmith/tests/fixtures/p287/lint-no-ns.sh.in +3 -0
  64. package/skills/teamsmith/tests/fixtures/p55/flip-p49.sh +18 -6
  65. package/skills/teamsmith/tests/flip-m33.sh +5 -3
  66. package/skills/teamsmith/tests/flip-p158.sh +2 -1
  67. package/skills/teamsmith/tests/flip-p308-skip-not-pass.sh +151 -0
  68. package/skills/teamsmith/tests/flip-p310-lock.sh +210 -0
  69. package/skills/teamsmith/tests/flip-p310-socket.sh +125 -0
  70. package/skills/teamsmith/tests/gate-guard.sh +52 -79
  71. package/skills/teamsmith/tests/help-surface.sh +1664 -0
  72. package/skills/teamsmith/tests/install-shape.sh +359 -22
  73. package/skills/teamsmith/tests/key-replies-pty.sh +9 -10
  74. package/skills/teamsmith/tests/key-replies-ui.sh +2 -8
  75. package/skills/teamsmith/tests/key-replies.sh +281 -28
  76. package/skills/teamsmith/tests/ledger-ban.sh +5 -4
  77. package/skills/teamsmith/tests/ledger-claim.sh +2 -1
  78. package/skills/teamsmith/tests/lib/bounded-spin.sh +90 -0
  79. package/skills/teamsmith/tests/lib/model-policy.sh +4 -0
  80. package/skills/teamsmith/tests/lib/model-routing-flips.py +51 -0
  81. package/skills/teamsmith/tests/lib/pty-wait.sh +21 -111
  82. package/skills/teamsmith/tests/lib/reply-fixture.sh +4 -9
  83. package/skills/teamsmith/tests/lib/section-guard.sh +316 -164
  84. package/skills/teamsmith/tests/lib/tmp-root.sh +139 -27
  85. package/skills/teamsmith/tests/lib/tmux-cap.sh +10 -1
  86. package/skills/teamsmith/tests/lib/tmux-iso.sh +31 -13
  87. package/skills/teamsmith/tests/loop-inventory.tsv +83 -77
  88. package/skills/teamsmith/tests/panel-b2.sh +430 -352
  89. package/skills/teamsmith/tests/panel-b3-stub.sh +112 -4
  90. package/skills/teamsmith/tests/panel-b3.sh +314 -62
  91. package/skills/teamsmith/tests/panel-choices.sh +11 -6
  92. package/skills/teamsmith/tests/panel-cpu.sh +43 -130
  93. package/skills/teamsmith/tests/panel-p21.sh +251 -265
  94. package/skills/teamsmith/tests/panel-snapshots.sh +41 -225
  95. package/skills/teamsmith/tests/panel-strings.mjs +33 -18
  96. package/skills/teamsmith/tests/perf.sh +187 -396
  97. package/skills/teamsmith/tests/routes.sh +440 -117
  98. package/skills/teamsmith/tests/seat-interrupt.sh +1012 -0
  99. package/skills/teamsmith/tests/seat-visibility.sh +675 -0
  100. package/skills/teamsmith/tests/section-guard.sh +13 -102
  101. package/skills/teamsmith/tests/section-needs-audit.sh +24 -7
  102. package/skills/teamsmith/tests/section-paths.tsv +32 -18
  103. package/skills/teamsmith/tests/section-select.sh +371 -19
  104. package/skills/teamsmith/tests/signal-gate.sh +249 -27
  105. package/skills/teamsmith/tests/signal-lint-legacy.txt +4 -1
  106. package/skills/teamsmith/tests/slash-team-e2e.sh +323 -0
  107. package/skills/teamsmith/tests/slash-team.sh +617 -0
  108. package/skills/teamsmith/tests/slice-coverage.sh +206 -0
  109. package/skills/teamsmith/tests/smoke.sh +3595 -788
  110. package/skills/teamsmith/tests/task-model-routing.sh +530 -15
  111. package/skills/teamsmith/tests/team-bg-stop.sh +18 -10
  112. package/skills/teamsmith/tests/tmp-hygiene.sh +782 -45
  113. package/skills/teamsmith/tests/tmux-identity-leak.sh +773 -0
  114. package/skills/teamsmith/tests/tmux-lint-legacy.txt +12 -18
  115. package/skills/teamsmith/tests/upgrade-recipe.sh +537 -0
  116. package/skills/teamsmith/tests/workflow-entry.sh +207 -0
  117. package/skills/teamsmith-init/SKILL.md +12 -12
  118. package/skills/teamsmith-init/references/bootstrap.md +3 -3
  119. package/skills/teamsmith/tests/flip-glue.sh +0 -162
  120. package/skills/teamsmith/tests/flip-m12-26c.sh +0 -129
  121. package/skills/teamsmith/tests/flip-m12.sh +0 -185
  122. package/skills/teamsmith/tests/flip-m16.sh +0 -166
  123. package/skills/teamsmith/tests/flip-m17.sh +0 -204
  124. package/skills/teamsmith/tests/flip-m34.sh +0 -96
  125. package/skills/teamsmith/tests/flip-m37.sh +0 -185
  126. package/skills/teamsmith/tests/flip-m4.3.sh +0 -375
  127. package/skills/teamsmith/tests/flip-m43.sh +0 -128
  128. package/skills/teamsmith/tests/flip-m45.sh +0 -244
  129. package/skills/teamsmith/tests/flip-m46.sh +0 -238
  130. package/skills/teamsmith/tests/flip-m48.sh +0 -304
  131. package/skills/teamsmith/tests/flip-m6.2.sh +0 -205
  132. package/skills/teamsmith/tests/flip-m6.3.sh +0 -283
  133. package/skills/teamsmith/tests/flip-m6.4.sh +0 -267
  134. package/skills/teamsmith/tests/flip-m6.5.sh +0 -113
  135. package/skills/teamsmith/tests/flip-m7.1.sh +0 -135
  136. package/skills/teamsmith/tests/flip-m7.2.sh +0 -321
  137. package/skills/teamsmith/tests/flip-p144.sh +0 -112
  138. package/skills/teamsmith/tests/flip-p156.sh +0 -133
  139. package/skills/teamsmith/tests/flip-p160.sh +0 -182
  140. package/skills/teamsmith/tests/flip-p171.sh +0 -249
  141. package/skills/teamsmith/tests/flip-p18.1.sh +0 -95
  142. package/skills/teamsmith/tests/flip-p20.sh +0 -286
  143. package/skills/teamsmith/tests/flip-p201.sh +0 -249
  144. package/skills/teamsmith/tests/flip-p210.sh +0 -239
  145. package/skills/teamsmith/tests/flip-p211.sh +0 -152
  146. package/skills/teamsmith/tests/flip-p217.sh +0 -288
  147. package/skills/teamsmith/tests/flip-p22.sh +0 -123
  148. package/skills/teamsmith/tests/flip-p23.sh +0 -239
  149. package/skills/teamsmith/tests/flip-p25.sh +0 -165
  150. package/skills/teamsmith/tests/flip-p71.sh +0 -184
  151. package/skills/teamsmith/tests/flip-p72.sh +0 -202
  152. package/skills/teamsmith/tests/load-experiment.sh +0 -290
  153. package/skills/teamsmith/tests/panel-cpu-premise.sh +0 -173
  154. package/skills/teamsmith/tests/panel-flip-m54.sh +0 -207
  155. package/skills/teamsmith/tests/panel-flip-p123.sh +0 -278
  156. package/skills/teamsmith/tests/panel-flip-p125.sh +0 -318
  157. package/skills/teamsmith/tests/panel-flip-p128.sh +0 -259
  158. package/skills/teamsmith/tests/panel-keyprobe-stub.sh +0 -41
  159. package/skills/teamsmith/tests/panel-keyprobe.sh +0 -82
  160. package/skills/teamsmith/tests/panel-knobs.sh +0 -83
  161. package/skills/teamsmith/tests/section-budgets.tsv +0 -154
  162. package/skills/teamsmith/tests/team-bg-flip.sh +0 -239
  163. package/skills/teamsmith/tests/team-inbox-watch-flip.sh +0 -191
@@ -1,82 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Keystroke flip fixture (pulse-console B1, tasks.md 1.4).
3
- #
4
- # bash skills/teamsmith/tests/panel-keyprobe.sh [tree]
5
- #
6
- # `tree` defaults to the repository this script lives in. The probe is built **from that tree**, so
7
- # running the same fixture against the pre-change revision and the branch is the flip: the stub
8
- # reader sleeps five seconds, the pty types `m`+`hello`+Enter during the refresh, and the fixture
9
- # passes only when the compose line opened and the draft is exactly `hello`.
10
- #
11
- # Exit: 0 green, 2 the draft never arrived / was distorted (the red case), 3 setup failure.
12
- set -uo pipefail
13
-
14
- here="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
15
- # P53:临时根的唯一创建者(${TMPDIR:-/tmp} + owned 家族 + 回收)
16
- . "$here/lib/tmp-root.sh"
17
- tree="${1:-$(cd -P "$here/../../.." && pwd)}"
18
- tmp="$(tmp_root_create panel-keyprobe)" || exit 3
19
- log="$tmp/keyprobe.log"
20
- out="$tmp/probe.out"
21
- rc=3
22
- cleanup() { tmp_root_reap_all; }
23
- trap cleanup EXIT
24
-
25
- bun_bin="${BUN:-}"
26
- if [ -z "$bun_bin" ] && command -v bun >/dev/null 2>&1; then bun_bin="$(command -v bun)"; fi
27
- [ -n "$bun_bin" ] || bun_bin="$HOME/.bun/bin/bun"
28
- js="${TEAM_JS_BIN:-}"
29
- if [ -z "$js" ] && command -v node >/dev/null 2>&1; then js="$(command -v node)"; fi
30
- [ -n "$js" ] || js="$(command -v bun || echo '')"
31
-
32
- if [ ! -x "$bun_bin" ]; then
33
- printf 'panel-keyprobe: bun is required to build the probe (looked at %s)\n' "$bun_bin" >&2
34
- exit 3
35
- fi
36
- if [ -z "$js" ]; then
37
- printf 'panel-keyprobe: no node/bun runtime to run the probe\n' >&2
38
- exit 3
39
- fi
40
- if [ ! -f "$tree/skills/teamsmith/tests/panel-keyprobe.tsx" ]; then
41
- printf 'panel-keyprobe: %s does not carry the fixture\n' "$tree" >&2
42
- exit 3
43
- fi
44
-
45
- stub="$tmp/keyprobe-stub.sh"
46
- cp "$tree/skills/teamsmith/tests/panel-keyprobe-stub.sh" "$stub"
47
- chmod +x "$stub"
48
-
49
- # The probe is built from the tree under test: its `src/data.ts` is what the fixture exercises.
50
- if ! "$bun_bin" build "$tree/skills/teamsmith/tests/panel-keyprobe.tsx" --target=node --format=esm \
51
- --outfile "$tmp/keyprobe.js" >"$tmp/build.log" 2>&1; then
52
- printf 'panel-keyprobe: cannot build the probe from %s\n' "$tree" >&2
53
- tail -5 "$tmp/build.log" >&2
54
- exit 3
55
- fi
56
-
57
- mkdir -p "$tmp/root"
58
- printf '%s\n' "tree: $tree" >"$out"
59
- set +e
60
- python3 "$tree/skills/teamsmith/tests/panel-keyprobe-pty.py" --log "$log" --timeout 20 -- \
61
- "$js" "$tmp/keyprobe.js" --root "$tmp/root" --team-cli "$stub" --log "$log" --timeout 15000 \
62
- >>"$out" 2>&1
63
- probe_rc=$?
64
- set -e
65
- printf 'probe rc: %s\n' "$probe_rc" >>"$out"
66
-
67
- printf '== keyprobe.out ==\n'
68
- cat "$out"
69
- printf '== keyprobe.log ==\n'
70
- cat "$log" 2>/dev/null || printf '(no log)\n'
71
-
72
- if grep -q '^SUBMITTED draft=hello$' "$log" 2>/dev/null; then
73
- printf 'panel-keyprobe: OK — compose opened and the draft is exactly hello\n'
74
- rc=0
75
- elif [ "$probe_rc" = "2" ]; then
76
- printf 'panel-keyprobe: RED — the keystrokes never opened compose / became the draft hello\n' >&2
77
- rc=2
78
- else
79
- printf 'panel-keyprobe: FAIL — probe rc=%s\n' "$probe_rc" >&2
80
- rc=2
81
- fi
82
- exit "$rc"
@@ -1,83 +0,0 @@
1
- #!/usr/bin/env bash
2
- # M58/B2 · 旋钮完整性(时间无关)—— 正确性门禁每轮跑的 d-realpath 承诺。
3
- #
4
- # bash skills/teamsmith/tests/panel-knobs.sh (FAST 安全:不起 tmux / node / 任何测量)
5
- #
6
- # 背景:`panel#Frame assembly is asynchronous…` 的「夹具旋钮不得漏进真路径」以前由面板测量夹具的
7
- # d-realpath 用例带着一次真测量来证;M58 把测量搬进性能套件后,正确性门禁
8
- # 只留**时间无关**的这一半:
9
- # ① 三个 TEAM_PANEL_CPU_* 旋钮在夹具开关关着时必须被忽略并打印;
10
- # ② premise 行只反映真读数(不许出现注入的 9999 / 1 核);
11
- # ③ 不判任何时长(输出里没有 median / budget / pane CPU 判定行)。
12
- # 实现走 panel-cpu.sh 的 premise-only 模式(TEAM_PANEL_CPU_PREMISE_ONLY=1):那条路径在起 tmux/node
13
- # 之前就退出,所以门禁不再点名任何测量夹具(守卫见 tests/gate-guard.sh)。
14
- #
15
- # 退出码:0 全绿;1 有失败项。输出:ok/bad + `== 结果 ==` 一行。
16
- set -uo pipefail
17
-
18
- here="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
19
- tree="${TEAM_PANEL_CPU_TREE:-$(cd -P "$here/../../.." && pwd)}"
20
- cpu="$here/panel-cpu.sh"
21
- PASS=0; FAIL=0
22
- ok() { printf ' \033[32m✓\033[0m %s\n' "$1"; PASS=$((PASS + 1)); }
23
- bad() { printf ' \033[31m✗\033[0m %s\n' "$1"; FAIL=$((FAIL + 1)); }
24
- result_line() { printf '\n== 结果 == ✓ %d ✗ %d\n' "$PASS" "$FAIL"; }
25
-
26
- if [ ! -f "$cpu" ]; then
27
- bad "缺 $cpu(premise-only 模式的宿主)"
28
- result_line; exit 1
29
- fi
30
- real_load="$(cut -d' ' -f1 /proc/loadavg 2>/dev/null || printf '?')"
31
- real_cores="$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || printf 0)"
32
- case "$real_cores" in ''|*[!0-9]*) real_cores=0 ;; esac
33
-
34
- out="$(mktemp "${TMPDIR:-/tmp}/panel-knobs.XXXXXX")"
35
- trap 'rm -f "$out"' EXIT
36
- # 夹具开关**显式清掉**(继承来的 TEAM_SMOKE_FIXTURE=1 会让注入被采信,那样这条检查就假绿);
37
- # 三个旋钮全部注入,正是 d-realpath 的形状。
38
- (
39
- cd "$tree" && env -u TEAM_SMOKE_FIXTURE -u TEAM_SMOKE_LOADAVG -u TEAM_SMOKE_CORES \
40
- -u TEAM_SMOKE_FRAME_DELAY_MS -u TMUX -u TMUX_PANE -u TMUX_TMPDIR \
41
- TEAM_PANEL_CPU_LOADAVG=9999 TEAM_PANEL_CPU_CORES=1 TEAM_PANEL_CPU_FRAME_DELAY_MS=99999 \
42
- TEAM_PANEL_CPU_PREMISE_ONLY=1 \
43
- timeout 30 bash "$cpu"
44
- ) >"$out" 2>&1
45
- rc=$?
46
- if [ "$rc" = 0 ]; then
47
- ok "premise-only 模式退出 0(它不判时长)"
48
- else
49
- bad "premise-only 模式退出 $rc(期望 0)"; sed -n '1,6p' "$out" | sed 's/^/ /'
50
- fi
51
- for kv in 'TEAM_PANEL_CPU_LOADAVG=9999' 'TEAM_PANEL_CPU_CORES=1' 'TEAM_PANEL_CPU_FRAME_DELAY_MS=99999'; do
52
- if grep -qF "忽略 $kv" "$out"; then ok "注入的旋钮被忽略并打印:$kv"
53
- else bad "没有看到「忽略 $kv」行"; fi
54
- done
55
- if grep -qE 'load premise: loadavg [0-9.]+ (<=|>) [0-9.]+ \(0\.25 x [0-9]+ cores\)' "$out"; then
56
- ok "premise 行在,且是 0.25 × 核格式"
57
- else
58
- bad "缺 premise 行(或格式不是 0.25 × 核)"; sed -n '/load premise/p' "$out" | sed 's/^/ /'
59
- fi
60
- if [ "$real_cores" -gt 0 ] && grep -qF "(0.25 x ${real_cores} cores)" "$out"; then
61
- ok "premise 行用的是真核数(${real_cores})"
62
- else
63
- bad "premise 行没有用真核数(期望 0.25 x ${real_cores} cores)"
64
- fi
65
- if grep -qF "loadavg ${real_load}" "$out"; then
66
- ok "premise 行用的是真 loadavg(${real_load})"
67
- else
68
- bad "premise 行的 loadavg 不是真读数(期望 ${real_load})"; sed -n '/load premise/p' "$out" | sed 's/^/ /'
69
- fi
70
- if [ "$real_cores" != "1" ] && grep -qE 'loadavg 9999|\(0\.25 x 1 cores\)' "$out"; then
71
- bad "premise 行里出现了注入值(旋钮漏进了真路径!)"
72
- else
73
- ok "premise 行里没有注入值(没有 9999 / 1 核)"
74
- fi
75
- if grep -qE 'median [0-9]|budget 2000ms|pane CPU' "$out"; then
76
- bad "premise-only 模式判了时长(输出里出现 median/budget/pane CPU)"
77
- else
78
- ok "没有判任何时长(输出里没有 median/budget 判定行)"
79
- fi
80
-
81
- result_line
82
- [ "$FAIL" -eq 0 ] && { printf '\033[32mpanel-knobs 全绿\033[0m\n'; exit 0; }
83
- printf '\033[31mpanel-knobs 有失败项\033[0m\n'; exit 1
@@ -1,154 +0,0 @@
1
- # gate section budgets — change: gate-section-accounting(P70 apply 交付物)
2
- # 推导:budget_s = max(ceil(band_s × factor), floor),factor=4,floor=60
3
- # band_s = max(host_s, container_s, ci_s):``最差观测值``,不是空闲值 —— 负载放大见 P56 §1.1
4
- # host_s / container_s:本 apply 在参考机与固定镜像里的实测(每段一个坏值就取它);历史值保留在 max 里。
5
- # 列:id<TAB>band_s<TAB>budget_s<TAB>host_s<TAB>host_load<TAB>container_s<TAB>container_load<TAB>ci_s<TAB>provenance
6
- # 纪律:预算只判「这段没有终止」(liveness detector),不判性能;不许收到实测带以下;
7
- # 段内在预算内跑完,机器再慢也必须绿(见 verification#The correctness gate judges correctness only)。
8
- # 未列出的新段落运行时用有界默认(tests/lib/section-guard.sh 的 SG_DEFAULT_BUDGET),开跑行会注明。
9
- # 实测来源(P70 apply · 2026-09-28):
10
- # full1(host 全量)= `bash skills/teamsmith/tests/smoke.sh </dev/null`,tip 69d6041a,08:30:12–08:52:48Z,loadavg1 10.5/32 核,✓3531 ✗0
11
- # ctr1(固定镜像)= localhost/teamsmith-gate:local a55ccdacb577(tmux 3.7b / node 24.19.0 / bun 1.3.14 / openspec 1.8.0),
12
- # `podman run --pid=host --cgroups=enabled --user 1000:1000 -e HOME=/tmp -v <tree>:/work:ro -w /work <img>
13
- # bash -c 'bash skills/teamsmith/tests/smoke.sh --keep </dev/null'`,08:46:47–09:09:33Z,loadavg1 12.9/32 核,✓3514 ✗2;
14
- # 两条红都不是预算/section 问题:0d 是「worktree 挂载(.git 是文件、gitdir 在挂载外)」形状,0f 是现场尾巴收集顺序(1261d377 已修,容器翻转见报告)。
15
- # 历史带保留:P56fast(loadavg1 10.6)/ P56full(负载未记录)/ FAST2(2026-09-23,loadavg1 14.0)。逐段原始值见 measure/*-section-times.tsv。
16
- # ci_s 列留空(-):本轮 local 模式不 push,首次 CI 运行后回填。
17
- # F1 追测(merge main 后 · 2026-09-28;§50/§51 的实测基,tip a021b339 / 3f424e18):
18
- # full1m(host 全量 #1,补行前)= `bash skills/teamsmith/tests/smoke.sh </dev/null`,10:43:48–11:05:41Z,loadavg1 5.9→9.8/32 核;
19
- # §50=2s / §51=118s;✓3594 ✗2 —— 两条都是 §0e 如实报「预算表缺 §50/§51 的行」(机制在工作,见报告 F1)。
20
- # ctr1m(固定镜像 a55ccdacb577,--keep 形态)= 11:06:00–11:29:05Z,loadavg1 9.4→8.1/32 核;§50=2s / §51=123s;
21
- # ✓3577 ✗4(0d 挂载形状;两条 §0e 缺行;§51 的 --keep 收尾产物:routes.sh 的嵌套根检查在 TEAM_TMP_KEEP=1 下必留根)。
22
- # ctr2m(同一镜像,无 --keep 干净形态)= 11:31:41–11:54:58Z,loadavg1 7.1→6.5/32 核;§50=2s / §51=127s;
23
- # ✓3580 ✗1(只剩 0d 挂载形状)→ §51 的 container 列取这一轮。
24
- # 最终验收(补行后):FAST ✓2931 ✗0(11:55:31–12:07:37Z,load 7.3→4.9);全量 ✓3596 ✗0(12:07:37–12:32:17Z,load 4.9→4.8;
25
- # §51 用时 121s → host 列取 121s;band 仍由 container 的 127s 决定)。
26
- 0 · 临时仓库 0.02 60 0.02 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
27
- 0b · skill 可被 pi 解析器加载 0.19 60 0.19 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
28
- 0c · 静态检查(函数结尾的 set -e 陷阱) 0.04 60 0.04 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
29
- 0d · 冲突标记守卫(受版本控制的文件里不许有冲突标记) 0.21 60 0.21 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
30
- 0e · 段落自述:看门狗 / 预算表 / 循环清单(P70) 44.00 176 43.00 10.6/?/14.0/10.5 44.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
31
- 0f · 超时段落:点名 + 停跑 + 现场(P70) 5.00 60 5.00 10.6/?/14.0/10.5 5.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
32
- 0g · 等待有界:到顶归因 + ticks(P70) 1.00 60 0.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
33
- 0h · tmux 隔离前置:三条件 + 硬停 + 影子(P162) 1.00 60 - - 1.00 - - P162 实测:容器 gate 镜像 FAST 全量 run 两轮 0h=1s(2026-10-02);host 列留空(P162 期间门禁进容器,host 未测)· ×4 · floor 60
34
- 0i · 运行指纹:树在跑动中被改 → 本次运行无效(P158) 15.00 60 - - 15.00 - - P158 实测:容器 gate 镜像 FAST 单段 `--select 0i` = 15s(2026-10-03,loadavg1 1.4/32 核;段内跑夹具两次:四条用例 + 牙齿)· ×4 · floor 60
35
- 1 · doctor(未初始化应失败) 4.00 60 4.00 10.6/?/14.0/10.5 4.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
36
- 1b · bootstrap(一条命令初始化) 1.00 60 1.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
37
- 1c · bootstrap 的 PM 窗口名:约定不是现场(M11) 16.00 64 9.00 10.6/?/14.0/10.5 16.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
38
- 2 · init 1.00 60 1.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
39
- 3 · doctor(初始化后) 10.00 60 8.00 10.6/?/14.0/10.5 10.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
40
- 4 · task + board 0.17 60 0.17 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
41
- 4b · 状态诚实:未知 id 不假装写入 + done 要证据(M6.1 F29/F1) 1.00 60 1.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
42
- 4c · 看板重复 ID(M48):add 拒绝 / --allow-dup / 三处可见 10.00 60 9.00 10.6/?/14.0/10.5 10.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
43
- 5 · add-agent 0.11 60 0.11 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
44
- 3b · git 归 PM(skill 不执行、也不过度包装 git) 3.00 60 3.00 10.6/?/14.0/10.5 2.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
45
- 6 · dispatch 3.00 60 2.05 10.6/?/14.0/10.5 3.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
46
- 6b · 容量守卫矩阵(zram / 磁盘 swap 分账) 1.00 60 1.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
47
- 6c · 模型并发限额(含通配) 0.07 60 0.07 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
48
- 6d · CEP 实测反馈(board 额外列 / merge 冲突列表 / 待复验启发式 / 翻转证据) 3.00 60 1.08 10.6/?/14.0/10.5 3.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
49
- 6e · 外部项目实测反馈(render & / GitLab 头 / pi PATH / 非任务报告) 2.00 60 2.00 10.6/?/14.0/10.5 2.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
50
- 6f · agent adapter(任意 TUI agent):渲染 / 占位符 / 文档契约 / 降级 19.00 76 19.00 10.6/?/14.0/10.5 18.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
51
- 6g · 非 Pi agent 端到端(假 agent,完全没有 Pi) 3.00 60 2.13 10.6/?/14.0/10.5 3.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
52
- 6h · 派单:会话规模 vs 模型窗口(M4.3 A)+ 启动证据(M4.3 B) 18.00 72 18.00 10.6/?/14.0/10.5 17.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
53
- 6i · PM adapter(任意 TUI agent 当 PM):默认不变 / 模板 / 存活 / 真窗口 19.45 78 19.45 10.6/?/14.0/10.5 17.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
54
- 6j · worker adapter:裸名字解析 + agent 没跑起来必须响亮失败(M8.2) 5.00 60 5.00 10.6/?/14.0/10.5 5.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
55
- 6k · worker 存活:看 pane 进程树,不看 pane_current_command(M37) 2.00 60 1.27 10.6/?/14.0/10.5 2.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
56
- 7 · notify / inbox / digest 8.00 60 4.00 10.6/?/14.0/10.5 8.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
57
- 7b · digest 警告未入账的复验/报告记录(M31) 5.00 60 5.00 10.6/?/14.0/10.5 5.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
58
- 8 · 从 agent worktree 调用 CLI 1.00 60 0.23 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
59
- 9 · agent 提交 + 报告 0.02 60 0.02 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
60
- 10 · review(独立 worktree + 门禁) 1.00 60 1.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
61
- 10b · 复验证据完整性(记录必须描述真的验过什么) 12.00 60 10.00 10.6/?/14.0/10.5 12.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
62
- 10c · M25 复验基建:门禁不继承 TEAM_REVIEW_* + 后台进程组里读 tty 的病 2.00 60 2.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
63
- 11 · 收尾(merge 已移除,close 保留) 3.00 60 3.00 10.6/?/14.0/10.5 3.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
64
- 11b · 定时巡检:有待办才叫醒 PM(默认 15 分钟) 32.00 128 29.11 10.6/?/14.0/10.5 32.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
65
- 11b2 · PM 存活必须被证明(M6.5:空窗 ≠ PM 在运行) 8.92 60 8.92 10.6/?/14.0/10.5 7.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
66
- 11b3 · 启动中的 PM:一拍只拉起一次(M7.2) 18.00 72 18.00 10.6/?/14.0/10.5 18.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
67
- 11b4 · PM 交接:--fresh-pm 与同 cwd 活会话提示(P36) 16.00 64 14.63 10.6/?/14.0/10.5 16.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
68
- 11c · agent 续跑是 PM 的事(pulse 不碰) 29.00 116 29.00 10.6/?/14.0/10.5 27.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
69
- 11d · 边界守卫(跨项目/跨 session 通信必须经用户) 0.09 60 0.09 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
70
- 11e · 跨项目会议(meeting mode) 1.00 60 1.00 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
71
- 11e2 · M32:--as-user 探针自 detach stdin(外部 stdin=pty 也必须绿) 2.00 60 1.00 10.6/?/14.0/10.5 2.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
72
- 11f · 更新与版本自检(mark-loaded / version --check / changelog) 6.00 60 6.00 10.6/?/14.0/10.5 6.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
73
- 11g · CEP 反馈(forge-first / say 投递校验 / knock 诊断) 2.00 60 2.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
74
- 11h · 信号与承诺的诚实(V4.0 F4/F6/F19/F21/F23) 5.00 60 5.00 10.6/?/14.0/10.5 4.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
75
- 11i · 信号诚实:报告草稿不指 review、squash 合并不喊 push(M4.3 C/D) 4.00 60 4.00 10.6/?/14.0/10.5 3.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
76
- 11j · pulse 改名与别名期兼容(D22) 14.00 60 13.00 10.6/?/14.0/10.5 14.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
77
- 14b · 文档一致性:已删命令不得回潮(词边界 + 扫描范围 + 翻转自测) 8.00 60 3.00 10.6/?/14.0/10.5 8.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
78
- 15b · 必需依赖:doctor 三态 + paths + dispatch 预检 26.00 104 26.00 10.6/?/14.0/10.5 22.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
79
- 15c · harness 与插件清单:只告知、不推荐(M29) 30.00 120 30.00 10.6/?/14.0/10.5 27.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
80
- 12 · roster / status / ps 5.00 60 4.00 10.6/?/14.0/10.5 5.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
81
- 13 · notify 扩展(去重 + 只在 worktree 触发) 1.00 60 1.00 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
82
- 13b · 通知只代表「回合结束」(M4.3 E:内部生命周期不得被广播成交付) 1.00 60 1.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
83
- 13c · 团队后台车道(M27/M30):拉起链注入 / 收割契约 / 账本 / worktree 侧 8.08 60 8.08 10.6/?/14.0/10.5 8.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
84
- 12b · 延后投递与草稿入口(delivery-guard:守卫 / 队列 / 排水 / 草稿) 25.00 100 24.00 10.6/?/14.0/10.5 25.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
85
- 12b-h0 · M24 输入框判据:真实 pi 的两条折叠路径 0.21 60 0.21 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
86
- 12b-h0b · M45 输入框判据:pi 的更新横幅(整行 ─ 与框边框同形等宽) 62.36 250 62.36 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
87
- 12b-h0d · P80 下边框判据:最低的合格规则行(草稿自己的框线留在框内) 6.00 60 6.00 10.6/?/14.0/10.5 6.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
88
- 12b-h0c · P59 输入框判据:覆盖层(Pi 的项目信任弹窗)≠ 非空输入框 70.00 280 70.00 10.6/?/14.0/10.5 64.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
89
- 12b-pi · M30 投递换道:pi 通道零 tmux 粘贴(收件箱监视唤醒) 77.00 308 77.00 10.6/?/14.0/10.5 77.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
90
- 12b-pi2 · M46 投递降级可见(skip 留痕)与慢路径自愈(残留/目标消失) 11.00 60 11.00 10.6/?/14.0/10.5 10.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
91
- 12b-pi3 · M53 降级通道可见(watch-degraded:doctor/status/面板 + inotify 余量) 28.00 112 28.00 10.6/?/14.0/10.5 24.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
92
- 14 · teardown 0.06 60 0.06 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
93
- 14c · 快模式自检(跳过必须是显式的、且没有偷偷跑真进程) 0.02 60 0.02 10.6/?/14.0/10.5 - 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
94
- 17 · 迁移指南与 doctor 指引(M7.1) 29.00 116 29.00 10.6/?/14.0/10.5 24.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
95
- 18 · 英文正文不变量与安装器唯一入口(M7.3) 2.00 60 1.00 10.6/?/14.0/10.5 2.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
96
- 18b · 拆分不变量(P16):description 路由 / init 无代码 / 指纹范围 / 零改动 1.00 60 1.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
97
- 18c · 公开契约的自洽:账本引用须声明 + 记录 id 须带键(P150) 8.00 60 5.00 6.11/5.62/32核 8.00 - - P185 实测(返工新增声明表加载用例 7 形状 + toleranttable 敏感性):host=[P185-18c-host](TEAM_SMOKE_FAST=1 smoke.sh --select 18c,用时 5s,loadavg1 6.11/32 核)container=[P185-18c-ctr](localhost/teamsmith-gate:local 同命令,用时 6s)取最差 6 · ×4 · floor 60;历史 P150:host 2s / container 3s(实测带里保留最差);P200 实测(同一段新增:退场点名用例 + noretired 影子 + 真树副本里的退场引用):container=[P200-18c-ctr](同命令 + 主仓库只读挂载让 0d 的 git 面可判,TEAM_SMOKE_FAST=1 smoke.sh --select 18c,✓25 ✗0,用时 8s)→ band 取 8(×4=32 < floor 60,预算不变);host 未重测(P162 纪律:门禁一律进容器;host_s 仍是 P185 的 5s)
98
- 19 · OpenSpec 五阶段流水线:每阶段有所有者与门禁(M9.1) 1.00 60 1.00 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
99
- 20 · done 证据的阶段感知(M9.2) 5.00 60 4.00 10.6/?/14.0/10.5 5.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
100
- 21 · 待复验清单不得越过看板决定(M9.4) 10.00 60 8.00 10.6/?/14.0/10.5 10.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
101
- 22 · 派单不许叠任务(M9.3 / D16) 4.00 60 4.00 10.6/?/14.0/10.5 4.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
102
- 23 · verify 任务的待复验判据 = 记录绑定的 revision(M9.5) 5.00 60 4.00 10.6/?/14.0/10.5 5.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
103
- 24 · done 证据:② 要求分支里已提交的报告(M9.6) 2.00 60 2.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
104
- 25 · 唤醒计数 = digest 的可行动列表(M9.8) 12.00 60 11.00 10.6/?/14.0/10.5 12.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
105
- 26 · 面板(pulse-tui-panel:模式 / 布局降级 / 净化 / 队列 / 运行时 / 隔离) 82.00 328 82.00 10.6/?/14.0/10.5 82.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
106
- 27 · 面板异步数据层(pulse-console B1:块协议 / 块隔离 / 快速读者等价 / 装配时间) 11.00 60 10.00 10.6/?/14.0/10.5 11.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
107
- 28 · 控制台表面(pulse-console B3:i18n 键集合 / 调色板对比度 / 四档快照 / refresh_s / panel.conf 边界) 20.00 80 20.00 10.6/?/14.0/10.5 17.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
108
- 29 · 派单模型解析:映射管新选择,已提交的记录管续跑(M14) 2.26 60 2.26 10.6/?/14.0/10.5 2.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
109
- 30 · 代号必须带名字(M16) 2.00 60 2.00 10.6/?/14.0/10.5 2.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
110
- 31 · tmux 接触面:隔离 lint + 容器跑法(M28) 15.00 60 15.00 10.6/?/14.0/10.5 5.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
111
- 31c · tmux 运行时闸门:按目标判定 + argv token + 注入(M36/M67) 5.00 60 5.00 10.6/?/14.0/10.5 4.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
112
- 32 · 身份 = 运行时目录(M40:继承的 TEAM_* 不许静默赢过 cwd) 9.00 60 9.00 10.6/?/14.0/10.5 8.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
113
- 33 · 项目契约的读写面(P22/B1:team config 单一写入口 + schema) 41.00 164 38.00 10.6/?/14.0/10.5 41.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
114
- 12e · change 视图(P24/B1:严格头部读取 + 就绪判据) 9.00 60 9.00 10.6/?/14.0/10.5/3.6/2.4 4.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60;P244(2026-10-13):§12e 追加 squash 合并夹具(真 git 造四条形状)后 host FAST=7s(loadavg1 3.6/32 核;容器列保留历史值、未重测)→ host 3.00→7.00、band 4.00→7.00、budget 60 不变;返修轮次 1 再加奇特路径夹具(4 类名字 + 换行、真 git 分支)后 host FAST=9s(loadavg1 2.4/32 核)→ host 7.00→9.00、band 7.00→9.00、budget 60 不变
115
- 12f · change 归组(P45/B2:digest 的 [6] 段 + 面板 token) 10.00 60 9.00 10.6/?/14.0/10.5 10.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
116
- 12g · 派单锚点(P24/B3:一个 change id + change-less 的锚) 6.00 60 6.00 10.6/?/14.0/10.5 6.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
117
- 12h · delta 单写者(P24/B4) 11.00 60 11.00 10.6/?/14.0/10.5 11.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
118
- 12i · 按 change 判独立性(P24/B5) 8.00 60 7.00 10.6/?/14.0/10.5 8.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
119
- 12j · 归档前提(P24/B6) 8.00 60 7.00 10.6/?/14.0/10.5/5.9/4.0 8.00 12.9/3.4 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · P209 追加清单夹具后重测(band 3.00→8.00,budget 60 不变):host FAST=7s×2(12:09/12:10Z · loadavg1≈5.9/4.0)、容器 FAST=8s(12:13Z · loadavg1≈3.4)· ×4 · floor 60
120
- 12k · 模板与文档(P24/B7) 1.00 60 1.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
121
- 34 · 门禁锁:排队/运行分开记账(P26/G1:verification#The hard timeout covers the gate run, not the queue) 48.00 192 48.00 10.6/?/14.0/10.5 47.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
122
- 34b · 门禁锁排队守卫:超上限要大声失败并点名持有者(P66) 5.00 60 5.00 10.6/?/14.0/10.5 5.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
123
- 35 · 门禁只判正确性:性能判定守卫 + 旋钮完整性(M58 · perf-suite-split) 1.00 60 1.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
124
- 37 · 读路径性能:根一次解析 + 单进程扫描(M50) 17.00 68 17.00 10.6/?/14.0/10.5 17.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
125
- 38 · 设置选项(M55:choices 读 / 一致性走查 / 选择器夹具) 312.00 1248 312.00 10.6/?/14.0/10.5 309.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
126
- 39 · npm CLI 与项目 skill 安装(P40:包装器 / 冲突表 / doctor 行) 39.00 156 39.00 10.6/?/14.0/10.5 35.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
127
- 40 · 临时根纪律(P53:TMPDIR / owned 家族 / 泄漏断言 / lint) 20.00 80 13.00 3.3 20.00 3.6 - P223 追测:§40 加两个嵌套探针(真机器锁 re-exec 的 --keep 守卫)→ host 选段(FAST)=13s(loadavg1 3.3) / 容器全量=20s(loadavg1 3.6),band 取最差;旧的 2.00 来自 P70 实测(host=[P56fast,P56full,FAST2,full1] container=[ctr1])· ×4 · floor 60
128
- 41 · pane 留存:死 pane 是座位状况,不是活座位(P55 / agent-pane-survivability) 47.00 188 46.00 10.6/?/14.0/10.5 47.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
129
- 42 · P67 输入框判据:0.87.0 的边框邻行按内容读(光标锚定 + 状态行形状才排除) 6.00 60 6.00 10.6/?/14.0/10.5 5.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
130
- 43 · P75 status 尾部现场:尾空行裁剪(P65 的 F1) 2.00 60 2.00 10.6/?/14.0/10.5 2.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
131
- 44 · P80 输入框判据:草稿自己的下边框框线(真 pane 就绪门 + 生产路径只排队) 4.00 60 4.00 10.6/?/14.0/10.5 4.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
132
- 45 · P76 合并前的未入账记录检查(D45) 1.00 60 1.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
133
- 46 · P86 下边框判据:定位出的框必须包含光标行(P84 的 F1 安全回归) 4.00 60 4.00 10.6/?/14.0/10.5 3.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
134
- 47 · P82 notify 发送者 = 运行时目录(notify-sender-identity) 3.00 60 3.00 10.6/?/14.0/10.5/3.1 3.00 12.9/5.6 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · P205 追加 ③d–③g 后重测(band 2.00→3.00,budget 60 不变):host FAST=3s(07:49Z · 与容器全量并发 · loadavg1≈3.1)、容器 FAST=3s(08:16Z · loadavg1≈5.6)、容器全量=3s(08:50Z · 干净 clone · loadavg1≈5)· ×4 · floor 60
135
- 48 · P91 合并后的「分支又动了」核对(D49 的另一半) 2.00 60 2.00 10.6/?/14.0/10.5 2.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
136
- 49 · P94 现场行数为 0:按配置不打印画面(P88 的 F1) 2.00 60 2.00 10.6/?/14.0/10.5 1.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
137
- 50 · P95 合并基准 = 该任务的 squash 提交(解冲突不再假红) 2 60 2 5.9/9.8 2 9.4/8.1 - P70 F1 实测(merge main 后):host=[full1m] container=[ctr1m] 取最差 · ×4 · floor 60
138
- 51 · 用法诚实性:help 的每条承诺与名册的每条路线都有夹具兑现(P99) 231 924 231 6.7/32 127 9.4/8.1 - P150 合并 main 后去重(两条并存 → band==max 一条):host=[P140 select 51:routes.sh 全量 224.5s + config-cli.sh = 231s;P70 F1:full1m 118→最终 121] 取最差 231;container=[ctr1m 123, ctr2m 127] 取 127 · ×4 · floor 60
139
- 54 · 派单摩擦:一次拒绝列全 + 覆盖审计 + 席位预提示(P140) 12 60 12 8.1/32 - - - P140 实测(select 54 两次,loadavg1 6.7/32):host=5s;P151 追加 F1–F5/W3 腿后重测(select 54 两次,loadavg1 8.1/32):host=[12s, 12s](带内 ✓91 ✗0);容器/CI 未测 · ×4 · floor 60
140
- 57 · delivery-truth:真帧几何 / 队列阻碍 / notify 三处同名(P147) 26 110 26 - - - - P147 实测(FAST §57 = 26s 上取整 26,host loadavg1 1-2;×4 取 104 → floor… 见预算公式取 110);P163 追加 foreign 段(一两秒级)后仍远低于 110
141
- 58 · 信号纪律:闸门 / 作业 pid / lint(P159) 7 60 - - 7 -/-/-/- - P159 实测(container=teamsmith-gate:local 跑 smoke --select 58,段用时 7s;纯逻辑段:perl lint + 两只夹具 + harness S13)· ×4 · floor 60
142
- 14d · P70 本套自述对账(段落账目 + 无误判) 0.00 60 0.00 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
143
- 52 · 席位死因:闭集分类 + 当前一次死亡 + 恰好一次通报(P113) 1 60 1 - 1 - - P113 实测(占位,测量后填):host=[FAST §52] container=[未测] ci=[未测] · ×4 · floor 60
144
- 53 · 等待引擎长帧:命中/缺失不被管道缓冲吃掉(P127) 9 60 9 5.3/32 - - - P127 实测(FAST §113 = 9s;loadavg1 5.3/32 核,2026-09-29);×4 · floor 60
145
- 15 · 完成 0.00 60 0.00 10.6/?/14.0/10.5 0.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 60
146
- 36 · 选段与分段账本自检(P98 · gate-runtime-budget) 338 1400 50 10.6/?/14.0/10.5 338 8.2/32 核 - P98 F2 host=50(FAST2 §36 49s 上取整)+ P148 apply 容器实测 =338s(2026-10-01,rev ac8bfdff,localhost/teamsmith-gate:p135,`TEAM_SMOKE_FAST=1 … --select 36`,新增的检出形状探针约 226s)· ×4 · floor 60
147
- 55 · meeting-liveness:未读 / 过期 / 队列 / 标识(P139,纯逻辑) 30 120 30 -/-/-/- - - - P139 实测(占位,出数后改):host=[P139 FAST §54] container=[未测] ci=[未测] · ×4 · floor 60
148
- 56 · meeting-liveness 真 tmux:敲门 / 排水 / 每方窗口(P139) 60 240 60 -/-/-/- - - - P139 实测(占位,出数后改):host=[P139 full §55] container=[未测] ci=[未测] · ×4 · floor 60
149
- 59 · pulse-nudge-key:叫醒键按类别集合(P174) 8 60 - - 8 -/-/-/- - P174 实测(container=teamsmith-gate:local 跑 smoke --select 59,段用时 7–8s;纯逻辑四档 + observers 私有仓库真 CLI)· ×4 · floor 60
150
- 60 · 账本禁令:家目录 / 私有网段 / 用户名 / 他项目名(P212 · D94) 10 60 10 13.6/12.7/13.2 1 - - P212 实测(2026-10-04,teamsmith-gate:local):host=[全量 FAST §60 = 1s(17:02,tip 98eb798b)+ --select 60 = 1s(16:16)] container=[全量 FAST §60 = 0s(16:40,6165708c)与 1s(17:1x,98eb798b)取最差] ci=[未测] · P239 实测(2026-10-13,host,loadavg1 13.6/32 核):host=[--select 60 = 10s = 新增 P239 归属与红侧夹具 8s(两次 --check + 三次 --paths)+ P212 自检/影子/真实扫描 2s] · ×4 · floor 60
151
- 61 · 任务类别模型路由:分组前门(P228 · task-model-routing) 513 2052 513 13.2/13.4/15.6 - - - P238 实测(2026-10-13,tip a3b3f71 之前一笔,选段 61,61b):全量档 13 组,段内 ✓ 用时 513s(FAST 档 12 组 164s,只作参考);取全量档 · ×4 · floor 60
152
- 61b · 任务类别模型路由:翻转变异自检(P228 · task-model-routing) 5000 20000 4900 16.3/?/? 5000 3.4/4.9/6.2 - P238 实测(2026-10-13):`task-model-routing.sh --flip` 独立跑 4883s(loadavg1 16.3,同机另有别的席位在跑)+ 段内包装 ≈ 4900s;V28 独立复验(2026-10-13,容器 localhost/teamsmith-gate:local,`--select 61b --keep`,同机 loadavg 3.4→4.9)实测 4946s(✓1 ✗0)—— 已越过 4900 的实测带,故按 V28 的建议抬到 ≥5000s(P242 顺手抬,本表在本任务写集合内);22 条臂各跑一遍分组,所以比分组的全量还长;取本轮 · ×4 · floor 60
153
- 62 · 关键回复存储与 CLI(change: pulse-key-replies · P234) 129 516 129 -/19/14.0/12.0 - - - P234 apply 实测(2026-10-13):host=[段 61 在 smoke --select 61,62 里 129s(load 14,168 条断言)] band=200(实测上取整)· ×4 = 800 · floor 60 · PM 修正(2026-10-14):band_s 必须等于 max(host/container/ci)(守卫规则),作者原写 200(实测上取整)被判不符;按实测 host 129 记,budget=max(129×4,60)=516
154
- 63 · 关键回复面板第 5 页(change: pulse-key-replies · P234) 324 1296 324 - - - - P234 apply 实测(2026-10-13):段内只跑读数面快组 + 真 pty 全套;host=[段 62 = 324s(2026-10-13 10:07 的选段运行,快组 + pty 全套;负载高时全套四组曾到 900s 超时,故 62 只跑快组)] band=420(324s 上取整含余量)· ×4 = 1680 上取整 1700 · floor 60 · PM 修正(2026-10-14):三个实测列全「-」会被守卫判「没有实测基础」;按作者报告 §10:07 那次 324s 记 host_s=324 → band=324、budget=max(324×4,60)=1296(PM 自己的容器合并跑测到 194s,取保守的 324)
@@ -1,239 +0,0 @@
1
- #!/usr/bin/env bash
2
- # M27 · team-bg 后台车道的翻转复现(红 → 绿)
3
- #
4
- # bash skills/teamsmith/tests/team-bg-flip.sh [--keep]
5
- # TEAM_FLIP_BASE=<sha> bash skills/teamsmith/tests/team-bg-flip.sh # 默认 merge-base HEAD main
6
- #
7
- # 红(两种,都要有):
8
- # ① 修复前的树(BASE = merge-base HEAD main)按它自己缺什么形状来判:
9
- # · 没有 team-bg.ts → 车道根本不存在,夹具必须报 import 失败;
10
- # · 有 M30 之前的老版(--git-common-dir)→ S11(worktree 会话的产物写进共享根)红;
11
- # · 有 M30 但缺 P33(结果里没有 `cmd:` 行)→ S12 的显示用例红;
12
- # · BASE 已经含 P33(没有修复前可对照)→ 可见跳过,并提示用 TEAM_FLIP_BASE 指到修复前的 revision。
13
- # ② 定点破坏(每个只改一行):收割静默 / 合并窗口 / 唤醒投递方式 / 账本格式 / 日志上限 / 根解析 /
14
- # P33 显示(cmd 行 / 单行化 / 码点切 / 收割回执)—— 每个都必须让夹具里**对应用例**变红。
15
- # 破坏没生效(sed 没匹配上)= 假红,直接判失败。
16
- # 绿:当前树的真扩展跑同一套夹具,全绿(TEAM-BG-HARNESS OK)。
17
- #
18
- # 只写 /tmp 下的临时目录;不碰调用者所在的仓库/session/tmux(夹具自己清空 TEAM_* 身份并断言
19
- # 产物落在临时仓库里,另有一条反向守卫对比真实仓库 state/ 的前后快照)。
20
- set -uo pipefail
21
-
22
- SELF_DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
23
- SKILL_DIR="$(cd -P "$SELF_DIR/.." && pwd)"
24
- # P53:临时根的唯一创建者(${TMPDIR:-/tmp} + owned 家族 + 回收)
25
- . "$SELF_DIR/lib/tmp-root.sh"
26
- SKILL_EXT="$SKILL_DIR/extension/team-bg.ts"
27
- REPO_ROOT="$(git -C "$SKILL_DIR" rev-parse --show-toplevel 2>/dev/null || true)"
28
- [ -n "$REPO_ROOT" ] || { printf 'team-bg-flip: 找不到 git 仓库(需要它取修复前的树)\n' >&2; exit 2; }
29
-
30
- # 能直接跑 .ts 的运行时(与 smoke 的选择顺序一致;没有就响亮退出,不静默跳过)
31
- RUNNER=""
32
- if command -v node >/dev/null 2>&1 && node -e 'process.exit(process.features.typescript?0:1)' >/dev/null 2>&1; then
33
- RUNNER="node"
34
- elif command -v bun >/dev/null 2>&1 && bun -e '1' >/dev/null 2>&1; then
35
- RUNNER="bun"
36
- elif [ -x "$HOME/.bun/bin/bun" ] && "$HOME/.bun/bin/bun" -e '1' >/dev/null 2>&1; then
37
- RUNNER="$HOME/.bun/bin/bun"
38
- elif command -v tsx >/dev/null 2>&1; then
39
- RUNNER="tsx"
40
- fi
41
- [ -n "$RUNNER" ] || { printf 'team-bg-flip: 没有能跑 .ts 的运行时(node 开启类型剥离 / bun / tsx)\n' >&2; exit 2; }
42
-
43
- BASE="${TEAM_FLIP_BASE:-}"
44
- if [ -z "$BASE" ]; then
45
- BASE="$(git -C "$REPO_ROOT" merge-base HEAD main 2>/dev/null || true)"
46
- fi
47
- [ -n "$BASE" ] || BASE="$(git -C "$REPO_ROOT" rev-parse --verify -q HEAD^ 2>/dev/null || true)"
48
- [ -n "$BASE" ] || { printf 'team-bg-flip: 解析不到修复前的 revision,用 TEAM_FLIP_BASE=<sha> 指定\n' >&2; exit 2; }
49
-
50
- KEEP=0
51
- [ "${1:-}" = "--keep" ] && KEEP=1
52
- [ "${KEEP:-0}" = "1" ] && export TEAM_TMP_KEEP=1
53
- TMP="$(tmp_root_create flip-m27)" || exit 3
54
- cleanup() { [ "$KEEP" = "1" ] || tmp_root_reap_all; }
55
- trap cleanup EXIT
56
-
57
- FAIL=0
58
- RED1=ran # ran / skipped:红①是否真的跑出对照(BASE 已含修复时可见跳过)
59
- MUTATIONS=0 # 实际执行过的定点破坏条数(红②的自我描述不再手写数字)
60
- ok() { printf ' \033[32m✓\033[0m %s\n' "$1"; }
61
- bad() { printf ' \033[31m✗\033[0m %s\n' "$1"; FAIL=$((FAIL + 1)); }
62
- hdr() { printf '\n== %s ==\n' "$1"; }
63
-
64
- HARNESS="$SKILL_DIR/tests/team-bg-harness.mjs"
65
- [ -f "$HARNESS" ] || { printf 'team-bg-flip: 缺夹具 %s\n' "$HARNESS" >&2; exit 2; }
66
- run_harness() { # <ext.ts> <tag> → 0/1(stdout 落 $TMP/<tag>.log)
67
- local ext="$1" tag="$2"
68
- $RUNNER "$HARNESS" "$ext" >"$TMP/$tag.log" 2>&1
69
- }
70
-
71
- printf '修复前 revision: %s(%s)\n修复后 skill: %s\n运行时: %s\n' \
72
- "$BASE" "$(git -C "$REPO_ROOT" log -1 --format=%s "$BASE")" "$SKILL_DIR" "$RUNNER"
73
-
74
- # ── ① 修复前的树:按 BASE 缺什么形状判红 ───────────────────────────────────────
75
- hdr "红①:修复前的树里的 team-bg(M30 之前 / P33 之前 / 根本没有这个扩展)"
76
- mkdir -p "$TMP/red/ext"
77
- git -C "$REPO_ROOT" archive "$BASE" skills/teamsmith/extension 2>/dev/null | tar -x -C "$TMP/red"
78
- RED_EXT="$TMP/red/skills/teamsmith/extension/team-bg.ts"
79
- if [ -f "$RED_EXT" ] && grep -qF 'displayCmd(' "$RED_EXT"; then
80
- # merge-base 已经落在修复之后的树上(例如 main 已合 P33、分支从那里切):没有「修复前」可对照。
81
- # 不静默放水:点名说明,并提醒用 TEAM_FLIP_BASE 指到修复前的 revision;守卫仍由红②的定点破坏承担。
82
- RED1=skipped
83
- printf ' (跳过红①:%s 已经含 P33 的 displayCmd —— 没有修复前的树可对照;要跑翻转请用 TEAM_FLIP_BASE=<修复前 sha>)\n' "$BASE"
84
- elif [ -f "$RED_EXT" ]; then
85
- if grep -qF "'--show-toplevel'" "$RED_EXT"; then
86
- # M27/M30 都在、只缺 P33:修复前的树里结果文本没有 `cmd:` 行 → 夹具应当红在 S12 的显示用例。
87
- ok "前提成立:$BASE 里有 M30 之后的 team-bg.ts(P33 之前:结果里还不点命令)"
88
- if run_harness "$RED_EXT" red-base; then
89
- bad "修复前:夹具竟然全绿(结果里的 cmd 行没有被守门)"
90
- elif grep -qF "TEAM-BG-CASE FAIL S12 short command is named in the result text" "$TMP/red-base.log"; then
91
- ok "修复前:结果里没有命令 → S12 的显示用例红 —— 缺失被夹具复现"
92
- else
93
- bad "修复前:红了,但不是 P33 的显示用例:$(grep -m1 'TEAM-BG-CASE FAIL' "$TMP/red-base.log" | sed 's/^TEAM-BG-CASE FAIL //')"
94
- fi
95
- else
96
- # main 已经合了 M27 → 修复前的树里是**旧版 team-bg**(缺 M30 的根解析修正):夹具应当**跑起来**
97
- # 并红在 S11(worktree 会话的产物被写进共享根)——这一条红就是泄漏本身。
98
- ok "前提成立:$BASE 里有 M30 之前的 team-bg.ts(旧根解析)"
99
- if run_harness "$RED_EXT" red-base; then
100
- bad "修复前:夹具竟然全绿(根解析泄漏没有被抓到)"
101
- elif grep -qF "TEAM-BG-CASE FAIL S11 a worktree session writes its job log inside the worktree" "$TMP/red-base.log"; then
102
- ok "修复前:旧根解析(--git-common-dir)让 S11 红 —— 泄漏被夹具复现"
103
- else
104
- bad "修复前:红了,但不是 S11(M30 的泄漏形状):$(grep -m1 'TEAM-BG-CASE FAIL' "$TMP/red-base.log" | sed 's/^TEAM-BG-CASE FAIL //')"
105
- fi
106
- fi
107
- else
108
- ok "前提成立:$BASE 的 extension/ 里只有 team-notify.ts(M27 之前的树)"
109
- if run_harness "$RED_EXT" red-base; then
110
- bad "修复前:夹具竟然全绿(缺失的扩展被当成了通过)"
111
- else
112
- ok "修复前:夹具非 0 退出($(grep -m1 'TEAM-BG-CASE FAIL' "$TMP/red-base.log" | sed 's/^TEAM-BG-CASE FAIL //'))"
113
- fi
114
- if grep -q 'TEAM-BG-CASE PASS' "$TMP/red-base.log"; then
115
- bad "修复前:夹具居然跑出了通过用例(import 都失败了不该有)"
116
- else
117
- ok "修复前:一个用例都没有通过(import 阶段就红)"
118
- fi
119
- fi
120
-
121
- # ── ② 定点破坏:每一行都必须让对应用例变红 ───────────────────────────────────
122
- hdr "红②:定点破坏(每个只改一行,各自必须红在对应用例)"
123
- mutate_expect_red() { # <tag> <sed 表达式> <必须出现的 FAIL 用例名>
124
- local tag="$1" expr="$2" want="$3" dir
125
- MUTATIONS=$((MUTATIONS + 1))
126
- dir="$TMP/mut-$tag"
127
- mkdir -p "$dir"
128
- cp "$SKILL_EXT" "$dir/team-bg.ts"
129
- sed -i "$expr" "$dir/team-bg.ts"
130
- if cmp -s "$SKILL_EXT" "$dir/team-bg.ts"; then
131
- bad "$tag:定点破坏没生效(sed 表达式没匹配到)——不许把假红当证据"
132
- return
133
- fi
134
- if run_harness "$dir/team-bg.ts" "$tag"; then
135
- bad "$tag:破坏后夹具仍然全绿(这条性质没有被守门)"
136
- elif grep -qF "TEAM-BG-CASE FAIL $want" "$TMP/$tag.log"; then
137
- ok "$tag:红在「$want」"
138
- else
139
- bad "$tag:红了,但不是那条用例(期望 $want):$(grep -m1 'TEAM-BG-CASE FAIL' "$TMP/$tag.log" | sed 's/^TEAM-BG-CASE FAIL //')"
140
- fi
141
- }
142
-
143
- # 收割静默:完成筛选条件里去掉「未收割」这一条 → 已经收割过的作业仍会被唤醒
144
- mutate_expect_red harvest-silent \
145
- 's/\.filter(j => j\.done && !j\.harvested && !j\.notified)/.filter(j => j.done \&\& !j.notified)/' \
146
- "S2 harvested job never wakes the agent"
147
- # 合并窗口:250ms → 0 → 同一拍完成的作业各发一条(#689 的过量唤醒)
148
- mutate_expect_red merge-window \
149
- 's/const MERGE_WINDOW_MS = 250/const MERGE_WINDOW_MS = 0/' \
150
- "S3 two jobs finishing together produce exactly one message"
151
- # 唤醒投递方式:followUp+triggerTurn → nextTurn(排队不唤醒)
152
- mutate_expect_red wake-mode \
153
- "s/{ triggerTurn: true, deliverAs: 'followUp' }/{ deliverAs: 'nextTurn' }/" \
154
- "S1 wake is a followUp with triggerTurn"
155
- # 账本格式:settled-with-unharvested → 别的名字(PM 复验/digest 的读法失效)
156
- mutate_expect_red ledger-format \
157
- 's/settled-with-unharvested=\${open\.length}/settle-unharvested=\${open.length}/' \
158
- "S5 settled lines report the unharvested count"
159
- # 日志上限:无视 TEAM_BG_LOG_MAX_BYTES(回到固定 512KB)→ 夹具的小上限不再生效
160
- mutate_expect_red log-cap \
161
- 's/return Number\.isFinite(n) && n >= 256 ? n : DEFAULT_MAX_BYTES/return DEFAULT_MAX_BYTES/' \
162
- "S6 log stays under the cap"
163
- # 根解析(M30):worktree 会话的产物必须落在**自己的 worktree** —— 退回 git-common-dir 就是泄漏本身
164
- mutate_expect_red worktree-root \
165
- "s/'--show-toplevel'/'--git-common-dir'/" \
166
- "S11 a worktree session writes its job log inside the worktree"
167
- # P33-①:结果文本里去掉 `cmd:` 行 → 用户又看不到自己跑的是什么(短命令那条必须红)
168
- mutate_expect_red cmd-line-drop \
169
- 's|\\n cmd: \${displayCmd(command)}||' \
170
- "S12 short command is named in the result text"
171
- # P33-②:文本直接用原命令(跳过单行化/缩略)→ 多行命令的换行跟着进结果(那条必须红)
172
- mutate_expect_red cmd-raw-passthrough \
173
- 's|\${displayCmd(command)}|\${command}|' \
174
- "S12 multiline command is single-lined in the result text"
175
- # P33-③:按 UTF-16 单元切(one.split(""))而不是按码点 → 代理对会被劈成半个(长命令那条必须红)
176
- mutate_expect_red cmd-unit-slice \
177
- 's|Array\.from(one)|one.split("")|' \
178
- "S12 long command is truncated at the 100th code point + ellipsis"
179
- # P33-④:收割回执里去掉 `cmd:` 行(sed 无 g 只换第一处 = still running 形状)→ 该形状的用例必须红
180
- mutate_expect_red cmd-wait-drop \
181
- 's|\\n cmd: \${displayCmd(job\.command)}||' \
182
- "S12 the harvest receipt (still running) names the command too"
183
-
184
- # ── ③ 绿:当前树的真扩展 ─────────────────────────────────────────────────────
185
- hdr "绿:当前树的真扩展(同一套夹具)"
186
- if run_harness "$SKILL_EXT" green; then
187
- ok "绿:夹具全绿($(grep -c 'TEAM-BG-CASE PASS' "$TMP/green.log") 条用例,$(grep -m1 'TEAM-BG-HARNESS' "$TMP/green.log"))"
188
- else
189
- bad "绿:当前树的扩展没过夹具"; grep 'TEAM-BG-CASE FAIL' "$TMP/green.log" | sed 's/^/ /'
190
- fi
191
- if grep -q 'TEAM-BG-CASE FAIL' "$TMP/green.log"; then
192
- bad "绿:输出里还有 FAIL 用例"
193
- else
194
- ok "绿:没有 FAIL 用例"
195
- fi
196
- if grep -q 'reverse guard: the real repo state/ is untouched' "$TMP/green.log"; then
197
- ok "反向守卫:夹具确认真实仓库 state/ 未被触碰"
198
- else
199
- bad "反向守卫:夹具没有跑到真实仓库 state/ 的快照对比"
200
- fi
201
-
202
- # ── ④ 真 pi 的加载链(零模型调用):两个 -e 并列 + 坏扩展对照 ──────────────
203
- hdr "真 pi 加载链:notify + bg 两个 -e(零模型调用),坏扩展必须让 pi 失败"
204
- PI_BIN=""
205
- if command -v pi >/dev/null 2>&1; then PI_BIN="$(command -v pi)"
206
- elif [ -x "$HOME/.bun/bin/pi" ]; then PI_BIN="$HOME/.bun/bin/pi"; fi
207
- if [ -z "$PI_BIN" ]; then
208
- printf ' (跳过:PATH 里没有 pi 可执行文件 —— 这条是集成证据,不是门禁)\n'
209
- else
210
- PI_TIMEOUT="${TEAM_BG_PI_TIMEOUT:-30}"
211
- # 正:两个真扩展都加载,pi 正常跑完(stdin EOF 就退出;rc=0 且没有 Failed to load)
212
- ( sleep 2 ) | timeout "$PI_TIMEOUT" "$PI_BIN" --mode rpc --no-session \
213
- -e "$SKILL_DIR/extension/team-notify.ts" -e "$SKILL_EXT" >"$TMP/rpc-green.log" 2>&1
214
- if [ "$?" -eq 0 ] && ! grep -qi 'failed to load' "$TMP/rpc-green.log"; then
215
- ok "真 pi 接受两个 -e(notify + bg)且无加载错误"
216
- else
217
- bad "真 pi 加载两个扩展失败:$(grep -i 'failed to load' "$TMP/rpc-green.log" | head -1)"
218
- fi
219
- # 反:故意抛错的扩展必须让 pi 非 0 退出(证明上面那条不是「pi 根本不看 -e」)
220
- printf 'export default function () { throw new Error("team-bg-flip-broken-probe") }\n' > "$TMP/broken-ext.ts"
221
- ( sleep 2 ) | timeout "$PI_TIMEOUT" "$PI_BIN" --mode rpc --no-session -e "$TMP/broken-ext.ts" >"$TMP/rpc-broken.log" 2>&1
222
- if [ "$?" -ne 0 ] && grep -q 'team-bg-flip-broken-probe' "$TMP/rpc-broken.log"; then
223
- ok "坏扩展对照:pi 拒绝加载(rc≠0 且报出被抛的错误)"
224
- else
225
- bad "坏扩展对照没红:pi 对加载失败的扩展无反应(上面那条正例就没有证据力)"
226
- fi
227
- fi
228
-
229
- printf '\n'
230
- if [ "$FAIL" -eq 0 ]; then
231
- if [ "$RED1" = "skipped" ]; then
232
- printf '\033[32mteam-bg-flip:绿 + 红②×%d 全绿;红① 可见跳过(%s 已含修复,没有修复前的树可对照)\033[0m\n' "$MUTATIONS" "$BASE"
233
- else
234
- printf '\033[32mteam-bg-flip:翻转已复现(红① + 红②×%d → 绿)\033[0m\n' "$MUTATIONS"
235
- fi
236
- exit 0
237
- fi
238
- printf '\033[31mteam-bg-flip:没有观察到预期的翻转(%d 条失败)\033[0m\n' "$FAIL"
239
- exit 1