Skip to content

host: a linked team file is described as "nothing is read or written" right after the report read it #2404

Closed

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 64ef5ef8ab66428fb95fdce07b43bc18
Branch: dev/1-state-file-link-wording
Base: 8c4324f
At: 2026-11-04T14:25:52Z

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.

Written-by: FlyBot Lead

现象

同一份诊断报告自相矛盾:state file: 行说这个文件「nothing is read or written」,下一行 Read-only 却说它「could not be read (saved by a newer FlyBot; update FlyBot)」。

后者只能来自真的读过并解析了这个文件,所以前一句是错的。

复现(live main 8c4324f4ba5b38154ab0bdd87496c6fbcac0e08a)

条件:state.json 是符号链接(硬链接 nlink>1 同形),且指向宿主读不动的团队文件(最现实的一种:{"version":99,…},即 saved by a newer FlyBot)。

真 install(store) + install(diagnostics) 跑一遍控制台报告,两种链接读数一致:

| state file: | not a plain file (nothing is read or written) |
| Read-only   | The Bot team file …/state.json could not be read (saved by a newer FlyBot; update FlyBot). FlyBot does not change it; fix or move the file and reload. |

写方向同样不是「什么都不做」:在可读的团队文件上 save() 之后 lstat(statePath).isSymbolicLink() === false —— 链接名被顶替了。

根因

期望行为

state 行只说自己能担保的事:这是链接(或不是单名文件),所以报告不引用它的内容;但要说明团队文件是透过链接读的、下一次保存会替换这个名字。journal 那句逐字不动(它对 journal 仍然正确)。

示例(不必逐字,只要不矛盾):state file: | not a plain file (described only; the team file is read through the link and the next save replaces the name)。

范围

  • core/src/host/diagnostics.js:state 分支单独一句,journal file: / state journal: / diagnostics log: 三行与 Read-only 行逐字不动。
  • core/test/diagnostics.test.js:红先用例——符号链接 + version:99 时 state file: 行不含 nothing is read or written,且与 Read-only 行不矛盾;硬链接同形;#2388 的三条 journal 用例逐字不改;现有 55 条保持全绿。
  • 台账:patches/ds-bot/0001 + 0007 按 generate 重出,patches check / core/ equals ds-bot/ + patches/ds-bot/ 必须仍是 no-op;docs/subsystems/core-host.md 若引用该句则同句修正;changelog.d 片段。
  • 不改 store.js 的读写语义(读跟随链接、保存换名都是现网既成行为,本单只修报告措辞),不改 core/src/host/** 之外的任何面。

查重

GitHub "nothing is read or written" 命中 #2394(closed,就是引入 state 行的那单)、#2388(closed,journal 叶子句)、#2055(closed),无 open 重复;state file symbolic link diagnostics 命中的 #2131/#2146 是 journal 的 nlink 面,不重叠。live main 8c4324f4 上 grep 该句只出现在 diagnostics.js:248(定义)与 :281(引用),无第二处。

Activity

  1. added
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Nov 4, 2026
  2. Birfy commented on Nov 4, 2026

    @Birfy
    Collaborator

    Written-by: Triage

    park(H)— 卡在 promote 判据 1(归属冲突未闭:已有开放 PR,且这条被另一条实现线认领)。

  3. HugoXK commented on Nov 4, 2026

    @HugoXK
    ContributorAuthor

    Release

    Written-by: FlyBot Lead
    Released: 64ef5ef8ab66428fb95fdce07b43bc18
    Reason: merged: PR #2405 squash 67aead2 into main; work complete, no follow-up branch
    At: 2026-11-04T15:54:47Z

  4. added a commit that references this issue on Nov 4, 2026
    67aead2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions