Skip to content

fix: correct defects and stale docs found in a full repository audit - #545

Merged
harryisfish merged 9 commits into
mainfrom
chore/repo-audit-cleanup
Nov 11, 2026
Merged

harryisfish merged 9 commits into
mainfrom
chore/repo-audit-cleanup

Conversation

@harryisfish

@harryisfish harryisfish commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

问题

对整个仓库做了一次逐行审查:先以 main d9cd20a9 为基点读完全部受版本管理的源码、测试、脚本、workflow 和文档,再补读其后由 #539、#491 合入 main 的约 1.5 万行(三轮,共 36 个切片)。发现一批确定的缺陷、文档与代码不一致、无引用代码和明显的低效路径。

范围

只包含结论确定、修法局部、不改变协议、数据格式和产品行为取舍的修复。需要设计取舍的问题不在此 PR 内,另行交给仓库所有者评审。delivery 相关的修改额外从严:任何会改变链上交易内容、顺序、批次选择或重试策略的修法都没有做。已合入最新 main 4ca16a8d。

主要修复:

  • Core:先准备数据目录再打开日志,已存在的空目录不再启动失败;start_over 失败时清理暂存目录;wallet backup 目标已存在时不再删除既有文件;对端确认能发送后才创建附件暂存文件;Cursor 续做链不再丢掉根 work;公益发送方过保留期后停止轮询。
  • Core 效率:工作区回放只为任务分配计算因果祖先;周期性对账只读取未完成的 work 和待发的派发;前缀查询改为主键范围;delivery 容量统计只读取需要的行。
  • Crates 与 CLI:Cursor 模型目录只把形似凭证的环境变量值当密钥;进程组 0 和 1 报告为未运行;Windows 从返回的错误读取打开进程的错误码;vibeface bots 的写命令遵守 --url。
  • 客户端:桌面端站内跳转使用已挂载的 router;频道页记住的收件 Bot 失效时回到协调 Bot;新频道表单打开时才挂载;保存失败时保留外部聊天密钥;两条已读路径发送一致的参数。
  • 构建、CI 与脚本:官网镜像不再复制不存在的目录;CI 选择器补上 secure 与 secure-ffi 的下游;preflight 覆盖 secure-ffi;部署自测在经符号链接到达的临时目录下也能通过;公开摘要校验器认识预付批次的事件与字段;受保护验收的宿主被终止时会停掉容器;忽略 Python 字节码。
  • 测试:修复 main 上两个在 Windows 确定性失败的 delivery 测试(删目录前关闭 SQLite 连接);二十余条永远通过或测不到目标的断言改为真正验证行为;补上 Cursor 续做链的回归断言;给可能挂死的等待加上限;停止向系统临时目录泄漏目录。
  • 文档:bootstrap 地址、日志事件名、界面文案、平台列表、设计文档的工具门控表与事件形状、e2e 与 CI 验收步骤、发布与部署说明改成与代码一致。
  • 依赖:ctutils 升到修复常量时间缺陷的 0.4.4;仓库四个 Cargo.lock 均通过 --locked 校验。
  • 清理:删除无引用的依赖、导出、分支、辅助函数和只在测试下编译的生产函数。

需要评审者知道的口径变化

  • 更新器不再声明支持从未发布的 x86_64-apple-darwin。Intel Mac 上自建二进制的报错文案随之变化。
  • Cursor 模型目录的密钥回显防护从“任何环境变量值”收窄为“形似凭证的值”,与仓库其他脱敏口径一致。
  • 公益发送方订单过保留期后走现有错误路径停止,而不是继续轮询。

验证(头提交 c0a54ecb)

  • 扩展 CI(手动 ci,desktop=true,run 42922055526)在本提交上全部成功,共 27 个 job,含 ci-gate:Rust 快慢测试与检查、delivery、web、www、crypto-web;四个平台打包(Linux x64/arm64、Windows x64、macOS arm64)与真实进程验收;npm 包与四个平台的 npm smoke;macOS 与 Windows 桌面端真实测试;Windows 原生 Rust(bridge、core、cli)与 Windows 打包进程。
  • 移动端原生构建(手动 ci,mobile_apps=both,run 42907263185)在 e23b8ae1 上成功:Android APK 与 iOS 设备构建。其后的提交只改了文档、一条网页测试断言、vendor 来源清单的一个无用字段,以及把 ctutils 升到 0.4.4 并更新两个锁文件。
  • Windows:main 4ca16a8d 上同一原生检查失败(run 42895067962,两个 delivery 测试),本 PR 修复后通过。
  • 本机(Rust 测试在 c0a54ecb 的内容上重跑通过;其余在 e23b8ae1):fmt、clippy 干净;Rust 测试 0 失败(core 713 + 6、CLI 82、bridge 33 + 10 + 9、control 17、delivery 18、secure 69 + 8、protocol 2);网页单测 378、共享客户端 201、桌面端 140;六个脚本自测(Python 3.13)通过。默认网页 e2e 在 392b659f 上 5 个文件 6 个用例通过。
  • 关键测试修复做了变异验证:把被测逻辑临时改坏后,对应测试失败。
  • 两次独立审查(第一轮修复;第二到四轮修复):均无 P0、P1。第二次指出的一处文档错误和一条被误删的断言已在本 PR 内更正。

未验证

  • 未在 iOS、Android 真机或模拟器上运行应用(只验证了原生构建);Linux 桌面端没有真实测试 job。
  • 付费 e2e 选择器的修改、受保护验收的 SIGTERM 处理和公开摘要校验器的新字段只由脚本自测覆盖,未跑真实付费验收。

状态

实现与验证完成,等待所有者评审。负责人:harryisfish。合并需所有者明确授权。

Core: prepare the data directory before opening the log so an existing
empty directory initializes; clean the staged directory when start-over
cannot swap it in; keep an existing file when a wallet backup target is
already there; stage an attachment only after the source agrees to send
it; walk the Cursor continuation chain without dropping the root work;
stop charity senders polling past the retention deadline. Compute a causal
basis only for task assignments during workspace replay, read only open
works and pending dispatches on periodic passes, and replace LIKE prefix
scans with key ranges.

Crates and CLI: treat only credential-shaped environment values as secrets
in the Cursor model catalog, report process groups 0 and 1 as not running,
read the Windows open-process error from the returned error, make
`vibeface bots` honor --url, and stop advertising updates for the
unpublished Intel macOS target.

Clients: use the mounted router for desktop navigation, fall back to the
channel coordinator when a remembered recipient is gone, mount the new
channel form on open, keep the webhook secret when saving fails, send the
same acknowledgement parameters from both read paths, and fix the www
image build, a paid e2e selector and the desktop e2e token comparison.

CI and docs: check dependents of secure and secure-ffi, cover secure-ffi
in preflight, ignore Python bytecode, and align documentation with the
current bootstrap address, invite tickets, log events, interface copy and
deployment behavior.

Remove dependencies, exports, branches and helpers that nothing uses, and
make several always-passing tests assert behavior.
@harryisfish
harryisfish force-pushed the chore/repo-audit-cleanup branch from 32fefba to 20340a8 Compare November 10, 2026 18:20
@harryisfish
harryisfish marked this pull request as ready for review November 10, 2026 18:39
… docs

Sign the over-deep event as its author so the hop limit is what rejects
it, assert the signature failure when a bot edit's version is forged, run
the desktop update mismatch case with the installed package it describes,
and cover the Cursor continuation lineage that falls back to the root
work's directory. Bound test waits that could hang, stop manager tests
leaking temporary directories, and drop assertions on a removed route and
on text and components that no longer exist.

Remove an opencode helper that only compiled under test together with the
two tests of it. Update the design, App Server and e2e documents to the
current tools, events, question projection and single desktop window.
# Conflicts:
#	packages/docs/ci.md
#	packages/docs/node.md
#	packages/docs/service-deployments.md

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

本轮对照 main @ 4ca16a8d 看过这个 PR。它已经是 Ready,且 GitHub 显示可合并,没有 schema / migration / DATA_EPOCH / SQL 夹具改动。

Graph::record 里对非 AssignTask 命令跳过祖先步历史是安全的性能修改:apply() 只在任务分配里写入 basis,其他命令之前那步计算也会被丢掉。open_work_records / pending_dispatches 同理,调度循环本来就在过滤 finished 和非 pending。

这轮不能自动压缩合并:

  • 开发分支 PR 不跑 GitHub Actions,statusCheckRollup 为空。
  • 本环境只有 rustc 1.83,跑不了 workspace的 edition 2024 测试,无法独立重跑你写的 Core/CLI 结果。
  • 这个 token 对受保护的 main 没有 merge/push。
  • 与仍在推送的 #544 有大约 40 个文件重叠;#544 含 schema,若要合,应该先合这个 PR,让 #544 再 rebase。

不改 Ready 状态。拥有者若接受你已经跑过的本地验收,可以直接合。清理轮次没有另开竞争的整库清理 PR;不重复的桌面端上限去重在 #546。

View PR

Open in Web View Automation 

Sent by Cursor Automation: Vibeface 清理

Release the SQLite store before two delivery tests delete their directory,
which Windows refuses while the file is open. Resolve the temporary
configuration path in the deployment self-test so it passes where the
temporary directory is reached through a symlink.

Teach the public summary checker the budget events and fields that the
small experiment now produces, stop the protected acceptance container
when its host is terminated, and make the proof collector's negative cases
reach the code they describe. Read only claim bodies when counting stored
capacity and remove two chain helpers nothing calls.

Align the CI, release, deployment, e2e and paid delivery documents with
the scripts they describe.
Zeroize two buffers that hold receiving key material, cover the Cursor
catalog credential check with a test, drop a data directory check the CLI
service command repeated after inspect, keep two delivery store helpers
test-only, write a proof test's scratch file under the ignored repository
directory, remove an unused contract ABI override and ignore .DS_Store.
A workspace task runs as an agent task, which is not offered the wake
tools. Restore a negative assertion on the native title material that an
earlier commit on this branch removed although the component still exists.
Dropping the unused rand_core feature from the workspace ed25519-dalek
dependency left the probe fixture's own lock file out of date, so its
--locked build failed in the Linux package job.
Pick up the patch release that fixes a constant-time defect, in both the
workspace lock file and the delivery probe's. Drop a fetch status field
from the vendored verifier source list that nothing reads, and state that
the small experiment's proofs are bounded by the work item deadline, not
the Node's per-proof limit.
@harryisfish
harryisfish merged commit b5b0aa7 into main Nov 11, 2026
30 checks passed
@harryisfish
harryisfish deleted the chore/repo-audit-cleanup branch November 11, 2026 03:30
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.

1 participant