teamsmith 0.0.0-stage → 0.1.2
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.
- package/LICENSE +21 -0
- package/README.md +158 -2
- package/bin/team.mjs +59 -0
- package/install.sh +94 -0
- package/package.json +37 -4
- package/skills/teamsmith/CHANGELOG.md +763 -0
- package/skills/teamsmith/SKILL.md +312 -0
- package/skills/teamsmith/extension/team-bg.ts +435 -0
- package/skills/teamsmith/extension/team-inbox-watch.ts +1412 -0
- package/skills/teamsmith/extension/team-notify.ts +663 -0
- package/skills/teamsmith/references/agent-adapters.md +643 -0
- package/skills/teamsmith/references/config.md +477 -0
- package/skills/teamsmith/references/meeting.md +124 -0
- package/skills/teamsmith/references/memory.md +133 -0
- package/skills/teamsmith/references/migration.md +227 -0
- package/skills/teamsmith/references/openspec.md +222 -0
- package/skills/teamsmith/references/philosophy.md +95 -0
- package/skills/teamsmith/references/protocol.md +712 -0
- package/skills/teamsmith/references/troubleshooting.md +1384 -0
- package/skills/teamsmith/references/workflows.md +448 -0
- package/skills/teamsmith/scripts/lib/cmd-agents.sh +1709 -0
- package/skills/teamsmith/scripts/lib/cmd-bg.sh +284 -0
- package/skills/teamsmith/scripts/lib/cmd-bootstrap.sh +311 -0
- package/skills/teamsmith/scripts/lib/cmd-config.sh +1156 -0
- package/skills/teamsmith/scripts/lib/cmd-death.sh +562 -0
- package/skills/teamsmith/scripts/lib/cmd-docs.sh +149 -0
- package/skills/teamsmith/scripts/lib/cmd-draft.sh +124 -0
- package/skills/teamsmith/scripts/lib/cmd-init.sh +212 -0
- package/skills/teamsmith/scripts/lib/cmd-meeting.sh +904 -0
- package/skills/teamsmith/scripts/lib/cmd-outbox.sh +196 -0
- package/skills/teamsmith/scripts/lib/cmd-project.sh +642 -0
- package/skills/teamsmith/scripts/lib/cmd-review.sh +1393 -0
- package/skills/teamsmith/scripts/lib/cmd-status.sh +1399 -0
- package/skills/teamsmith/scripts/lib/cmd-update.sh +191 -0
- package/skills/teamsmith/scripts/lib/cmd-watch.sh +1681 -0
- package/skills/teamsmith/scripts/lib/common.sh +4964 -0
- package/skills/teamsmith/scripts/lib/draft-entry.sh +51 -0
- package/skills/teamsmith/scripts/lib/outbox.sh +2042 -0
- package/skills/teamsmith/scripts/lib/tmux-argv.sh +165 -0
- package/skills/teamsmith/scripts/monitor.mjs +616 -0
- package/skills/teamsmith/scripts/panel/README.md +192 -0
- package/skills/teamsmith/scripts/panel/build.sh +47 -0
- package/skills/teamsmith/scripts/panel/bun.lock +109 -0
- package/skills/teamsmith/scripts/panel/draft-send.sh +68 -0
- package/skills/teamsmith/scripts/panel/package.json +24 -0
- package/skills/teamsmith/scripts/panel/panel.js +388 -0
- package/skills/teamsmith/scripts/panel/src/App.tsx +2150 -0
- package/skills/teamsmith/scripts/panel/src/clipboard.ts +154 -0
- package/skills/teamsmith/scripts/panel/src/compose.ts +691 -0
- package/skills/teamsmith/scripts/panel/src/data.ts +555 -0
- package/skills/teamsmith/scripts/panel/src/format.ts +50 -0
- package/skills/teamsmith/scripts/panel/src/layout.ts +2562 -0
- package/skills/teamsmith/scripts/panel/src/main.tsx +894 -0
- package/skills/teamsmith/scripts/panel/src/markdown.ts +340 -0
- package/skills/teamsmith/scripts/panel/src/sanitize.ts +42 -0
- package/skills/teamsmith/scripts/panel/src/settings.ts +154 -0
- package/skills/teamsmith/scripts/panel/src/strings/en.ts +416 -0
- package/skills/teamsmith/scripts/panel/src/strings/index.ts +65 -0
- package/skills/teamsmith/scripts/panel/src/strings/types.ts +9 -0
- package/skills/teamsmith/scripts/panel/src/strings/zh.ts +414 -0
- package/skills/teamsmith/scripts/panel/src/theme.ts +116 -0
- package/skills/teamsmith/scripts/panel/src/types.ts +652 -0
- package/skills/teamsmith/scripts/panel/src/width.ts +105 -0
- package/skills/teamsmith/scripts/panel/tsconfig.json +16 -0
- package/skills/teamsmith/scripts/shim/signal-gate +156 -0
- package/skills/teamsmith/scripts/shim/tmux +403 -0
- package/skills/teamsmith/scripts/team +143 -0
- package/skills/teamsmith/templates/AGENTS.section.md.tmpl +147 -0
- package/skills/teamsmith/templates/BOARD.md.tmpl +18 -0
- package/skills/teamsmith/templates/DECISIONS.md.tmpl +22 -0
- package/skills/teamsmith/templates/OWNERSHIP.md.tmpl +25 -0
- package/skills/teamsmith/templates/PROTOCOL.md.tmpl +84 -0
- package/skills/teamsmith/templates/ROADMAP.md.tmpl +29 -0
- package/skills/teamsmith/templates/config.sh.tmpl +106 -0
- package/skills/teamsmith/templates/memory-seed.md.tmpl +46 -0
- package/skills/teamsmith/templates/pm-prompt.md.tmpl +110 -0
- package/skills/teamsmith/templates/report.md.tmpl +36 -0
- package/skills/teamsmith/templates/task.md.tmpl +65 -0
- package/skills/teamsmith/templates/threads-README.md +17 -0
- package/skills/teamsmith/tests/bg-ledger-harness.mjs +682 -0
- package/skills/teamsmith/tests/bg-ledger.sh +307 -0
- package/skills/teamsmith/tests/checkout-shape-probe.sh +800 -0
- package/skills/teamsmith/tests/config-cli.sh +1562 -0
- package/skills/teamsmith/tests/container-tmux.sh +493 -0
- package/skills/teamsmith/tests/coverage-inventory.sh +173 -0
- package/skills/teamsmith/tests/death-cause.sh +564 -0
- package/skills/teamsmith/tests/delivery-truth.sh +1231 -0
- package/skills/teamsmith/tests/fake-tui.py +450 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/README.md +60 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/judge-second.py +139 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/mock-server.py +29 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/observe.ts +20 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/run-case.sh +79 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/scenario.sh +175 -0
- package/skills/teamsmith/tests/fixtures/p55/flip-p49.sh +229 -0
- package/skills/teamsmith/tests/fixtures/p71-incident/README.md +22 -0
- package/skills/teamsmith/tests/fixtures/p71-incident/dev2.seen +8 -0
- package/skills/teamsmith/tests/fixtures/p71-incident/dev2.wake +9 -0
- package/skills/teamsmith/tests/fixtures/p71-incident/pm-nudges.wake +3 -0
- package/skills/teamsmith/tests/fixtures/signal-lint-cases.txt +40 -0
- package/skills/teamsmith/tests/flip-glue.sh +162 -0
- package/skills/teamsmith/tests/flip-m12-26c.sh +129 -0
- package/skills/teamsmith/tests/flip-m12.sh +185 -0
- package/skills/teamsmith/tests/flip-m16.sh +166 -0
- package/skills/teamsmith/tests/flip-m17.sh +204 -0
- package/skills/teamsmith/tests/flip-m33.sh +284 -0
- package/skills/teamsmith/tests/flip-m34.sh +96 -0
- package/skills/teamsmith/tests/flip-m37.sh +185 -0
- package/skills/teamsmith/tests/flip-m4.3.sh +375 -0
- package/skills/teamsmith/tests/flip-m43.sh +128 -0
- package/skills/teamsmith/tests/flip-m44.sh +262 -0
- package/skills/teamsmith/tests/flip-m45.sh +244 -0
- package/skills/teamsmith/tests/flip-m46.sh +238 -0
- package/skills/teamsmith/tests/flip-m48.sh +304 -0
- package/skills/teamsmith/tests/flip-m6.2.sh +205 -0
- package/skills/teamsmith/tests/flip-m6.3.sh +283 -0
- package/skills/teamsmith/tests/flip-m6.4.sh +267 -0
- package/skills/teamsmith/tests/flip-m6.5.sh +113 -0
- package/skills/teamsmith/tests/flip-m7.1.sh +135 -0
- package/skills/teamsmith/tests/flip-m7.2.sh +321 -0
- package/skills/teamsmith/tests/flip-p144.sh +112 -0
- package/skills/teamsmith/tests/flip-p156.sh +133 -0
- package/skills/teamsmith/tests/flip-p158.sh +301 -0
- package/skills/teamsmith/tests/flip-p160.sh +182 -0
- package/skills/teamsmith/tests/flip-p171.sh +249 -0
- package/skills/teamsmith/tests/flip-p18.1.sh +95 -0
- package/skills/teamsmith/tests/flip-p20.sh +286 -0
- package/skills/teamsmith/tests/flip-p201.sh +249 -0
- package/skills/teamsmith/tests/flip-p210.sh +239 -0
- package/skills/teamsmith/tests/flip-p211.sh +152 -0
- package/skills/teamsmith/tests/flip-p217.sh +288 -0
- package/skills/teamsmith/tests/flip-p22.sh +123 -0
- package/skills/teamsmith/tests/flip-p23.sh +239 -0
- package/skills/teamsmith/tests/flip-p25.sh +165 -0
- package/skills/teamsmith/tests/flip-p71.sh +184 -0
- package/skills/teamsmith/tests/flip-p72.sh +202 -0
- package/skills/teamsmith/tests/frames/README.md +176 -0
- package/skills/teamsmith/tests/frames/p78-conversation-rule-below-box.txt +6 -0
- package/skills/teamsmith/tests/frames/p78-cursor-mid-draft.txt +6 -0
- package/skills/teamsmith/tests/frames/p78-draft-rule-below-cursor-line.txt +6 -0
- package/skills/teamsmith/tests/frames/p78-draft-rule-below-cursor.txt +6 -0
- package/skills/teamsmith/tests/frames/p78-draft-rule-blank-region.txt +6 -0
- package/skills/teamsmith/tests/frames/p78-draft-rule-only.txt +5 -0
- package/skills/teamsmith/tests/frames/p78-spinner-row-below-cursor.txt +6 -0
- package/skills/teamsmith/tests/frames/p78-wider-rule-below-cursor.txt +6 -0
- package/skills/teamsmith/tests/frames/p86-f1-mixed-width-disjoint-box.txt +8 -0
- package/skills/teamsmith/tests/frames/p86-f1-narrower-width-disjoint-box.txt +8 -0
- package/skills/teamsmith/tests/frames/p86-f1-spinner-top-disjoint-box.txt +8 -0
- package/skills/teamsmith/tests/frames/pi-0.85.1-update-banner.txt +30 -0
- package/skills/teamsmith/tests/frames/pi-0.87.0-draft-half-sentence.txt +30 -0
- package/skills/teamsmith/tests/frames/pi-0.87.0-empty-box.txt +30 -0
- package/skills/teamsmith/tests/frames/pi-0.87.0-one-line-draft.txt +30 -0
- package/skills/teamsmith/tests/frames/pi-0.87.0-project-trust-prompt.txt +30 -0
- package/skills/teamsmith/tests/frames/pi-0.99.2-empty-editor.txt +32 -0
- package/skills/teamsmith/tests/frames/pi-0.99.2-human-draft.txt +32 -0
- package/skills/teamsmith/tests/frames/pi-1.0.0-git-error-in-box.txt +32 -0
- package/skills/teamsmith/tests/gate-guard.sh +112 -0
- package/skills/teamsmith/tests/guard-matrix.sh +233 -0
- package/skills/teamsmith/tests/install-shape.sh +731 -0
- package/skills/teamsmith/tests/ledger-ban.sh +612 -0
- package/skills/teamsmith/tests/lib/box-judge.sh +68 -0
- package/skills/teamsmith/tests/lib/checkout-shape.sh +129 -0
- package/skills/teamsmith/tests/lib/loop-scan.awk +114 -0
- package/skills/teamsmith/tests/lib/pty-wait.sh +676 -0
- package/skills/teamsmith/tests/lib/section-guard.sh +855 -0
- package/skills/teamsmith/tests/lib/shell-lex.pl +261 -0
- package/skills/teamsmith/tests/lib/tmp-root.sh +528 -0
- package/skills/teamsmith/tests/lib/tmux-cap.sh +35 -0
- package/skills/teamsmith/tests/lib/tmux-iso-call-probe.sh +81 -0
- package/skills/teamsmith/tests/lib/tmux-iso-probe.sh +46 -0
- package/skills/teamsmith/tests/lib/tmux-iso.sh +381 -0
- package/skills/teamsmith/tests/load-experiment.sh +290 -0
- package/skills/teamsmith/tests/loop-inventory.tsv +84 -0
- package/skills/teamsmith/tests/panel-b2-slow-stub.sh +19 -0
- package/skills/teamsmith/tests/panel-b2.sh +1183 -0
- package/skills/teamsmith/tests/panel-b3-pty-mouse.py +240 -0
- package/skills/teamsmith/tests/panel-b3-pty-tmux-mouse.py +138 -0
- package/skills/teamsmith/tests/panel-b3-stub.sh +279 -0
- package/skills/teamsmith/tests/panel-b3.sh +1301 -0
- package/skills/teamsmith/tests/panel-choices.sh +572 -0
- package/skills/teamsmith/tests/panel-clipboard-model.ts +187 -0
- package/skills/teamsmith/tests/panel-compose-model.ts +290 -0
- package/skills/teamsmith/tests/panel-contrast.mjs +81 -0
- package/skills/teamsmith/tests/panel-cpu-premise.sh +173 -0
- package/skills/teamsmith/tests/panel-cpu.sh +391 -0
- package/skills/teamsmith/tests/panel-flip-m54.sh +207 -0
- package/skills/teamsmith/tests/panel-flip-p123.sh +278 -0
- package/skills/teamsmith/tests/panel-flip-p125.sh +318 -0
- package/skills/teamsmith/tests/panel-flip-p128.sh +259 -0
- package/skills/teamsmith/tests/panel-keyprobe-pty.py +99 -0
- package/skills/teamsmith/tests/panel-keyprobe-stub.sh +41 -0
- package/skills/teamsmith/tests/panel-keyprobe.sh +82 -0
- package/skills/teamsmith/tests/panel-keyprobe.tsx +116 -0
- package/skills/teamsmith/tests/panel-knobs.sh +83 -0
- package/skills/teamsmith/tests/panel-p21.sh +2181 -0
- package/skills/teamsmith/tests/panel-snapshots.sh +802 -0
- package/skills/teamsmith/tests/panel-strings.mjs +195 -0
- package/skills/teamsmith/tests/perf.sh +740 -0
- package/skills/teamsmith/tests/pm-box-real.sh +350 -0
- package/skills/teamsmith/tests/pulse-nudge-key.sh +563 -0
- package/skills/teamsmith/tests/routes.sh +1652 -0
- package/skills/teamsmith/tests/section-budgets.tsv +150 -0
- package/skills/teamsmith/tests/section-guard.sh +231 -0
- package/skills/teamsmith/tests/section-needs-audit.sh +94 -0
- package/skills/teamsmith/tests/section-paths.tsv +142 -0
- package/skills/teamsmith/tests/section-select.sh +655 -0
- package/skills/teamsmith/tests/signal-gate.sh +366 -0
- package/skills/teamsmith/tests/signal-lint-legacy.txt +14 -0
- package/skills/teamsmith/tests/signal-lint.pl +416 -0
- package/skills/teamsmith/tests/skill-load.mjs +65 -0
- package/skills/teamsmith/tests/smoke.sh +19711 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-120-detail.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-120-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-120.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-160-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-160.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-59-detail.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-59-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-59.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-99-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-99.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-120-detail.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-120-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-120.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-160-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-160.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-59-detail.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-59-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-59.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-99-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-99.txt +32 -0
- package/skills/teamsmith/tests/spec-ledger-refs.tsv +78 -0
- package/skills/teamsmith/tests/spec-refs.sh +826 -0
- package/skills/teamsmith/tests/task-header-model.sh +267 -0
- package/skills/teamsmith/tests/team-bg-flip.sh +239 -0
- package/skills/teamsmith/tests/team-bg-harness.mjs +392 -0
- package/skills/teamsmith/tests/team-bg-stop.sh +434 -0
- package/skills/teamsmith/tests/team-inbox-watch-flip.sh +191 -0
- package/skills/teamsmith/tests/team-inbox-watch-harness.mjs +1559 -0
- package/skills/teamsmith/tests/tmp-hygiene.sh +1190 -0
- package/skills/teamsmith/tests/tmux-lint-legacy.txt +31 -0
- package/skills/teamsmith/tests/tmux-lint.pl +604 -0
- package/skills/teamsmith-init/SKILL.md +100 -0
- package/skills/teamsmith-init/references/bootstrap.md +74 -0
- package/skills/teamsmith-init/templates/bootstrap-prompt.md.tmpl +46 -0
|
@@ -0,0 +1,150 @@
|
|
|
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 · erp 实测反馈(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:严格头部读取 + 就绪判据) 4.00 60 3.00 10.6/?/14.0/10.5 4.00 12.9 - P70 实测:host=[P56fast,P56full,FAST2,full1] container=[ctr1] 取最差 · ×4 · floor 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) 1 60 1 - 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=[未测] · ×4 · floor 60
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# section-guard.sh — 门禁每段预算/等待的**纯逻辑**检查(change: gate-section-accounting · 实现:P70)
|
|
3
|
+
#
|
|
4
|
+
# bash skills/teamsmith/tests/section-guard.sh --budget-check [--tree <tests 目录>]
|
|
5
|
+
# bash skills/teamsmith/tests/section-guard.sh --loop-check [--tree <tests 目录>]
|
|
6
|
+
#
|
|
7
|
+
# 两个检查都不起进程、不碰 tmux、不判时长(D33 保持);默认对脚本自己所在目录跑,
|
|
8
|
+
# `--tree` 给夹具在 scratch 副本上跑翻转用。
|
|
9
|
+
#
|
|
10
|
+
# --budget-check:`smoke.sh` 里每个 `section "…"` 都在 `section-budgets.tsv` 里有行;
|
|
11
|
+
# 每行的 `budget_s >= max(ceil(band_s × factor), floor)`(factor=4、floor=60,写在表头里)、
|
|
12
|
+
# `band_s == max(host_s, container_s, ci_s)`、provenance 非空;band 列至少有一个实测值。
|
|
13
|
+
# --loop-check:`*/*.sh` + `lib/*.sh` 里的每个 `while`+`sleep` 循环,按**文件内出现顺序**
|
|
14
|
+
# 与 `loop-inventory.tsv` 的行一一对应(锚点必须是 while 原文的子串;`cap=` 行还要求
|
|
15
|
+
# 循环体里能找到那个上限字面量)。新循环、丢上限、顺序变化都会点名 file:line 变红。
|
|
16
|
+
set -uo pipefail
|
|
17
|
+
|
|
18
|
+
here="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
19
|
+
TREE="$here"
|
|
20
|
+
MODE=""
|
|
21
|
+
BACKUP_BUDGET=""
|
|
22
|
+
while [ $# -gt 0 ]; do
|
|
23
|
+
case "$1" in
|
|
24
|
+
--budget-check) MODE="budget"; shift ;;
|
|
25
|
+
--loop-check) MODE="loop"; shift ;;
|
|
26
|
+
--tree) TREE="${2:?--tree 需要目录}"; shift 2 ;;
|
|
27
|
+
--tree=*) TREE="${1#*=}"; shift ;;
|
|
28
|
+
--backup-budget) BACKUP_BUDGET="${2:?--backup-budget 需要文件}"; shift 2 ;;
|
|
29
|
+
-h|--help|"") sed -n '2,16p' "$0"; exit 0 ;;
|
|
30
|
+
*) printf 'section-guard.sh:不认识的参数 %s\n' "$1" >&2; exit 2 ;;
|
|
31
|
+
esac
|
|
32
|
+
done
|
|
33
|
+
[ -n "$MODE" ] || { printf 'section-guard.sh:要 --budget-check 或 --loop-check\n' >&2; exit 2; }
|
|
34
|
+
[ -d "$TREE" ] || { printf 'section-guard.sh:目录不存在 %s\n' "$TREE" >&2; exit 2; }
|
|
35
|
+
|
|
36
|
+
FACTOR=4
|
|
37
|
+
FLOOR=60
|
|
38
|
+
FAIL=0
|
|
39
|
+
ok() { printf 'ok: %s\n' "$1"; }
|
|
40
|
+
bad() { printf 'bad: %s\n' "$1"; FAIL=$((FAIL + 1)); }
|
|
41
|
+
|
|
42
|
+
# ---------------------------------------------------------------- 预算检查
|
|
43
|
+
budget_check() {
|
|
44
|
+
local table="$TREE/section-budgets.tsv" smoke="$TREE/smoke.sh"
|
|
45
|
+
[ -f "$table" ] || { bad "缺预算表 $table"; return 1; }
|
|
46
|
+
[ -f "$smoke" ] || { bad "缺门禁本体 $smoke"; return 1; }
|
|
47
|
+
# 表头必须记录推导(系数/下限),否则检查用的数字与表自己写明的漂开也没人知道
|
|
48
|
+
local head
|
|
49
|
+
head="$(sed -n '1,12p' "$table")"
|
|
50
|
+
case "$head" in
|
|
51
|
+
*"factor=$FACTOR"*) ok "表头记录了 factor=$FACTOR" ;;
|
|
52
|
+
*) bad "预算表头没有 factor=$FACTOR(推导必须写进文件)" ;;
|
|
53
|
+
esac
|
|
54
|
+
case "$head" in
|
|
55
|
+
*"floor=$FLOOR"*) ok "表头记录了 floor=$FLOOR" ;;
|
|
56
|
+
*) bad "预算表头没有 floor=$FLOOR(推导必须写进文件)" ;;
|
|
57
|
+
esac
|
|
58
|
+
# smoke.sh 里的每个 section id
|
|
59
|
+
local ids id
|
|
60
|
+
ids="$(grep -oE '^[[:space:]]*section "[^"]+"' "$smoke" | sed -e 's/^[[:space:]]*section "//' -e 's/"$//')"
|
|
61
|
+
local n_ids=0 n_rows=0
|
|
62
|
+
n_ids="$(printf '%s\n' "$ids" | grep -c . || true)"
|
|
63
|
+
[ "$n_ids" -gt 0 ] || { bad "$smoke 里没找到 section 声明"; return 1; }
|
|
64
|
+
while IFS= read -r id; do
|
|
65
|
+
[ -n "$id" ] || continue
|
|
66
|
+
local row
|
|
67
|
+
row="$(awk -F'\t' -v id="$id" '!/^[[:space:]]*#/ && $1 == id { print; found = 1; exit }' "$table")"
|
|
68
|
+
if [ -z "$row" ]; then
|
|
69
|
+
bad "预算表没有段落「$id」的行(每个 section 都要有行;未列出的新段落运行时用默认预算)"
|
|
70
|
+
continue
|
|
71
|
+
fi
|
|
72
|
+
local band budget host hload ctr cload ci prov
|
|
73
|
+
band="$(printf '%s' "$row" | cut -f2)"
|
|
74
|
+
budget="$(printf '%s' "$row" | cut -f3)"
|
|
75
|
+
host="$(printf '%s' "$row" | cut -f4)"; hload="$(printf '%s' "$row" | cut -f5)"
|
|
76
|
+
ctr="$(printf '%s' "$row" | cut -f6)"; cload="$(printf '%s' "$row" | cut -f7)"
|
|
77
|
+
ci="$(printf '%s' "$row" | cut -f8)"
|
|
78
|
+
prov="$(printf '%s' "$row" | cut -f9)"
|
|
79
|
+
local cols; cols="$(printf '%s' "$row" | awk -F'\t' '{print NF}')"
|
|
80
|
+
[ "$cols" -eq 9 ] || { bad "段落「$id」的行有 $cols 列(要 9 列)"; continue; }
|
|
81
|
+
case "$budget" in ''|*[!0-9]*) bad "段落「$id」的 budget_s=[$budget] 不是正整数"; continue ;; esac
|
|
82
|
+
[ -n "$prov" ] || { bad "段落「$id」没有 provenance(修订/镜像/日期)"; continue; }
|
|
83
|
+
# 三个 band 列至少一个是实测数字;band_s 必须等于它们的最大者
|
|
84
|
+
local bnum max n
|
|
85
|
+
bnum=0; max=0; n=0
|
|
86
|
+
for bnum in "$host" "$ctr" "$ci"; do
|
|
87
|
+
case "$bnum" in ''|-|*) case "$bnum" in ''|-) continue ;; esac ;; esac
|
|
88
|
+
case "$bnum" in *[!0-9.]*) bad "段落「$id」的 band 列 [$bnum] 不是数字/-"; continue 2 ;; esac
|
|
89
|
+
n=$((n + 1))
|
|
90
|
+
awk -v a="$bnum" -v b="$max" 'BEGIN { exit !(a + 0 > b + 0) }' && max="$bnum"
|
|
91
|
+
done
|
|
92
|
+
[ "$n" -gt 0 ] || { bad "段落「$id」三个 band 列全是「-」:没有实测基础"; continue; }
|
|
93
|
+
if ! awk -v a="$band" -v b="$max" 'BEGIN { exit !(a + 0 == b + 0) }'; then
|
|
94
|
+
bad "段落「$id」band_s=$band ≠ max(host/container/ci)=$max(导出值与实测列不符)"
|
|
95
|
+
continue
|
|
96
|
+
fi
|
|
97
|
+
local need
|
|
98
|
+
need="$(awk -v b="$band" -v f="$FACTOR" -v fl="$FLOOR" 'BEGIN {
|
|
99
|
+
x = b * f; y = int(x); if (x > y) y++;
|
|
100
|
+
if (y < fl) y = fl;
|
|
101
|
+
printf "%d", y
|
|
102
|
+
}')"
|
|
103
|
+
if [ "$budget" -lt "$need" ]; then
|
|
104
|
+
bad "段落「$id」budget_s=$budget 低于 max(ceil(band×$FACTOR), $FLOOR)=$need(不许收到实测带以下)"
|
|
105
|
+
continue
|
|
106
|
+
fi
|
|
107
|
+
n_rows=$((n_rows + 1))
|
|
108
|
+
done <<<"$ids"
|
|
109
|
+
# 重复 id(表里同一段两行会让查表结果不确定)
|
|
110
|
+
local dups
|
|
111
|
+
dups="$(awk -F'\t' '!/^[[:space:]]*#/ && NF { print $1 }' "$table" | sort | uniq -d)"
|
|
112
|
+
[ -z "$dups" ] || bad "预算表有重复 id:$(printf '%s' "$dups" | tr '\n' ' ')"
|
|
113
|
+
# 表里多出来的行(对应不上任何 section)只是提示,不算红
|
|
114
|
+
local extra
|
|
115
|
+
extra="$(awk -F'\t' '!/^[[:space:]]*#/ && NF { print $1 }' "$table" | sort | while IFS= read -r id; do
|
|
116
|
+
printf '%s\n' "$ids" | grep -qxF -- "$id" || printf '%s\n' "$id"
|
|
117
|
+
done | tr '\n' ' ')"
|
|
118
|
+
[ -n "$extra" ] && printf 'note: 预算表里这些行对应不到 section(历史/新段落预留):%s\n' "$extra"
|
|
119
|
+
if [ "$n_rows" = "$n_ids" ]; then
|
|
120
|
+
ok "预算表覆盖 $n_ids/$n_ids 个 section 且每行都满足 max(ceil(band×$FACTOR), $FLOOR)"
|
|
121
|
+
else
|
|
122
|
+
bad "预算表只通过了 $n_rows/$n_ids 个 section"
|
|
123
|
+
fi
|
|
124
|
+
return 0
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
# ---------------------------------------------------------------- 循环清单检查
|
|
128
|
+
loop_check() {
|
|
129
|
+
local inv="$TREE/loop-inventory.tsv" scan="$TREE/lib/loop-scan.awk"
|
|
130
|
+
[ -f "$inv" ] || { bad "缺循环清单 $inv"; return 1; }
|
|
131
|
+
[ -f "$scan" ] || { bad "缺循环探针 $scan"; return 1; }
|
|
132
|
+
local det="$TREE/.loop-check.detected.$$"
|
|
133
|
+
: > "$det"
|
|
134
|
+
local f rel
|
|
135
|
+
for f in "$TREE"/*.sh "$TREE"/lib/*.sh; do
|
|
136
|
+
[ -f "$f" ] || continue
|
|
137
|
+
rel="${f#$TREE/}"
|
|
138
|
+
awk -v REL="$rel" -f "$scan" "$f" >> "$det" || true
|
|
139
|
+
done
|
|
140
|
+
# 逐文件按出现顺序配对:清单行序 = 源码里循环出现的顺序
|
|
141
|
+
local out rc=0
|
|
142
|
+
out="$(awk -v det="$det" -v inv="$inv" '
|
|
143
|
+
function flush_file( i, n, k, bounds, pattern) {
|
|
144
|
+
fc = det_n[curfile] + 0
|
|
145
|
+
ic = inv_n[curfile] + 0
|
|
146
|
+
if (fc != ic) {
|
|
147
|
+
printf "bad: %s 的 while+sleep 循环数 %d ≠ 清单行数 %d(新循环/漏登记/顺序变化都要点名并补清单)\n", curfile, fc, ic
|
|
148
|
+
problems++
|
|
149
|
+
}
|
|
150
|
+
n = (fc < ic ? fc : ic)
|
|
151
|
+
for (i = 1; i <= n; i++) {
|
|
152
|
+
k = curfile SUBSEP i
|
|
153
|
+
if (index(det_raw[k], inv_anchor[k]) == 0) {
|
|
154
|
+
printf "bad: %s:%s 的 while 行与清单第 %d 行的锚点不符\n 源码:%s\n 清单:%s\n", \
|
|
155
|
+
curfile, det_line[k], i, det_raw[k], inv_anchor[k]
|
|
156
|
+
problems++
|
|
157
|
+
continue
|
|
158
|
+
}
|
|
159
|
+
if (det_closed[k] != "closed") {
|
|
160
|
+
printf "bad: %s:%s 的 while 循环没有配对的 done(unclosed)\n", curfile, det_line[k]
|
|
161
|
+
problems++
|
|
162
|
+
continue
|
|
163
|
+
}
|
|
164
|
+
bounds = inv_bound[k]
|
|
165
|
+
if (bounds ~ /^cap=/) {
|
|
166
|
+
pattern = substr(bounds, 5)
|
|
167
|
+
if (index(det_ext[k], pattern) == 0) {
|
|
168
|
+
printf "bad: %s:%s 的循环丢了上限(清单要求循环体里出现 [%s])\n", curfile, det_line[k], pattern
|
|
169
|
+
problems++
|
|
170
|
+
}
|
|
171
|
+
} else if (bounds !~ /^bound=/) {
|
|
172
|
+
printf "bad: %s:%s 的清单行 bound 列既不是 cap= 也不是 bound=([%s])\n", curfile, det_line[k], bounds
|
|
173
|
+
problems++
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (fc > ic) {
|
|
177
|
+
for (i = ic + 1; i <= fc; i++) {
|
|
178
|
+
k = curfile SUBSEP i
|
|
179
|
+
printf "bad: %s:%s 是未登记的 while+sleep 循环:%s\n", curfile, det_line[k], det_raw[k]
|
|
180
|
+
}
|
|
181
|
+
problems++
|
|
182
|
+
}
|
|
183
|
+
total_matched += n
|
|
184
|
+
}
|
|
185
|
+
BEGIN {
|
|
186
|
+
while ((getline l < inv) > 0) {
|
|
187
|
+
if (l ~ /^[[:space:]]*#/) continue
|
|
188
|
+
nn = split(l, a, "\t")
|
|
189
|
+
if (nn != 4) { printf "bad: 清单行不是 4 列:%s\n", l; problems++; continue }
|
|
190
|
+
file = a[1]
|
|
191
|
+
inv_n[file]++
|
|
192
|
+
k = file SUBSEP inv_n[file]
|
|
193
|
+
inv_line[k] = a[2]; inv_bound[k] = a[3]; inv_anchor[k] = a[4]
|
|
194
|
+
inv_files[file] = 1
|
|
195
|
+
total_inv++
|
|
196
|
+
}
|
|
197
|
+
while ((getline l < det) > 0) {
|
|
198
|
+
nn = split(l, a, "\t")
|
|
199
|
+
if (nn != 5) continue
|
|
200
|
+
file = a[1]
|
|
201
|
+
if (!(file in det_files)) order[++nf] = file
|
|
202
|
+
det_n[file]++
|
|
203
|
+
k = file SUBSEP det_n[file]
|
|
204
|
+
det_line[k] = a[2]; det_raw[k] = a[3]; det_closed[k] = a[4]; det_ext[k] = a[5]
|
|
205
|
+
det_files[file] = 1
|
|
206
|
+
total_det++
|
|
207
|
+
}
|
|
208
|
+
for (i = 1; i <= nf; i++) { curfile = order[i]; flush_file() }
|
|
209
|
+
for (ff in inv_files) if (!(ff in det_files)) printf "note: 清单里的 %s 不在扫描面(过期行?)\n", ff
|
|
210
|
+
printf "ok: 扫描 %d 行清单 / %d 个 while+sleep 循环,配平 %d 个\n", total_inv, total_det, total_matched
|
|
211
|
+
exit(problems > 0 ? 1 : 0)
|
|
212
|
+
}
|
|
213
|
+
' 2>&1)"
|
|
214
|
+
rc=$?
|
|
215
|
+
printf '%s\n' "$out"
|
|
216
|
+
rm -f "$det"
|
|
217
|
+
[ "$rc" -eq 0 ] || FAIL=$((FAIL + 1))
|
|
218
|
+
return 0
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
case "$MODE" in
|
|
222
|
+
budget) budget_check ;;
|
|
223
|
+
loop) loop_check ;;
|
|
224
|
+
esac
|
|
225
|
+
|
|
226
|
+
if [ "$FAIL" -eq 0 ]; then
|
|
227
|
+
printf '\nsection-guard --%s-check: 全过\n' "$MODE"
|
|
228
|
+
exit 0
|
|
229
|
+
fi
|
|
230
|
+
printf '\nsection-guard --%s-check: %d 条不成立\n' "$MODE" "$FAIL"
|
|
231
|
+
exit 1
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# teamsmith · 逐键 needs 自足审计(change: gate-runtime-budget · P117/V2)
|
|
3
|
+
#
|
|
4
|
+
# 对每个段键 K:跑一遍 `smoke.sh --select K`(FAST / 私有 TMPDIR / 不排队),断言:
|
|
5
|
+
# ① K 自己的段落**真的跑了**(有收口行)——没有就是 bad;
|
|
6
|
+
# ② K 自己的段落 ✗0;同时整条选集的退出码必须是 0。
|
|
7
|
+
# 为什么要逐键:`--paths` 的结论是若干键的并集,一个键缺前提会被别的键的绿遮住;
|
|
8
|
+
# 逐键跑才能把「这条 needs 够不够」钉在数据上(P112 §5.2:3b 缺 5、6 缺 5、10 缺 4b/5/9、28 缺 26)。
|
|
9
|
+
#
|
|
10
|
+
# 用法:section-needs-audit.sh [--keys <k1,k2,…>] [--root <树>] [--keep]
|
|
11
|
+
# --keys 只审计这几个键(默认:表里的全部键)
|
|
12
|
+
# --root 在另一棵树上跑(默认本脚本所在的仓库;夹具/复验用)
|
|
13
|
+
# --keep 保留日志与临时根(打印路径),便于诊断
|
|
14
|
+
# 退出码:0 = 被判定的键全部绿;1 = 有键红 / 没跑;2 = 用法或环境错误。
|
|
15
|
+
#
|
|
16
|
+
# 纪律:**顺序执行**。夹具会在树内注入→还原;并发跑同一棵树会互相掀桌子
|
|
17
|
+
# (P117 实测:-P2 两次运行把注入写进对方现场,之后的每一键都大面积假红)。
|
|
18
|
+
set -uo pipefail
|
|
19
|
+
|
|
20
|
+
here="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
21
|
+
ROOT="${TEAM_NEEDS_AUDIT_ROOT:-$(cd -P "$here/../../.." && pwd)}"
|
|
22
|
+
KEYS=""
|
|
23
|
+
KEEP=0
|
|
24
|
+
|
|
25
|
+
usage() { sed -n '2,21p' "$0"; }
|
|
26
|
+
while [ $# -gt 0 ]; do
|
|
27
|
+
case "$1" in
|
|
28
|
+
--keys) shift; [ $# -gt 0 ] || { printf 'section-needs-audit: --keys 需要值\n' >&2; exit 2; }; KEYS="$1"; shift ;;
|
|
29
|
+
--keys=*) KEYS="${1#*=}"; shift ;;
|
|
30
|
+
--root) shift; [ $# -gt 0 ] || { printf 'section-needs-audit: --root 需要目录\n' >&2; exit 2; }; ROOT="$1"; shift ;;
|
|
31
|
+
--root=*) ROOT="${1#*=}"; shift ;;
|
|
32
|
+
--keep) KEEP=1; shift ;;
|
|
33
|
+
-h|--help) usage; exit 0 ;;
|
|
34
|
+
*) printf 'section-needs-audit: 未知参数 %s(用法见 --help)\n' "$1" >&2; exit 2 ;;
|
|
35
|
+
esac
|
|
36
|
+
done
|
|
37
|
+
|
|
38
|
+
ROOT="$(cd -P "$ROOT" 2>/dev/null && pwd)" || { printf 'section-needs-audit: --root 目录不存在\n' >&2; exit 2; }
|
|
39
|
+
SUITE="$ROOT/skills/teamsmith/tests/smoke.sh"
|
|
40
|
+
SEL="$ROOT/skills/teamsmith/tests/section-select.sh"
|
|
41
|
+
[ -r "$SUITE" ] || { printf 'section-needs-audit: 读不到 %s\n' "$SUITE" >&2; exit 2; }
|
|
42
|
+
[ -r "$SEL" ] || { printf 'section-needs-audit: 读不到 %s\n' "$SEL" >&2; exit 2; }
|
|
43
|
+
[ -n "$KEYS" ] || { KEYS="$(bash "$SEL" --list | awk -F'\t' '{printf "%s,", $1}')"; KEYS="${KEYS%,}"; }
|
|
44
|
+
[ -n "$KEYS" ] || { printf 'section-needs-audit: 表里一个键都没有\n' >&2; exit 2; }
|
|
45
|
+
|
|
46
|
+
# owned 家族口径(section 40 的 lint):根建在 ${TMPDIR:-/tmp}/teamsmith-<kind>.XXXXXX 下;
|
|
47
|
+
# 长度仍然够短 —— 嵌套 run 的私有 tmux socket = len($TMP)+22,本例约 90 < 107(AF_UNIX 上限)。
|
|
48
|
+
TMPROOT="$(mktemp -d "${TMPDIR:-/tmp}/teamsmith-needs-audit.XXXXXX")" || { printf 'section-needs-audit: 建不了临时根\n' >&2; exit 2; }
|
|
49
|
+
if [ "$KEEP" = 1 ]; then
|
|
50
|
+
printf 'section-needs-audit: 日志留在 %s\n' "$TMPROOT"
|
|
51
|
+
else
|
|
52
|
+
trap 'rm -rf "$TMPROOT"' EXIT
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# <日志> <key> → 该键自己的收口行(剥 ANSI);没有 = 空
|
|
56
|
+
own_line() {
|
|
57
|
+
sed 's/\x1b\[[0-9;]*m//g' "$1" | awk -v k="$2" '$1 ~ /^#[0-9]+$/ && $2 == k && /用时/ { print; exit }'
|
|
58
|
+
}
|
|
59
|
+
# <收口行> → ✗ 数(解不出 = 空)
|
|
60
|
+
own_fail() {
|
|
61
|
+
printf '%s' "$1" | awk '{ for (i = 1; i <= NF; i++) if ($i ~ /^✗[0-9]+$/) { f = $i; gsub(/[^0-9]/, "", f); print f; exit } }'
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
N=0; NPASS=0; NBAD=0
|
|
65
|
+
printf '== needs 逐键审计 ==\n'
|
|
66
|
+
printf '树:%s\n' "$ROOT"
|
|
67
|
+
for k in $(printf '%s' "$KEYS" | tr ',' ' '); do
|
|
68
|
+
[ -n "$k" ] || continue
|
|
69
|
+
N=$((N + 1))
|
|
70
|
+
d="$TMPROOT/$k"; log="$TMPROOT/$k.log"
|
|
71
|
+
mkdir -p "$d"
|
|
72
|
+
( cd "$ROOT" && env -u TEAM_ROOT -u TEAM_MAIN_ROOT -u TEAM_PROJECT -u TEAM_SESSION -u TEAM_AGENT_MODEL \
|
|
73
|
+
-u TEAM_SKILL_DIR -u TEAM_DOCS_DIR -u TEAM_AGENT -u SMOKE_TMP_RUN_ID -u SMOKE_TMP_LEDGER \
|
|
74
|
+
-u TEAM_SMOKE_KEEP -u TEAM_TMP_KEEP -u SMOKE_SEL_CHILD -u SMOKE_SEL_SKILL_DIR \
|
|
75
|
+
-u SMOKE_SEL_DECISION -u SMOKE_SEL_COPY -u TEAM_SMOKE_LOCK_WAIT \
|
|
76
|
+
TMPDIR="$d" TEAM_SMOKE_FAST=1 TEAM_SMOKE_NO_LOCK=1 \
|
|
77
|
+
bash "$SUITE" --select "$k" ) >"$log" 2>&1
|
|
78
|
+
rc=$?
|
|
79
|
+
line="$(own_line "$log" "$k")"; f="$(own_fail "$line")"
|
|
80
|
+
if [ -z "$line" ]; then
|
|
81
|
+
printf 'bad %-8s rc=%-3s own=没有收口行(段没跑)\n' "$k" "$rc"
|
|
82
|
+
NBAD=$((NBAD + 1)); continue
|
|
83
|
+
fi
|
|
84
|
+
if [ "$rc" -eq 0 ] && [ "${f:-1}" = "0" ]; then
|
|
85
|
+
printf 'ok %-8s rc=0 %s\n' "$k" "$line"
|
|
86
|
+
NPASS=$((NPASS + 1))
|
|
87
|
+
else
|
|
88
|
+
printf 'bad %-8s rc=%-3s %s\n' "$k" "$rc" "$line"
|
|
89
|
+
NBAD=$((NBAD + 1))
|
|
90
|
+
fi
|
|
91
|
+
done
|
|
92
|
+
printf '== needs 逐键审计结果 == pass %d bad %d (共 %d 键)\n' "$NPASS" "$NBAD" "$N"
|
|
93
|
+
[ "$NBAD" -eq 0 ] || exit 1
|
|
94
|
+
exit 0
|