Skip to content

docs+ci(rubash#595): API ledger mirror and sync canary — 1.5.0 PLAN row 1 - #560

Merged
caomengxuan666 merged 1 commit into
masterfrom
feat150/ledger-canary
Oct 25, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
feat150/ledger-canary

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

定位

1.5.0 实施计划(PLAN)行 1 落地(niubash 侧):API 定版 S1 / §9 M-0 的台账镜像与同源门。Refs unixwin/rubash#595(本 PR 不关闭任何 issue;合并归后续把关)。

配套 PR(引擎侧台账本体 + tripwire + 配对编译 canary):unixwin/rubash#1536
unixwin/rubash#1536

内容(2 个新文件,零 src 改动)

  • docs/api-ledger.md —— API 台账的 niubash 侧镜像:记录本仓实际消费的 rubash 引擎表面(冻结口径见配套 PR 与台账 §0)。此文件必须与 rubash 仓的同名文件保持字节一致——台账是一个文档、两仓存放,副本分叉即台账失效。
  • .github/workflows/api-ledger-sync.yml —— 新增 job,不动任何既有 job:每个 PR/push 时 clone rubash master 并 cmp 两份台账副本。

引擎侧的执行(符号 tripwire + 把本仓 master 对 rubash 树做配对 cargo check)在 rubash 的 niu-canary workflow 里(配套 PR),信号进引擎 CI 才有意义;本仓既有 CI 的「对 rubash master 构建」保持原样,本 PR 只补台账同源这一半。

台账口径

与配套 PR 相同(同一文档):基线 rubash abd9be95 / niubash b53e6bff;niu 消费面 61 个 distinct rubash:: 路径(6 个文件)、38 个接收者核验的 Executor 方法、机器可检符号块 100 条;计数规则与分层归属见台账 §0/§3。

Canary 演示

演示记录在配套 PR 的 rubash 仓文件 docs/api-ledger-canary-demo.md:删除 builtins::kill::note_console_ctrl_c 使引擎侧 tripwire 变红(rc=1),恢复后全绿(rc=0)。本仓侧的同源门同理:两份台账任一侧单独改动,ledger-sync job 即红。

本地验证(集成时轻量复核)

  • 两仓 docs/api-ledger.md cmp 字节一致(按本 workflow 的相对布局复跑亦一致)
  • rubash 侧 scripts/check-api-ledger.py → rc=0(100/100 在场),--self-test → rc=0
  • 新 workflow 文件 YAML 解析通过;改动文件 CR 计数全 0;git diff --stat 仅 docs/.github,零 src/crates 改动

未跑项(如实标注)

  • niu 全量 cargo check --workspace --locked 未在本机跑(重型构建,按纪律不在本机跑);配对编译的绿证据以配套 rubash PR 的 CI 首跑为准,本仓 CI 的常规构建结果另按其自身口径看。
  • 本片为 docs/CI-only,未跑 niubash 的 cargo 快速环(fmt/build/test)。

The API ledger is one document in two repos: this copy of
docs/api-ledger.md must stay byte-identical to the rubash copy
(it records the engine surface this repo consumes, frozen for the
1.5.0 split). The new api-ledger-sync workflow (new job only)
cmps the two copies against rubash master on every PR/push; the
engine-side enforcement (symbol tripwire + pairing compile of this
repo against the rubash tree) lives in rubash's niu-canary
workflow.
@caomengxuan666

Copy link
Copy Markdown
Member Author

CI 首跑结果(集成方注记):

  • api-ledger-sync job —— 红在 Ledger copies are identical 一步。原因不是内容分叉:该 job clone 的是 rubash master,而台账本体还在 rubash 配套 PR docs+ci(#595): API ledger (M-0) and niu pairing canary — 1.5.0 PLAN row 1 rubash#1536 里、未进其 master,master 侧文件不存在,cmp 必然失败。两份 PR 副本本地 cmp 实测字节一致。
  • 这是双仓同时引入「对对方 master 比对」型 canary 的自举窗口:rubash#1536 合并后,本 PR 的 ledger-sync 重跑即应转绿。合并顺序与窗口期处理归把关决定,集成方不自行合并。

@caomengxuan666
caomengxuan666 merged commit 54ccb2d into master Oct 25, 2026
5 of 12 checks passed
@caomengxuan666
caomengxuan666 deleted the feat150/ledger-canary branch October 25, 2026 04:52
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