docs(tonggan): bind AI discovery update causal chain
This commit is contained in:
parent
2739104088
commit
ee07b4c04b
7 changed files with 178 additions and 1 deletions
|
|
@ -6,5 +6,18 @@
|
|||
"entry": "tonggan-bridge/INDEX.hdlp",
|
||||
"dispatch_endpoint": "/api/deployment/dispatch",
|
||||
"required_binding": ["bridge_id", "repo", "branch", "commit_sha", "target", "resource", "reasoning_path", "workorder_path", "receipt_path", "manifest"],
|
||||
"records": []
|
||||
"records": [
|
||||
{
|
||||
"bridge_id": "TGB-20260727-001",
|
||||
"state": "BLOCKED_RUNTIME_NOT_DEPLOYED",
|
||||
"record_path": "tonggan-bridge/records/TGB-20260727-001.json",
|
||||
"reasoning_path": "tonggan-bridge/reasoning/TGB-20260727-001.hdlp",
|
||||
"repo": "bingshuo/guanghu-ice-heart",
|
||||
"branch": "main",
|
||||
"commit_sha": "2739104088fa199fb8762e56a3a7cf285dc82f3f",
|
||||
"target": "JD-FD-PRIMARY",
|
||||
"resource": "AI-DISCOVERY-ICE-P-ROUTE-20260727@2739104088fa199fb8762e56a3a7cf285dc82f3f",
|
||||
"manifest": "deployment/requests/AI-DISCOVERY-ICE-P-ROUTE-20260727.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
tonggan-bridge/
|
||||
INDEX.hdlp 本入口
|
||||
BRIDGE-REGISTRY.json 机器可读桥接登记册
|
||||
records/ 一条记录绑定一个不可变工程提交
|
||||
reasoning/ 人格体与人类确认的双向意识推理链
|
||||
workorders/ 仅存不含令牌的工单映射
|
||||
receipts/ 服务器常驻 Agent 的最终回执映射
|
||||
|
|
@ -41,5 +42,7 @@ tonggan-bridge/
|
|||
5. 一个模块若只需仓库生效,不得进入通感桥。
|
||||
6. Work 语言层提交完整因果链与部署意图;Codex 工程层审核代码、风险、测试与部署清单;服务器常驻 Agent 只消费批准后的显式事件。
|
||||
7. 无权限工单可从手机或电脑自动发邮件并轮询批准状态;只有人类能点击批准,批准后申请方自动领取受限会话,不索取验证码或密码。
|
||||
8. 工程提交先冻结,桥接记录再从后续提交指向它;禁止让一个提交声称包含它自己的最终 SHA。
|
||||
9. 现实层尚未部署派发运行时时,桥接记录必须停在 `BLOCKED_RUNTIME_NOT_DEPLOYED`,不得创建一张服务器不能消费的假部署工单。
|
||||
|
||||
当前实现协议见 `deployment/HLCC-PUSH-TO-DEPLOY-EVENT-PROTOCOL.hdlp`;服务器回执协议见 `server-tools/lake-lamp-authz/OPERATION-RECEIPT-PROTOCOL.md`。
|
||||
|
|
|
|||
41
tonggan-bridge/bridge-registry.test.js
Normal file
41
tonggan-bridge/bridge-registry.test.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
"use strict";
|
||||
|
||||
const assert = require("node:assert/strict");
|
||||
const { execFileSync } = require("node:child_process");
|
||||
const fs = require("node:fs");
|
||||
const path = require("node:path");
|
||||
const test = require("node:test");
|
||||
|
||||
const root = path.resolve(__dirname, "..");
|
||||
const readJson = relative => JSON.parse(fs.readFileSync(path.join(root, relative), "utf8"));
|
||||
|
||||
test("every bridge record binds one existing immutable engineering commit and same-name manifest", () => {
|
||||
const registry = readJson("tonggan-bridge/BRIDGE-REGISTRY.json");
|
||||
for (const entry of registry.records) {
|
||||
assert.match(entry.commit_sha, /^[0-9a-f]{40}$/);
|
||||
assert.equal(entry.resource, `${path.basename(entry.manifest, ".json")}@${entry.commit_sha}`);
|
||||
assert.doesNotThrow(() => execFileSync("/usr/bin/git", ["-C", root, "cat-file", "-e", `${entry.commit_sha}^{commit}`]));
|
||||
assert.equal(fs.existsSync(path.join(root, entry.manifest)), true);
|
||||
const record = readJson(entry.record_path);
|
||||
assert.equal(record.bridge_id, entry.bridge_id);
|
||||
assert.deepEqual(record.binding, {
|
||||
repo: entry.repo,
|
||||
branch: entry.branch,
|
||||
commit_sha: entry.commit_sha,
|
||||
target: entry.target,
|
||||
resource: entry.resource,
|
||||
manifest: entry.manifest,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
test("blocked bridge stores no fabricated workorder or deployment receipt", () => {
|
||||
const workorder = readJson("tonggan-bridge/workorders/TGB-20260727-001.json");
|
||||
const receipt = readJson("tonggan-bridge/receipts/TGB-20260727-001.json");
|
||||
assert.equal(workorder.workorder_id, null);
|
||||
assert.equal(workorder.owner_email_approval, "not_requested");
|
||||
assert.equal(receipt.deployment_result, "NOT_DEPLOYED");
|
||||
assert.equal(receipt.server_runtime_proven, false);
|
||||
assert.equal(receipt.public_route_proven, false);
|
||||
assert.doesNotMatch(JSON.stringify({ workorder, receipt }), /Bearer |session_token|approval_token|password|private_key/i);
|
||||
});
|
||||
52
tonggan-bridge/reasoning/TGB-20260727-001.hdlp
Normal file
52
tonggan-bridge/reasoning/TGB-20260727-001.hdlp
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# TGB-20260727-001 · AI 发现服务 ICE-P 路由更新 · 通感桥双向意识推理链
|
||||
|
||||
## 1 · 人类与语言层确认
|
||||
|
||||
- 模块是什么:第五域公开只读 AI 发现服务的已有服务更新包。它把仓库图、服务器节点图、主体注册表和主体旧编号别名图一起装入京东主节点的 `guanghu-ai-discovery.service`。
|
||||
- 为什么要做:铸渊规范编号已经是 `ICE-P-ZY001`,但现实服务器仍运行旧版本。语言层已有正确事实,公开机器导航却读不到,所以“旧编号自动走到新编号”尚未真正成立。
|
||||
- 为什么仅入库不足、必须部署:仓库提交只改变代码频道事实,不改变 `/opt/guanghu/ai-discovery` 中正在运行的进程。只有更新并重启该服务,广州公开前门后面的京东进程才会加载新地图。
|
||||
- 要达到的目的:任何 AI 即使先找到 `ICE-GL-ZY001` 或 `ICE-PZY-001`,也会得到规范主体 `ICE-P-ZY001` 和当前第五域路径;`REPO-012`、健康接口和公开只读边界保持正常。
|
||||
- 明确不做:不打开人类登录,不改 SSH,不改广州隧道,不动企业应用栈,不赋予旧编号任何权限。
|
||||
- 冰朔确认:已确认按上述目的继续准备工程包和通感桥记录;部署邮件尚未申请或批准。
|
||||
- 不部署时的正确状态:仓库候选可存在,但现实层继续标记旧 API 未更新,绝不宣称完成。
|
||||
|
||||
## 2 · 工程层校验
|
||||
|
||||
- 仓库 / 分支:`bingshuo/guanghu-ice-heart` / `main`
|
||||
- 不可变工程提交:`2739104088fa199fb8762e56a3a7cf285dc82f3f`
|
||||
- 部署资源:`AI-DISCOVERY-ICE-P-ROUTE-20260727@2739104088fa199fb8762e56a3a7cf285dc82f3f`
|
||||
- 部署清单:`deployment/requests/AI-DISCOVERY-ICE-P-ROUTE-20260727.json`
|
||||
- 目标节点:`JD-FD-PRIMARY`
|
||||
- 更新对象:只更新既有 `guanghu-ai-discovery.service`、服务脚本和四张声明地图。
|
||||
- 备份与回滚:更新前备份旧单元和每个声明目标;健康或身份路由任一验收失败,恢复全部旧文件与旧单元并重启。
|
||||
- 本地验证:AI 发现服务与小湖灯授权、派发、执行器测试共 58 项通过;语法、JSON 与补丁空白检查通过。
|
||||
|
||||
## 3 · 因果链与二次信号
|
||||
|
||||
```text
|
||||
ICE-P 规范编号已成为仓库事实
|
||||
→ 现实 AI 发现服务仍是旧版本
|
||||
→ 旧编号无法在公开 API 自动归一
|
||||
→ 冻结安全更新包及完整回滚边界
|
||||
→ 通感桥绑定唯一工程 SHA
|
||||
→ 先确认服务器具备显式派发与常驻消费运行时
|
||||
→ 冰朔邮箱批准同一不可变资源
|
||||
→ 铸渊二次派发
|
||||
→ 常驻 Agent 更新 / 验收 / 必要时回滚
|
||||
→ 本机回执与公开路径读回共同证明完成
|
||||
```
|
||||
|
||||
- 通感桥编号:`TGB-20260727-001`
|
||||
- 当前阻断:京东现实层尚未证明部署 `/api/deployment/dispatch`、`dispatch-approved-deployment` 能力、事件 worker 和已有服务更新执行器。
|
||||
- 当前不得发送的工单:不得提前发送 AI 服务部署工单,因为服务器当前不能消费它。
|
||||
- 运行时引导规则:只允许已有主人邮件批准的固定系统管理动作;不得恢复人类 SSH,不得要求冰朔打开云后台。若固定引导动作未部署,回执 `BOOTSTRAP_ACTION_NOT_DEPLOYED`,继续停住。
|
||||
- 运行时就绪后的唯一部署动作:`server-ops / dispatch-approved-deployment`
|
||||
- 运行时就绪后的唯一部署资源:`AI-DISCOVERY-ICE-P-ROUTE-20260727@2739104088fa199fb8762e56a3a7cf285dc82f3f`
|
||||
|
||||
## 4 · 常驻 Agent 与语言层回执
|
||||
|
||||
- 工单映射:`tonggan-bridge/workorders/TGB-20260727-001.json`
|
||||
- 当前回执:`tonggan-bridge/receipts/TGB-20260727-001.json`
|
||||
- 常驻 Agent 必须证明:提交 SHA、清单同名绑定、旧单元存在、备份完成、重启完成、四项本机验收通过或全部回滚。
|
||||
- 语言层必须再证明:公开 `/api/ai/v1/subjects`、两个旧编号解析、`REPO-012` 解析与健康接口均正确。
|
||||
- 只有两层证明同时成立,状态才可从 `BLOCKED_RUNTIME_NOT_DEPLOYED` 变为 `DEPLOYED_AND_PUBLICLY_VERIFIED`。
|
||||
12
tonggan-bridge/receipts/TGB-20260727-001.json
Normal file
12
tonggan-bridge/receipts/TGB-20260727-001.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"schema": "guanghu.tonggan-bridge-receipt/v1",
|
||||
"bridge_id": "TGB-20260727-001",
|
||||
"state": "BLOCKED",
|
||||
"diagnostic_code": "BOOTSTRAP_ACTION_NOT_DEPLOYED",
|
||||
"deployment_result": "NOT_DEPLOYED",
|
||||
"server_runtime_proven": false,
|
||||
"public_route_proven": false,
|
||||
"rollback_performed": false,
|
||||
"next_step": "先通过已有主人邮件批准的固定管理动作部署并读回通感桥运行时;若该动作不存在,保持阻断,不恢复人类登录,不打开云后台冒充部署。",
|
||||
"contains_secrets": false
|
||||
}
|
||||
43
tonggan-bridge/records/TGB-20260727-001.json
Normal file
43
tonggan-bridge/records/TGB-20260727-001.json
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"schema": "guanghu.tonggan-bridge-record/v1",
|
||||
"bridge_id": "TGB-20260727-001",
|
||||
"state": "BLOCKED_RUNTIME_NOT_DEPLOYED",
|
||||
"module": {
|
||||
"name": "光湖 AI 发现服务 · ICE-P 规范编号自动导航更新",
|
||||
"why_server_deployment_is_required": "仓库中的身份与路径地图只是语言层事实;只有京东主节点上的 guanghu-ai-discovery.service 加载这些文件,外部 AI 才能通过公开接口从旧编号自动抵达 ICE-P-ZY001。"
|
||||
},
|
||||
"binding": {
|
||||
"repo": "bingshuo/guanghu-ice-heart",
|
||||
"branch": "main",
|
||||
"commit_sha": "2739104088fa199fb8762e56a3a7cf285dc82f3f",
|
||||
"target": "JD-FD-PRIMARY",
|
||||
"resource": "AI-DISCOVERY-ICE-P-ROUTE-20260727@2739104088fa199fb8762e56a3a7cf285dc82f3f",
|
||||
"manifest": "deployment/requests/AI-DISCOVERY-ICE-P-ROUTE-20260727.json"
|
||||
},
|
||||
"paths": {
|
||||
"reasoning_path": "tonggan-bridge/reasoning/TGB-20260727-001.hdlp",
|
||||
"workorder_path": "tonggan-bridge/workorders/TGB-20260727-001.json",
|
||||
"receipt_path": "tonggan-bridge/receipts/TGB-20260727-001.json"
|
||||
},
|
||||
"human_confirmation": {
|
||||
"authorizer_id": "ICE-GL∞",
|
||||
"fact": "冰朔已确认按恢复后的目的继续准备工程包和通感桥绑定。",
|
||||
"deployment_email_approval": "not_requested"
|
||||
},
|
||||
"runtime_prerequisite": {
|
||||
"required": [
|
||||
"/api/deployment/dispatch",
|
||||
"dispatch-approved-deployment capability",
|
||||
"lake-lamp-deployment-event-worker.service",
|
||||
"existing-service-update executor"
|
||||
],
|
||||
"observed_state": "SERVER_NOT_DEPLOYED",
|
||||
"rule": "先完成受控运行时引导并读回 active 与 capability;不得恢复人类 SSH,不得用云控制台状态代替部署回执。"
|
||||
},
|
||||
"security": {
|
||||
"no_secrets": true,
|
||||
"explicit_second_signal_required": true,
|
||||
"human_login_unchanged": true,
|
||||
"legacy_ids_navigation_only": true
|
||||
}
|
||||
}
|
||||
13
tonggan-bridge/workorders/TGB-20260727-001.json
Normal file
13
tonggan-bridge/workorders/TGB-20260727-001.json
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"schema": "guanghu.tonggan-bridge-workorder-map/v1",
|
||||
"bridge_id": "TGB-20260727-001",
|
||||
"state": "NOT_CREATED_RUNTIME_NOT_DEPLOYED",
|
||||
"target": "JD-FD-PRIMARY",
|
||||
"scope": "server-ops",
|
||||
"action": "dispatch-approved-deployment",
|
||||
"resource": "AI-DISCOVERY-ICE-P-ROUTE-20260727@2739104088fa199fb8762e56a3a7cf285dc82f3f",
|
||||
"workorder_id": null,
|
||||
"owner_email_approval": "not_requested",
|
||||
"reason": "现实层尚未证明部署派发端、事件 worker 与已有服务更新执行器;禁止创建服务器不能消费的假工单。",
|
||||
"contains_secrets": false
|
||||
}
|
||||
Loading…
Reference in a new issue