Skip to content

docs(CLAUDE.md): Dashboard 那行指向的不是产品形态(能打开、标题也对,所以更难发现) - #833

Open
vansin wants to merge 5 commits into
mainfrom
docs/claude-md-dashboard-pointer
Open

docs(CLAUDE.md): Dashboard 那行指向的不是产品形态(能打开、标题也对,所以更难发现)#833
vansin wants to merge 5 commits into
mainfrom
docs/claude-md-dashboard-pointer

Conversation

@vansin

@vansin vansin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

#829一行改动,只动 CLAUDE.md 的 Dashboard 那行。

为什么值得单独开一条 PR

CLAUDE.md每个在本仓工作的 agent 都当作权威指令读的文件。这一行的成本不是「一条过时链接」,是「所有 agent 的默认认知」。

任何被要求「看一下 Dashboard」的 agent 会打开原文那个 URL → 看到一个正常渲染、标题正确的页面 → 得出「Dashboard 正常」。能打开的错误地址比死链危险:死链会立刻暴露,这个不会。

实测

事实 证据
产品的 Dashboard 是自托管的 docs-site/docs/guide/dashboard.md:anet hub dashboardhttp://localhost:3000,CLI 通过 npx @sleep2agi/agent-network-dashboard@<tag> 拉起;guide/account-system.md 同样指向 http://服务器IP:3000没有官方托管入口
那个 Vercel 实例是活的但陈旧 HTTP 200 + <title>Agent Network Dashboard</title>;age: 529943861.3 天
它不是孤儿链接 docs/rfcs/RFC-022 三处把它当作现存部署引用
但那条线已停 prototype/anet-client-app/ 最后一次改动是 6068e364(2026-06-11),且是 dependabot 安全清理,不是功能开发(见 #220)

改法

保留那个 URL,加限定 —— 直接删掉会让下一个人再发现一次同样的东西。

一处我自己的更正(已在提交里改掉)

第一版提交我写的是「该地址除本行外全仓再无引用」。这是错的 —— RFC-022 里有三处。

我最初在 #829 里也这么写了,原因是那次扫描用了 sort -rn | head -12,而这个 URL 计数为 1,掉在第 12 名之外。这是同一个 head -N 陷阱在本次自查里第五次出现,而这次它已经进了 issue 正文和一版提交。

已 amend 掉,#829 正文我也会更正。


只动一行文档,不涉及任何代码、配置或在跑节点。

原文只给了一个 URL:https://agent-network-dashboard.vercel.app

实测:
1) 产品的 Dashboard 是自托管的 —— `anet hub dashboard` 起在
   http://<服务器IP>:3000,由 CLI 通过 npx 拉起
   (docs-site/docs/guide/dashboard.md、guide/account-system.md),
   没有官方托管入口;
2) 那个 Vercel 实例是活的(HTTP 200、标题正确),但 CDN 缓存年龄
   约 61 天,即约两个月没重新部署过;
3) 它在 docs/rfcs/RFC-022 里被当作现存部署引用(三处),而该 RFC
   与 prototype/anet-client-app 自 2026-06-11 起无功能推进(见 #220)。

错误方式是最难发现的那种:它能打开、标题也对。任何被要求「看一下
Dashboard」的 agent 会打开它、看到正常页面、得出「Dashboard 正常」,
而它看的不是产品形态。能打开的错误地址比死链危险 —— 死链会立刻
暴露,这个不会。

CLAUDE.md 是每个在本仓工作的 agent 都当权威指令读的文件,所以这一
行的成本不是「一条过时链接」,是「所有 agent 的默认认知」。

改成写明真实访问方式,并保留那个 URL 但标注它不是产品形态 —— 直接
删掉会让下一个人再发现一次同样的东西。

详见 #829

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a1f9a7d3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CLAUDE.md Outdated

- 仓库:https://github.com/sleep2agi/agent-network
- Dashboard:https://agent-network-dashboard.vercel.app
- Dashboard:**自托管,没有官方托管入口**。`anet hub dashboard` 起在 `http://<服务器IP>:3000`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document the loopback URL for the default dashboard command

When anet hub dashboard is run without --ip/--host or a hostname override, agent-network/bin/cli.ts:6103-6104 selects 127.0.0.1, so a browser on another machine cannot reach http://<服务器IP>:3000 as this instruction implies. Document the default as http://127.0.0.1:3000 and mention that remote access requires an explicit bind such as --ip 0.0.0.0 or the documented reverse proxy.

AGENTS.md reference: AGENTS.md:L24-L24

Useful? React with 👍 / 👎.

上一版我写「起在 http://<服务器IP>:3000」,这暗示默认就能从别的机器访问。
不对。

  agent-network/bin/cli.ts
  // --host / --ip for LAN access; defaults to 127.0.0.1.
  const dashHost = opts.ip || opts.host || process.env.HOSTNAME || "127.0.0.1";

默认只绑回环,远程访问要显式 --ip 0.0.0.0 或走反代。

另外比"默认 127.0.0.1"更准的一点:$HOSTNAME 在解析链上,所以实际绑到
哪随环境变 —— 文档不该给一个固定答案,该让人去看 dashHost 的实际取值。

这条是本 PR 自己犯的同类错误:我在修「文档指向一个到不了的地方」,
却写了另一条到不了的指引。感谢自动审查抓到(#833 行内 P2)。
@vansin

vansin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

P2 成立,已修(3a1f9a7d → 306f2163)—— 这是本 PR 自己犯的同类错误

审查指出我写的 http://<服务器IP>:3000 暗示默认就能从别的机器访问。核了源码,成立:

// agent-network/bin/cli.ts
// --host / --ip for LAN access; defaults to 127.0.0.1.
const dashHost = opts.ip || opts.host || process.env.HOSTNAME || "127.0.0.1";

代码注释自己就写着 --host / --ipfor LAN access,默认回环。

我补了一层审查没提到的

解析链上还有 $HOSTNAME:

--ip  →  --host  →  $HOSTNAME  →  127.0.0.1

在设置了 HOSTNAME 的环境里(容器、部分 shell 配置),它会先于 127.0.0.1 命中。所以「默认是 127.0.0.1」这个说法本身也不够准 —— 实际绑到哪随环境变

因此文档不该给一个固定答案,而应该让人去看 dashHost 的实际取值。改后的措辞是这么写的。

这条的讽刺之处值得记

本 PR 的全部目的是修「文档指向一个到不了的地方」 —— 原文那个 Vercel 地址能打开但不是产品。

而我在修它的时候,写了另一条到不了的指引:一个默认情况下别的机器连不上的 URL 形式。

同一个失效类,换了一层皮:

症状
原文 地址能打开,但不是那个东西
我的第一版 地址是对的东西,但默认到不了

两者对读者的效果一样 —— 照着做,得不到你以为会得到的结果

我这两天在 #831 / #829 反复查的都是这一类,却在自己动手时立刻又犯一次。这说明「知道这个形态」不足以避免它,动手写指引时必须实际验证那条路径能不能走通,而不是验证它引用的对象存在。


顺带说明:本 PR 是当前唯一一条审查覆盖了当前 head 的 PR,因为它是新开的(审查器只在开 PR / 草稿转就绪 / 显式 @ 时触发)。这次修复推上去之后,它也会落到「审查记录落后于 head」的状态 —— 见 #828 的这条评论。所以:@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 306f216390

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CLAUDE.md Outdated
Comment on lines +62 to +63
**默认只绑回环**:绑定地址取 `--ip` → `--host` → `$HOSTNAME` → `127.0.0.1`
(`agent-network/bin/cli.ts` 里 `dashHost` 一行)。所以默认情况下**别的机器连不上**,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Qualify the loopback claim on HOSTNAME being unset

When HOSTNAME is populated, as it normally is inside Docker, a no-flag invocation selects that value before 127.0.0.1; the repository’s docs/tests/release-gate-playbook.md:179 specifically records the Dashboard binding to a container ID rather than loopback. The fresh revision now shows this precedence on lines 62–65, but still asserts that the default is loopback and therefore unreachable remotely, which remains false for containers with a published port or hosts whose exported hostname resolves to a non-loopback address. Make the assertion conditional on HOSTNAME being unset, or follow the production guide and avoid claiming any implicit default address.

AGENTS.md reference: AGENTS.md:L24-L24

Useful? React with 👍 / 👎.

Comment thread CLAUDE.md Outdated

- 仓库:https://github.com/sleep2agi/agent-network
- Dashboard:https://agent-network-dashboard.vercel.app
- Dashboard:**自托管,没有官方托管入口**。`anet hub dashboard` 拉起

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Distinguish the existing hosted production dashboard

The absolute statement that there is no hosted entry conflicts with the repository’s current production topology: deploy/dashboard/README.md:13-20 documents the PM2-hosted production Dashboard, while deploy/tunnel/README.md:8-17 records two public entry paths to it through Caddy and frpc. Even if neither endpoint is intended as a public SaaS product, telling internal agents that no hosted entry exists makes them ignore the live production instance and its authoritative validation/runbook path—the same kind of misdirection this change is intended to remove. Distinguish “no public product URL” from the existing project-operated production deployment.

AGENTS.md reference: AGENTS.md:L24-L24

Useful? React with 👍 / 👎.

Comment thread CLAUDE.md Outdated
也别默认它是 `http://<服务器IP>:3000` —— 要远程访问得显式 `--ip 0.0.0.0` 或走反代。
注意 `$HOSTNAME` 在链上:**实际绑到哪,随环境变**,判断前先看 `dashHost` 实际取值。
⚠️ `agent-network-dashboard.vercel.app` **不是产品形态** —— 它能打开、标题也对,
但 CDN 缓存年龄约 61 天(2026-08-13 实测),即约两个月未重新部署。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not equate CDN cache age with deployment age

An HTTP Age value reports the age of the cached response, not the timestamp of the most recent application deployment, so age: 5299438 does not by itself prove that the Vercel project has not been redeployed for two months. Cache entries can remain old or be revalidated independently of source deployments, making this inference unsafe as the basis for telling every agent to disregard the endpoint. Record only the observed cache age here, or verify staleness using a deployed build/version identifier or Vercel deployment history.

AGENTS.md reference: AGENTS.md:L29-L29

Useful? React with 👍 / 👎.

审查(#833 行内 P2 ×3)指出三处,逐条核完全部成立:

1) 「没有官方托管入口」是假的。deploy/dashboard/README.md 记着生产拓扑:
   公网 ─ Caddy :3000 / frpc :3100 → 127.0.0.1:3001 (Next.js, pm2 托管)。
   deploy/tunnel/README.md 还专门写了红字:「公网入口不止一个。这是最容易
   判断错的一层」。我正好在这一层判断错,还写进了 CLAUDE.md。
   照我上一版,agent 会忽略掉真正在跑的生产实例 —— 正是本 PR 要消除的
   那种误导,换了个方向。

2) 「默认只绑回环」在容器里不成立。$HOSTNAME 在解析链上且容器里通常有值,
   会绑到容器主机名。这是记录在案的发版门坑
   (docs/tests/release-gate-playbook.md「dashboard binds to hostname not
   0.0.0.0」)。改成:别假设任何默认地址,先看 dashHost 实际取到什么。

3) HTTP Age 是缓存年龄,不是部署年龄。我在 #829 里本来标了这个边界,
   写文档时又把它当成事实。改成只记录实测到的缓存年龄,并写明要判断
   是否停更该查什么。

重写成三分法(项目自营生产实例 / 自己起的 / 没有面向外部的 SaaS URL),
并指明判断线上状态该看哪一个。
@vansin

vansin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

三条 P2 全部成立,已修。第二条是这次最该记的:我把「最容易判断错的那一层」判断错了。

# 意见 裁定
CLAUDE.md:60 存在项目自营的托管生产 Dashboard 成立
CLAUDE.md:63 容器里 HOSTNAME 有值,不是回环 成立
CLAUDE.md:67 Age 是缓存年龄,不是部署年龄 成立

① 「没有官方托管入口」是假的

deploy/dashboard/README.md:

公网 ─┬─ Caddy :3000  ──TLS 终结──┐
      │                           ├──►  127.0.0.1:3001   (Next.js, pm2 托管)
      └─ frpc 隧道 :3100 ─────────┘

deploy/tunnel/README.md 顶部就写着:

🔴 公网入口不止一个。 这是最容易判断错的一层

我正好在这一层判断错,并把它写进了 CLAUDE.md

后果和本 PR 要修的那条一样,只是方向相反:原文让 agent 去看一个不是产品的页面;我的版本让 agent 以为不存在一个真正在跑的生产实例 —— 那才是判断线上状态该看的东西。

② 容器里不是回环

$HOSTNAME 在解析链上(--ip--host$HOSTNAME127.0.0.1),容器里通常有值。而且这是记录在案的发版门坑:

docs/tests/release-gate-playbook.md
11. dashboard binds to hostname not 0.0.0.0  (v0.10.1 R14 catch)

我上一版还专门提了 $HOSTNAME 在链上,却仍然断言「默认只绑回环」—— 提到了变量,没有推完它的后果。

Age ≠ 部署年龄

这条我#829 里本来标对了(「严格说它证明的是这个缓存对象 61 天没被重新校验」),写进文档时又把它当成了事实。改成只记录实测到的缓存年龄,并写明要判断停更该查 Vercel 部署记录或产物 build id。

改法

重写成三分法,并指明判断线上状态该看哪一个:

  1. 项目自营的生产实例(权威,看这个);
  2. 自己起的 anet hub dashboard(绑定地址别假设,先看 dashHost 实际取值);
  3. 没有面向外部用户的 SaaS 产品 URL

那个 Vercel 地址标注为「不属于以上任何一种」,并保留(直接删会让下一个人再发现一次)。


一句自评

这是本会话第三次「修 A 类错误时犯 A 类错误」:

三次都不是不知道那个形态 —— 我当轮都在写它。说明"知道形态"对自己的产出不起作用,起作用的是把成品当别人的东西再验一遍。 这三次都是审查替我做了那一步。

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1afa5c5bbd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CLAUDE.md
- Dashboard:**分三种,别混**(这一层最容易判断错,见 `deploy/tunnel/README.md` 顶部的红字警告)
1. **项目自营的生产实例**(权威):`公网 ─ Caddy :3000 / frpc :3100 → 127.0.0.1:3001`
(Next.js,pm2 托管)。拓扑与运维见 `deploy/dashboard/README.md`、`deploy/tunnel/README.md`。
**要判断「Dashboard 正不正常」,看这个。**

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add a retrievable production endpoint

In a repo-only agent context, this instruction still does not make the authoritative instance reachable: both linked runbooks provide only topology, while deploy/tunnel/caddy.example:10 leaves the host as ${PUBLIC_DOMAIN} and deploy/tunnel/frpc.example.toml:12 leaves it as ${FRP_SERVER_ADDR}. Consequently, an agent asked to check whether the Dashboard is healthy cannot determine what URL to probe and may fall back to the explicitly rejected Vercel page; since repository policy also discourages publishing the real domain, document a safe lookup source, command, or responsible deployment owner here instead.

AGENTS.md reference: AGENTS.md:L24-L24

Useful? React with 👍 / 👎.

Comment thread CLAUDE.md Outdated
Comment on lines +64 to +65
2. **自己起的**:`anet hub dashboard`(CLI 走 `npx @sleep2agi/agent-network-dashboard@<tag>`,
见 `docs-site/docs/guide/dashboard.md`)。绑定地址取 `--ip` → `--host` → `$HOSTNAME` → `127.0.0.1`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Qualify npx as only the default launch path

When ANET_DASHBOARD_LOCAL=1 is set, anet hub dashboard does not use the stated npx @sleep2agi/agent-network-dashboard@<tag> path: agent-network/bin/cli.ts:6106-6114 selects the global binary, and lines 6186-6188 spawn it directly. That mode is also operator-managed and has different replacement/version-provenance behavior, so agents diagnosing an explicitly local installation can inspect the wrong artifact based on this unconditional statement; qualify npx as the default and retain the documented environment-variable exception from docs-site/docs/guide/dashboard.md:317-319.

AGENTS.md reference: AGENTS.md:L24-L24

Useful? React with 👍 / 👎.

审查两条 P2,都成立:

1) 我上一版指明了"看项目自营的生产实例",但仓里查不到它的地址 ——
   deploy/tunnel/caddy.example 是 ${PUBLIC_DOMAIN}、frpc.example.toml
   是 ${FRP_SERVER_ADDR},两个 runbook 只给拓扑。于是被问"Dashboard
   正常吗"的 agent 仍然不知道该探什么,还可能退回那个刚被否掉的
   Vercel 页 —— 等于没解决。
   仓库政策不写死真实域名,所以补的是**查法**不是地址:pm2 确认进程、
   Caddy admin :2019 读实际路由(权威,不猜后端)、直连 127.0.0.1:3001
   绕开入口层。不在部署机上就找负责人要,别凭猜测下结论。

2) "CLI 走 npx"是无条件写法,但 ANET_DASHBOARD_LOCAL=1 时会直接 spawn
   全局二进制(cli.ts 的 globalOptIn 分支)。诊断"装的是哪一份"之前
   得先看这个变量,否则会去查错的产物。
@vansin

vansin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

两条 P2 成立,已修(1afa5c5b → be2dbd37)。第一条指出我的修复其实没解决问题。

① 「指明了权威实例,但仓里查不到它的地址」

审查是对的,而且这条最要害。核了两个 runbook:

deploy/tunnel/caddy.example:10      ${PUBLIC_DOMAIN}:3000 { reverse_proxy 127.0.0.1:3001 }
deploy/tunnel/frpc.example.toml:12  serverAddr = "${FRP_SERVER_ADDR}"

都是占位符 —— 仓库政策本来就不写死真实域名。

所以我上一版的实际效果是:告诉 agent「别看 Vercel,看项目自营的那个」,却没给出任何办法找到它。被问「Dashboard 正常吗」的 agent 手里仍然只有那个被否掉的地址,很可能还是会回去点它 —— 等于没解决,甚至更糟(它现在还知道自己不该点)。

补的是查法,不是地址(这样既满足不写死域名的政策,又真的够得到):

pm2 jlist |# 确认 anet-dashboard 在跑
curl -s http://127.0.0.1:2019/config/apps/http/servers   # Caddy admin:实际路由(权威,不猜后端)
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:3001  # 直连上游,绕开入口层

并写明:不在部署机上时不要凭猜测下结论,找负责人要地址。

(实测这条查法可用:Caddy admin 返回的是真实路由表,而不是我从拓扑图里推出来的东西。)

npx 不是唯一启动路径

agent-network/bin/cli.ts
const globalOptIn = process.env.ANET_DASHBOARD_LOCAL === "1";

const dashChild = globalOptIn
  ? spawn(globalBinary!, [], )
  : spawn("npx", ["-y", `@sleep2agi/agent-network-dashboard@${tag}`], );

ANET_DASHBOARD_LOCAL=1 时直接 spawn 全局二进制。我写成无条件「走 npx」,会让诊断「装的是哪一份」的人去查错的产物。已改为「默认走 npx,但先看这个变量」。


这条 PR 到目前的轨迹,本身就是那个失效类的完整样本

版本 症状
原文 指向一个能打开、但不是产品的地址
我的第一版 指向对的东西,但默认到不了(绑定地址)
我的第二版 事实都对了,但没给出到达的方法

三次都是「指引本身走不通」,只是走不通的位置一次比一次靠后 —— 从指错对象,到地址不可达,到对象对、地址对、但读者仍然到不了

共同点:每一版我都验证了引用的对象存在,没有验证读者照着做能不能成功。 这两件事不一样,而我连续三次只做了前者。

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be2dbd3724

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CLAUDE.md Outdated
`frpc.example.toml` 是 `${FRP_SERVER_ADDR}`,都是占位符(仓库政策不写死真实域名)。
**在部署机上按权威来源查,不要猜、也不要退回那个 Vercel 页:**
```bash
pm2 jlist | python3 -c "import json,sys;[print(a['name']) for a in json.load(sys.stdin)]" # 确认 anet-dashboard 在跑

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Check the PM2 status instead of only printing the name

When anet-dashboard is stopped or errored, pm2 jlist still includes its process entry; this pipeline discards pm2_env.status and prints only name, so it can claim to confirm that the Dashboard is running when no live process exists. The repository records this exact PM2 behavior in agent-network/scripts/README.md:14 (pm2 list still shows the app). Filter the matching entry for pm2_env.status == "online" (and preferably a live PID) instead of treating name presence as health.

AGENTS.md reference: AGENTS.md:L24-L24

Useful? React with 👍 / 👎.

审查(#833 P2)指出:pm2 jlist 里停掉/崩掉的应用仍然有条目,而我给的
命令只 print(a['name']),丢掉了 pm2_env.status。于是这条命令声称"确认
anet-dashboard 在跑",实际只证明"它曾被注册过"。
仓里本来就记着这个行为(agent-network/scripts/README.md:14「pm2 list
仍会显示该应用」)。

改成同时打 status 与 restart_time,并加一句:online 之外还要看本次已
连续运行多久 —— 重启次数没有时间跨度判断不了任何事。

这条是我自己两轮前刚做对过的事:那次军团体检我算了 status + 连续运行
时长,还写下"光看重启 35 次会得出错误印象"。然后写进文档的命令两样
都不查。知道一条判据,和把它用在自己下一件产出上,是两回事。
@vansin

vansin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

独立深审:CLEAN(1 条 MINOR,不阻塞)

这条名义上「一行改动」,实际是把 CLAUDE.md 的一行换成 27 行判断指引。
因为 CLAUDE.md所有 agent 当权威指令读的文件,我把它引用的每一条源码事实都核了 ——
不核就等于放行一份会被所有 agent 当默认认知的东西。

源码事实:四条逐条对上

agent-network/bin/cli.ts:6106   const globalOptIn = process.env.ANET_DASHBOARD_LOCAL === "1";
                                → 「ANET_DASHBOARD_LOCAL=1 时改为直接 spawn 全局二进制」成立

agent-network/bin/cli.ts:6104   const dashHost = opts.ip || opts.host || process.env.HOSTNAME || "127.0.0.1";
                                → 文案写的 --ip → --host → $HOSTNAME → 127.0.0.1 **逐字一致**

docs/tests/release-gate-playbook.md:179
                                11. **dashboard binds to hostname not 0.0.0.0**
                                → 「记录在案的发版门坑」属实,不是杜撰

deploy/tunnel/caddy.example:10  ${PUBLIC_DOMAIN}:3000 {
deploy/tunnel/README.md:38      FRP_SERVER_ADDR 与 FRP_AUTH_TOKEN **不入库**
                                → 「仓里查不到实际地址、都是占位符」属实

生产拓扑:我今天独立实测过,与文案一致

文案说权威实例是 公网 ─ Caddy :3000 / frpc :3100 → 127.0.0.1:3001(Next.js,pm2 托管)。
我今天为别的事查过这台机器:

pm2 anet-dashboard → bash ~/.local/bin/dash-start.sh
在跑进程 cwd      ~/.commhub/dashboard-runtime-v56/…/agent-network-dashboard
监听              127.0.0.1:3001   HTTP 307(正常跳转)

与文案描述的一致。 这不是我照着文案去找的 —— 是先测完、后来审这条 PR 才发现对上的。

文案里那条「必须看 status 不能只看名字」的告诫,我可以佐证

它写「停掉/崩掉的应用照样留在 pm2 jlist 里」。今天实测这台机器:

anet-dashboard   online   restarts=35
commhub-hub      online   restarts=13

restarts=35 这个数如果没有「本次已连续运行多久」配着看,确实判断不了任何事 ——
文案紧跟着就写了这一句,是对的。

引用路径:全部存在

新文案引用的 deploy/tunnel/README.mddeploy/dashboard/README.md
docs-site/docs/guide/dashboard.mddocs/tests/release-gate-playbook.md
agent-network/bin/cli.ts —— 逐个 git cat-file -e 验过,全部存在

MINOR(不阻塞)

文案里 frpc.example.toml裸文件名,而同段落里 caddy.example 是带目录写的
(deploy/tunnel/caddy.example)。实际它在 deploy/tunnel/frpc.example.toml

同一段里两种写法不一致,读的人可能去仓根找。建议统一写成
deploy/tunnel/frpc.example.toml

(我第一次检查时正是把它当仓根路径查、报了「不存在」—— 先去 git ls-tree 找了一遍
才确认是路径写法问题而不是死指针。裸文件名在这种「给 agent 看的指令」里尤其值得写全,
因为读它的人不一定有上下文。)

结论

内容侧无异议:每条事实可复验、拓扑与实测一致、引用路径全部存在。
CLAUDE.md 这一层的改动值得这么核 —— 「能打开的错误地址比死链危险」这个判断我同意,
而且这条 PR 自己没有引入新的这类问题。

(只读审查;未改代码、未 approve/merge。)

@vansin

vansin commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

补钉 exact head:上面那条「独立深审 CLEAN」没有引用任何 commit

我在做自查时发现,本 PR 上我那条 独立深审:CLEAN(1 条 MINOR,不阻塞) 没写它针对哪一版 ——
后来人读到它,无法判断它是否还适用;一条无法证伪的判定,和一条过期判定一样有害。

补钉并复核于 head=0e4cb2148c4f96aed9b06dfe162d957d450e49ca,结论仍为 CLEAN,复核证据:

  • 新增行里出现的唯一域名是 agent-network-dashboard.vercel.app,该地址在 CLAUDE.md 里本就是公开信息,不构成泄漏;
  • 其余主机位一律占位符(${...} / <...> 形态 3 处),符合"仓库不写死真实域名"的政策;
  • 新增行里 token/secret/password/api_key 形态 0 处

方法上的说明:判定必须钉 exact head,否则复核者无法比对"判定引用的 head"与"当前 head"。这条是我自己的遗漏,补上。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants