Repository navigation
docs+ci(#595): API ledger (M-0) and niu pairing canary — 1.5.0 PLAN row 1 - #1536
Merged
Merged
Conversation
Freeze the engine surface niubash consumes, per the 1.5.0 Session API RFC S1 / section 9 M-0: - docs/api-ledger.md: the section 3.2 consumer census re-measured against rubash abd9be9 / niubash b53e6bff (61 distinct consumed paths over 6 files; 38 receiver-verified Executor methods), with counting rules, tier assignments and target homes per family, and a machine-checkable symbol block (100 entries). Records one census drift: lib.rs declares 18 pub modules at this HEAD, not the 20 the RFC text states. - scripts/check-api-ledger.py: stdlib-only tripwire verifying every ledger symbol still exists in this tree, with a --self-test mode. - .github/workflows/niu-canary.yml (new jobs only): the tripwire, plus a pairing job that compiles niubash master against this tree in the sibling [patch] layout and cmps the two ledger copies. - docs/api-ledger-canary-demo.md: demonstration record -- deleting builtins::kill::note_console_ctrl_c (the hook whose loss once broke niubash master) turns the tripwire red, restoring it returns green. Zero src changes.
Member
Author
|
CI 首跑结果(集成方注记):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
定位
1.5.0 实施计划(PLAN)行 1 落地:API 定版 S1 / §9 M-0 —— API 台账 + 配对 CI canary。Refs #595(本 PR 不关闭该 issue;合并归后续把关)。
定版依据:
docs/design/1.5.0-workspace-and-engine-api.md(RFC)与已定版的 Session API 稿(#1535 入仓)。本行无代码拆分:先把「什么算契约面」从口头冻结变成 CI 机械执行,再开始任何代码搬家。配套 PR(niubash 侧台账镜像 + 同源门):见下方「配套 PR」段(开 PR 后回填链接)。
内容(4 个新文件,零 src 改动)
docs/api-ledger.md—— API 台账初版:niu 实际消费的引擎表面普查与分层归属、目标家园,以及机器可检符号块。scripts/check-api-ledger.py—— stdlib-only tripwire:校验台账符号块的每条符号在当前树中仍然存在(声明模式级存在性检查,是 tripwire 不是类型检查,权威信号是配对编译,台账 §5 已写明)。.github/workflows/niu-canary.yml—— 新增 job,不动任何既有 job:ledger(tripwire + 检查器--self-test)与pairing(兄弟布局下把 niubash master 对本树cargo check --workspace --locked,并 cmp 两仓台账副本)。docs/api-ledger-canary-demo.md—— canary 演示记录(见下)。台账口径(全部实测,规则写在台账 §0)
abd9be95/ niubashb53e6bff(即本 PR 的 base / 配套 PR 的 base)。rubash::路径引用 118 次、并上use rubash::{...}后 61 个 distinct 路径,分布在恰好 6 个文件;Executor 方法经接收者核验 38 个 distinct 方法(get_env以 84 次居首,是台账相对 RFC §3.2 原始计数的一处实质补充,映射上仍归 Tier A variables view)。src/lib.rs为 18 个 pub mod + 1 个 pub(crate) mod;台账 §1 以实测为准,RFC 原文是设计记录未回改。集成时已对当前 master 的src/lib.rs复核:与基线字节一致,导出面未变化。Canary 演示(PLAN 行 1 验收项)
完整记录在
docs/api-ledger-canary-demo.md:在 scratch 副本上删除builtins::kill::note_console_ctrl_c(当年静默消失、打断 niu master 的那个符号)——all 100 ledger symbols present,rc=0MISSING item rubash::builtins::kill::note_console_ctrl_c,rc=1--self-test(伪造符号必须被报缺)通过本地验证(集成时轻量复核)
python3 scripts/check-api-ledger.py→ rc=0(100/100 在场);--self-test→ rc=0docs/api-ledger.mdcmp字节一致git diff --stat仅 docs/scripts/.github,零 src 改动未跑项(如实标注)
cargo check --workspace --locked未在本机跑(重型构建,按纪律不在本机跑);它在本 PR 的 CI 首跑即是其绿证据,请以 CI 结果为准。配套 PR
api-ledger-sync同源门):docs+ci(rubash#595): API ledger mirror and sync canary — 1.5.0 PLAN row 1 niubash#560docs+ci(rubash#595): API ledger mirror and sync canary — 1.5.0 PLAN row 1 niubash#560