- 变更规模:新增 514 / 修改 62 / 重命名 155 / 删除 4(归档重组与文档轮次) - .gitignore 修:`归档/**/db-cwd归一-备份-*/` —— 原规则写绝对层级(归档/db-cwd归一-…), 目录搬进 归档/配置与备份/ 后**静默失效**,43 MB 的 DB 备份又变成未跟踪 - .gitignore 补:嵌套 git 内部数据(归档/内嵌git-20261008/、归档/skills-git-旧线-20261007/dotgit-原样移出/) - .gitignore 补:运行态与部署副本(.workbuddy/collab/、.workbuddy/tools/、.workbuddy/.load-pending、.workbuddy/tmp-*) - .gitignore 补:备份件(*.bak-*) - 未跟踪文件从 2190 降到 890(其余为 归档/ 归档件与 .workbuddy/memory/ 知识文件,按口径入库)
119 lines
8.8 KiB
HTML
119 lines
8.8 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>统一唤醒出口(2026-09-30)</title>
|
||
<style>
|
||
html,body{margin:0;padding:0;background:#1a1a1a;color:#e8e8e8;
|
||
font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;}
|
||
.wrap{max-width:760px;margin:0 auto;padding:28px 20px 48px;}
|
||
h1{font-size:18px;font-weight:600;color:#CECBF6;margin:0 0 6px;}
|
||
.sub{font-size:12.5px;color:#8a8a8a;margin:0 0 26px;line-height:1.7;}
|
||
.fig{margin:0 0 34px;}
|
||
.cap{font-size:12px;color:#8a8a8a;margin:8px 0 0;line-height:1.6;}
|
||
code{color:#AFA9EC;font-size:11.5px;}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="wrap">
|
||
<h1>统一唤醒出口 · 两个拨钟方,一个出口</h1>
|
||
<p class="sub">用户口径:<b style="color:#CECBF6">「自动任务(符合条件时)是通过 协作程序去唤醒 主会话,这样流程统一」</b><br>
|
||
判据:<b style="color:#9FE1CB">「唤醒(投递)」这个动作只有一个出口 = 协作程序</b>;区别只在"谁拨这一下"。</p>
|
||
|
||
<div class="fig">
|
||
<svg width="100%" viewBox="0 0 680 300" role="img" xmlns="http://www.w3.org/2000/svg">
|
||
<text x="24" y="26" font-size="15" font-weight="600" fill="#CECBF6">① 统一后的流程</text>
|
||
|
||
<rect x="24" y="52" width="180" height="60" rx="8" fill="#26215C" stroke="#AFA9EC" stroke-width="0.7"/>
|
||
<text x="114" y="76" text-anchor="middle" font-size="12" font-weight="600" fill="#CECBF6">① 宿主钩子(事件)</text>
|
||
<text x="114" y="96" text-anchor="middle" font-size="10.5" fill="#AFA9EC">有会话在动时 ⇒ 够用</text>
|
||
|
||
<rect x="24" y="126" width="180" height="60" rx="8" fill="#412402" stroke="#FAC775" stroke-width="0.7"/>
|
||
<text x="114" y="150" text-anchor="middle" font-size="12" font-weight="600" fill="#FAC775">② 自动任务(时钟)</text>
|
||
<text x="114" y="170" text-anchor="middle" font-size="10.5" fill="#EFB775">谁都没动 ⇒ 只拨钟</text>
|
||
|
||
<line x1="204" y1="82" x2="252" y2="112" stroke="#AFA9EC" stroke-width="1"/>
|
||
<line x1="204" y1="156" x2="252" y2="126" stroke="#FAC775" stroke-width="1"/>
|
||
<polygon points="258,122 246,118 251,128" fill="#FAC775"/>
|
||
|
||
<rect x="258" y="86" width="176" height="68" rx="8" fill="#085041" stroke="#9FE1CB" stroke-width="1"/>
|
||
<text x="346" y="112" text-anchor="middle" font-size="12.5" font-weight="600" fill="#9FE1CB">协作程序</text>
|
||
<text x="346" y="131" text-anchor="middle" font-size="10.5" fill="#5DCAA5">唯一唤醒出口</text>
|
||
<text x="346" y="147" text-anchor="middle" font-size="10.5" fill="#5DCAA5">判条件 + 投递</text>
|
||
|
||
<line x1="434" y1="120" x2="486" y2="120" stroke="#9FE1CB" stroke-width="1"/>
|
||
<polygon points="494,120 482,115 482,125" fill="#9FE1CB"/>
|
||
|
||
<rect x="494" y="86" width="162" height="68" rx="8" fill="#26215C" stroke="#CECBF6" stroke-width="0.9"/>
|
||
<text x="575" y="112" text-anchor="middle" font-size="12.5" font-weight="600" fill="#CECBF6">主会话</text>
|
||
<text x="575" y="131" text-anchor="middle" font-size="10.5" fill="#AFA9EC">reply 唤醒</text>
|
||
<text x="575" y="147" text-anchor="middle" font-size="10.5" fill="#AFA9EC">(与投协作会话同一通道)</text>
|
||
|
||
<rect x="24" y="206" width="632" height="74" rx="8" fill="#501313" stroke="#F7C1C1" stroke-width="0.8"/>
|
||
<text x="36" y="228" font-size="11.5" font-weight="600" fill="#F7C1C1">🔴 降级(唯一例外):闹钟报「没有可唤醒的对象」(main-not-live/no-main-session/no-live-session)</text>
|
||
<text x="36" y="248" font-size="11" fill="#F7C1C1">⇒ 拨钟方**自己就是那个会话** ⇒ 抢域锁 + 按状态表干活。省掉的只是一次投递,判断规则仍来自同一张状态表。</text>
|
||
<text x="36" y="268" font-size="11" fill="#F7C1C1">⚠️ 但 `target-busy`(主会话**已经在跑**)⛔ **绝不能降级** —— 降级=同一件事干两遍。</text>
|
||
</svg>
|
||
<p class="cap">自动任务**不自己判条件、不自己派活、不起新会话** —— 它只跑 <code>goalctl wake</code>(⇒ <code>collabd --tick</code>)。</p>
|
||
</div>
|
||
|
||
<div class="fig">
|
||
<svg width="100%" viewBox="0 0 680 288" role="img" xmlns="http://www.w3.org/2000/svg">
|
||
<text x="24" y="26" font-size="15" font-weight="600" fill="#CECBF6">② 判定三分 —— 「符合条件时」就是这么判的</text>
|
||
|
||
<text x="30" y="52" font-size="11" font-weight="600" fill="#8a8a8a">闹钟输出</text>
|
||
<text x="290" y="52" font-size="11" font-weight="600" fill="#8a8a8a">含义</text>
|
||
<text x="530" y="52" font-size="11" font-weight="600" fill="#8a8a8a">拨钟方动作</text>
|
||
|
||
<rect x="24" y="60" width="632" height="32" rx="6" fill="#1F3B33" stroke="#5DCAA5" stroke-width="0.5"/>
|
||
<text x="34" y="81" font-size="11.5" fill="#9FE1CB">✅ http 2xx</text>
|
||
<text x="290" y="81" font-size="11.5" fill="#9FE1CB">已投递 ⇒ 主会话被唤醒</text>
|
||
<text x="530" y="81" font-size="11.5" font-weight="600" fill="#9FE1CB">结束</text>
|
||
|
||
<rect x="24" y="96" width="632" height="32" rx="6" fill="#1F3B33" stroke="#5DCAA5" stroke-width="0.5"/>
|
||
<text x="34" y="117" font-size="11.5" fill="#9FE1CB">✓ - / same-item / too-soon</text>
|
||
<text x="290" y="117" font-size="11.5" fill="#9FE1CB">条件不符(没变化/刚投过)</text>
|
||
<text x="530" y="117" font-size="11.5" font-weight="600" fill="#9FE1CB">结束(零打扰)</text>
|
||
|
||
<rect x="24" y="132" width="632" height="32" rx="6" fill="#412402" stroke="#FAC775" stroke-width="0.7"/>
|
||
<text x="34" y="153" font-size="11.5" fill="#FAC775">⏸ target-busy</text>
|
||
<text x="290" y="153" font-size="11.5" fill="#FAC775">主会话**已经在跑**</text>
|
||
<text x="530" y="153" font-size="11.5" font-weight="600" fill="#FAC775">结束 ⛔ 禁降级</text>
|
||
|
||
<rect x="24" y="168" width="632" height="32" rx="6" fill="#1F3B33" stroke="#5DCAA5" stroke-width="0.5"/>
|
||
<text x="34" y="189" font-size="11.5" fill="#9FE1CB">⛔ disabled</text>
|
||
<text x="290" y="189" font-size="11.5" fill="#9FE1CB">本需求已停(wake_enable=false)</text>
|
||
<text x="530" y="189" font-size="11.5" font-weight="600" fill="#9FE1CB">结束</text>
|
||
|
||
<rect x="24" y="204" width="632" height="34" rx="6" fill="#501313" stroke="#F7C1C1" stroke-width="0.8"/>
|
||
<text x="34" y="226" font-size="11.5" fill="#F7C1C1">🔴 main-not-live / no-main-session / no-live-session</text>
|
||
<text x="290" y="226" font-size="11.5" fill="#F7C1C1">**没有可唤醒的对象**</text>
|
||
<text x="530" y="226" font-size="11.5" font-weight="600" fill="#F7C1C1">降级:自己干</text>
|
||
|
||
<rect x="24" y="242" width="632" height="32" rx="6" fill="#501313" stroke="#F7C1C1" stroke-width="0.6"/>
|
||
<text x="34" y="263" font-size="11.5" fill="#F7C1C1">🔴 no-token / no-gateway</text>
|
||
<text x="290" y="263" font-size="11.5" fill="#F7C1C1">异常(没跑在宿主进程树里?)</text>
|
||
<text x="530" y="263" font-size="11.5" font-weight="600" fill="#F7C1C1">报告并结束</text>
|
||
</svg>
|
||
<p class="cap">🔴 最关键是**别把 `target-busy` 和「没有可唤醒的对象」混了** —— 前者是"已经在跑"(别插手),后者是"没人可跑"(要我顶上)。</p>
|
||
</div>
|
||
|
||
<div class="fig">
|
||
<svg width="100%" viewBox="0 0 680 176" role="img" xmlns="http://www.w3.org/2000/svg">
|
||
<text x="24" y="26" font-size="15" font-weight="600" fill="#CECBF6">③ 两条会静默坏的易错点(本轮实测)</text>
|
||
|
||
<rect x="24" y="44" width="632" height="60" rx="8" fill="#501313" stroke="#F7C1C1" stroke-width="0.8"/>
|
||
<text x="36" y="66" font-size="11.5" font-weight="600" fill="#F7C1C1">① 唤醒轮不能让自己被认成「主会话」</text>
|
||
<text x="36" y="85" font-size="10.5" fill="#F7C1C1">兜底判据=本工作区「最近活动 + 标题不含 [协作]」;刚起的唤醒轮活动必然最新 ⇒ 必然被选中 ⇒ 投给自己 ⇒ 主会话永远收不到</text>
|
||
<text x="36" y="100" font-size="10.5" fill="#9FE1CB">✓ 修法:排期名带 [协作](原名 [本机协作]-… 里没有 [协作] 这个子串)—— 已改</text>
|
||
|
||
<rect x="24" y="114" width="632" height="54" rx="8" fill="#412402" stroke="#FAC775" stroke-width="0.8"/>
|
||
<text x="36" y="136" font-size="11.5" font-weight="600" fill="#FAC775">② 主会话标题必须以「主控」开头,⛔ 不能加方括号</text>
|
||
<text x="36" y="155" font-size="10.5" fill="#EFB775">代码判 startswith("主控");实测有标题写成 [主控]-[机制线]-… ⇒ 判 False ⇒ 只能靠"最近活动"兜底 ⇒ 谁更新一下就可能把它顶掉</text>
|
||
</svg>
|
||
<p class="cap">两条都会**静默**出错(不报错、不告警,只是"通知永远到不了主会话")—— 所以必须当硬约束记住。</p>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|