chore(工作区): 第 36 棒续作收口(A2 实例进程内面达成 · A8 改判)
- 拍板①「A」:实例一直在跑(实时视图 running@20001);进程内 /mcn/api/accounts 200 · total:5 ⇒ A2 实例进程内面达成。纠正上一棒:其判「stopped」所据 PG dsh_instances.status 是滞后失真 - 拍板②「worker 用插件更新机制」:机制已落地且在跑(agent POST /shared-layer/pull + 定时轮询) 真机对账快照 w-106 @23:52:11:stale:[mcn-suite] + failed:[timeout] ⇒ 106 自主拉取成立、该件拉取超时失败 ⇒ A8 由「未取证」改判为「机制在跑 · 该件超时」 - 平台侧问题(拉取超时 / 台账滞后)只报告不改码 - 收尾:R4 临时会话 DELETED=1 / POC_LEFT=0;未启动未停止任何实例
This commit is contained in:
1 parent
6ece092782
commit
df876aec90
4 files changed
+145
No files matched your search
@@ -322,6 +322,82 @@ NODE_E_BEFORE=5 → PKILL=ok → NODE_E_AFTER=0
|
||||
|
||||
**⛔ 未提交的(如实记)**:`.workbuddy/memory/MEMORY.md`(`M`,23 行 ±)—— 其 diff **全部是他线的记忆瘦身/重构**(把「成本与自动化」「文档库结构与命名规则」两节改为指针式),**⛔ 非本棒改动** ⇒ 依「⛔ 不代提交他线在途改动」**未纳入**本棒提交。工作区仓库另有 `M CODEBUDDY.md`/`M state.py`/`M .codebuddy/rules/server-ops.md`/`M 接续入口_IM线_20260922.md` 及多个 `?? 交付物/…` —— **均为他线在途,⛔ 本棒未触碰**。
|
||||
|
||||
---
|
||||
|
||||
## 九 第 36 棒续作(2026-09-26 00:18–00:3x · 用户两条拍板落地)
|
||||
|
||||
> **会话**:`p36b-exec-plugin-dataline`(同棒续作,域锁重领 9 键,`rc=0`)
|
||||
> **上游**:用户 2026-09-26 00:17 两条回话 —— ①「A」(授权启动实例取进程内读数)②「**worker 应该使用插件更新机制**」(⛔ 不是去开 ssh 通道)
|
||||
|
||||
### 9.1 拍板② ⇒ 机制查证:**机制已落地且在跑,106 自己拉**
|
||||
|
||||
平台既有机制(源码实证,⛔ 未改一行):
|
||||
|
||||
| 事实 | 出处 |
|
||||
|---|---|
|
||||
| worker agent 有 `POST /shared-layer/pull`(带 `AGENT_TOKEN_HEADER`) | `src/worker/agent.ts:812` |
|
||||
| **启动即拉一次 + 定时轮询**(`pullTimer = setInterval`) | `src/worker/agent.ts:816-819` |
|
||||
| 注释原话:**「`restart dshs-worker` 就等于完成一次共享层同步,⛔ 不必再手工 scp」** | `src/worker/agent.ts:815` |
|
||||
| 形态 = **节点主动拉取(pull)+ 主节点核对并把差异告知**(2026-09-24 用户拍板) | `src/web/routes/business-plugins.ts:373-377` |
|
||||
| 对账快照落 `<sharedRoot>/.node-sync-reports.json`(每 host 留最新一条) | 同上 `:379-428` |
|
||||
|
||||
**真机读数**(`cat /var/lib/dshs/bundled-plugins/.node-sync-reports.json`,309 B,`rc=0`):
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"hostId": "w-106",
|
||||
"at": 1790351531536,
|
||||
"authoritative": 4,
|
||||
"missing": [],
|
||||
"stale": ["dsh-plugin-mcn-suite"],
|
||||
"extra": [],
|
||||
"failed": [{ "flat": "dsh-plugin-mcn-suite", "error": "The operation was aborted due to timeout" }]
|
||||
}
|
||||
]
|
||||
```
|
||||
`at` ⇒ **2026-09-25 23:52:11 CST**(`date -d @1790351531`)。
|
||||
|
||||
**判定**:🔴 **用户的判断成立** —— 106 确实在走「插件更新机制」自主拉取(23:52 那轮就在我 23:22 `share 0.5.1` 之后),**不是"没通道"**。但 **`dsh-plugin-mcn-suite` 这一件拉取超时失败**(`failed` 具名 `The operation was aborted due to timeout`),因此它仍列在 `stale` 里 ⇒ **106 上仍是旧版**。
|
||||
|
||||
**⇒ 这是平台侧参数/实现问题(2.0 MB 包跨云拉取超时),不是本线能力缺口。** 依硬约束「⛔ 不改 `src/**`,平台侧缺陷只报告」⇒ **只报告**,修复方向(供平台线选):① 调大 `syncSharedLayerOnce` 的 HTTP 超时;② 包体分块/断点续拉;③ 拉取失败退避重试并计入 `failed` 计数(现每轮只留最新一条,历史失败不可见)。
|
||||
|
||||
### 9.2 拍板① ⇒ A2「真实例进程内」面 **达成**
|
||||
|
||||
🔴 **关键纠正**:上一棒判「实例 `status=stopped`(按需启动)」的依据是 **PG `dsh_instances.status`**;而**实时视图**(`GET /api/admin/users/<uid>/dsh/status`)显示:
|
||||
|
||||
```
|
||||
{"running":true,"instance":{"id":"8525b86a-6cf0-446f-8b58-18966696d030","port":20001,"status":"running","restarts":0,"lastCrashedAt":null},"url":"https://admin.ai1net.com/?token=6E4v8cqnn-…"}
|
||||
```
|
||||
⇒ **该实例一直在跑(端口 20001)**,台账 `status=stopped`/`port=null` 是**滞后失真**。⛔ 本棒**未启动、未停止**任何实例(`launch` 调用因 folder 口径返回 `bad_path`,未产生副作用)。
|
||||
|
||||
**进程内读数**(命令原文 + 输出原文 + 退出码):
|
||||
|
||||
| 步骤 | 命令(节选) | 输出原文 | 退出码 |
|
||||
|---|---|---|---|
|
||||
| 无凭据探入口 | `curl -s http://127.0.0.1:20001/` | `401` / `dsh web authentication required; reopen the URL printed by dsh web.` | `0` |
|
||||
| **实例内 MCN 接口** | `curl -s --compressed -H "Cookie: dsh_token=$TOK" "http://127.0.0.1:20001/mcn/api/accounts"` | `200` + 正文 **13,155 B**:`{"ok":true,"total":5,"page":1,"pageSize":20,"items":[{"id":1627,"account_name":"王微斯",…` | `0` |
|
||||
| 带 `?token=` 同样可达 | `curl -s "http://127.0.0.1:20001/mcn/api/accounts?token=$TOK"` | `200` | `0` |
|
||||
| R4 清理 | `DELETE FROM sessions WHERE user_agent='poc-curl2'` | `DELETED=1`;`POC_LEFT=0` | `0` |
|
||||
|
||||
⇒ **插件在实例进程内真实读到了 5 条账号(`total: 5` = `hot_accounts` 5 行,与影子读 `5 = 5` 一致)** ⇒ 切档后**实例进程内的读路径真的走平台取数口**,A2 全达成。
|
||||
|
||||
### 9.3 判据改判(承 §6)
|
||||
|
||||
| # | 原判(第 36 棒主体) | **现判(续作后)** | 依据 |
|
||||
|---|---|---|---|
|
||||
| **A2** | 🟡 取数口面 ✅/实例进程面 ⛔ | ✅ **全达成** | §9.2 进程内 `/mcn/api/accounts` `200` · `total:5` |
|
||||
| **A5** | ✅ | ✅ | 不变(7 表 `platform`) |
|
||||
| **A8** | ⛔ 不一致(106 未取证) | 🟡 **机制在跑·106 已自主拉取但该件超时失败 ⇒ 仍不一致(原因码具名)** | §9.1 `.node-sync-reports.json` |
|
||||
| 其余 | A1 ✅/A3 ✅/A4 ✅/A6 🟡/A7 ✅/A9 ✅ | **不变** | — |
|
||||
|
||||
### 9.4 待平台线处置(⛔ 非本线可改,只报告)
|
||||
|
||||
1. `syncSharedLayerOnce` 拉取 2.0 MB 包超时 ⇒ 超时阈值/分块/重试三选项中定夺。
|
||||
2. `dsh_instances.status` 与实时视图不一致(台账滞后)⇒ 值得单独立项核查(本条**影响到"实例是否在跑"的一切判断**)。
|
||||
3. 若需 106 侧"立即生效"的运维手段:`POST <106>/shared-layer/pull` 或 `restart dshs-worker` —— ⚠️ 两者都要**能连到 106**;本棒在 47 与本机**均无 106 通道**(见 §5-2)⇒ **⛔ 未执行,也未绕道**。
|
||||
|
||||
|
||||
|
||||
> ⚠️ **文档库侧的台账不入库**:`$DOC/05-交接单/` 被文档库仓库 `.gitignore:45` **整体忽略**(`git check-ignore -v` 命中;`git ls-files --error-unmatch` 报 `did not match any file(s) known to git`)⇒ `05-交接单/README.md` **未跟踪、不入库**。🔴 该台账**只存磁盘**(+服务器镜像),⛔ 不能靠 git 保全。本条**实测推翻**工作区 `MEMORY.md` 旧记「已跟踪的 `05-交接单/README.md` 不受影响」。
|
||||
|
||||
Reference in new issue
Block a user