@haiyangbg/buildbeat 2.0.0-beta.1 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,10 +2,17 @@
2
2
 
3
3
  > 本项目吃自己的狗粮(红线④:必更 CHANGELOG)。格式循 Keep a Changelog,倒序。
4
4
 
5
- ## v2.0.0-beta.1 — 未发布(beta-ready,等待所有者发布授权)
5
+ ## v2.0.0-beta.2 — 2026-08-28
6
+
7
+ > 主题:aiplatform-meta(底座)v2 迁移试点抓出的内核修复。
8
+ > **发布状态**:同 beta.1 流程(OIDC Trusted Publishing,dist-tag `next`;`latest` 保持 v1.21.0)。
9
+
10
+ - **fix(v2) 范围门中文路径误拦**:git `core.quotepath` 默认把非 ASCII 路径转义为带引号的八进制串,`listChangedPaths` 直接喂给 allowedPaths 前缀检查导致范围内中文文件被判越界(真实事故:底座 `RUN-META-V2-01` 被 `pm/登录二期看板.md` 阻断)。读回改用 `core.quotepath=off`,中文路径永久回归进 `tests/v2-invariants.test.js`
11
+
12
+ ## v2.0.0-beta.1 — 2026-08-28
6
13
 
7
14
  > 主题:BuildBeat v2 首个 Beta——确定性内核 + Agent Loop Runtime。事件溯源台账(hash 链、损坏截断、终态压实进 Git 面)、Policy 门(8 算子三值逻辑、`UNVERIFIED` 永不当 PASS)、隔离 Workspace(push 物理封禁、`allowedPaths` 越界即停、Reviewer 只读快照强制)、Shell Adapter 厂商中立接任意 CLI Agent(codex 实证)、digest 绑定人批与 `APPROVAL_STALE`。MVP 承诺兑现:Build–Verify–Fix–Review 自动闭环,停在合并决定,带证据交人。
8
- > **发布口径**:`dist-tag: next`;`latest` 仍指向 v1.21.0,v1 CLI 与文件原样冻结随包分发。v2 入口为独立 bin `buildbeat-v2`。
15
+ > **发布状态**:`@haiyangbg/buildbeat@2.0.0-beta.1` 已于 2026-08-28 经 GitHub Actions OIDC / Trusted Publishing 发布到 dist-tag `next`;`latest` 保持 v1.21.0,v1 CLI 与文件冻结随包分发(脚手架束钉 `v1.21`)。v2 入口为独立 bin `buildbeat-v2`。registry exact artifact、SLSA provenance、dist-tag 路由、隔离安装、签名审计均已独立回读,证据见 [`docs/V2.0.0-BETA.1-RELEASE-EVIDENCE-2026-08-28.md`](docs/V2.0.0-BETA.1-RELEASE-EVIDENCE-2026-08-28.md)。
9
16
  > **试点证据**:self-host(RUN-SELF-001)+ 两个外部真实项目(ruoyi-ai RUN-CLI-DW-01 全自动 5.2 分钟到合并决定;chickAI 看板积压含完整 reviewer 阻断→fixer 修复闭环),六退出指标全达标;见 `docs/v2/M4-*.md`。
10
17
 
11
18
  - **observe v0**(RFC-0003 §8 冻结契约的实现):drift-check/live-status 类探针接为 Evidence Provider(采不到即 `unverified`,同一 Evidence Contract 与链校验台账);bands log→只读诊断→Intent 草稿三层分层响应;草稿只入队 Git 面绝不自动执行;`observe triage` 人分诊,`dismiss` 回调阈值防告警疲劳;分诊记忆活在 Git 面,runtime 可删(不变量 23 有测试)
package/docs/CLI.md CHANGED
@@ -128,7 +128,7 @@ Schema 2 is the first write-capable shape targeted by Wave 1:
128
128
  {
129
129
  "schemaVersion": 2,
130
130
  "scaffoldVersion": "v1.21",
131
- "cliVersion": "2.0.0-beta.1",
131
+ "cliVersion": "2.0.0-beta.2",
132
132
  "layout": "default",
133
133
  "installedAt": "2026-08-24T00:00:00.000Z",
134
134
  "files": {
package/docs/RELEASING.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This runbook governs BuildBeat's public npm distribution. The canonical package is `@haiyangbg/buildbeat` in `HaiYangBG1/BuildBeat`; the canonical executable is `buildbeat`, while `solobaton` remains an executable alias. The old `solobaton` npm package is a frozen legacy distribution ID and must not receive the scoped write/upgrade command surface.
4
4
 
5
- Release evidence at source package version `@haiyangbg/buildbeat@2.0.0-beta.1` (v2 beta, dist-tag `next`, pending owner-authorized publication); latest independently verified BuildBeat npm distribution `@haiyangbg/buildbeat@1.21.0`, anchored by annotated tag `v1.21.0` at commit `ce69a05`, workflow run [32864438692](https://github.com/HaiYangBG1/BuildBeat/actions/runs/32864438692), and the matching [GitHub Release](https://github.com/HaiYangBG1/BuildBeat/releases/tag/v1.21.0). Exact registry identity, provenance, signatures, isolated-install readback, Environment approval, and immutable-artifact boundary are archived in [`V1.21-RELEASE-EVIDENCE-2026-08-25.md`](V1.21-RELEASE-EVIDENCE-2026-08-25.md). First-scoped-release bootstrap behavior and legacy deprecation remain archived in [`WP4.3-RELEASE-EVIDENCE-2026-08-25.md`](WP4.3-RELEASE-EVIDENCE-2026-08-25.md). The legacy distribution remains `solobaton@1.16.3`; all three published legacy versions are retained and deprecated toward the scoped package.
5
+ Release evidence at source package version `@haiyangbg/buildbeat@2.0.0-beta.2` (pending publication verification); latest independently verified BuildBeat npm distribution `@haiyangbg/buildbeat@2.0.0-beta.1` (dist-tag `next`; `latest` remains `1.21.0`), anchored by annotated tag `v2.0.0-beta.1` at commit `946d43f`, workflow run [33171071539](https://github.com/HaiYangBG1/BuildBeat/actions/runs/33171071539), and archived in [`V2.0.0-BETA.1-RELEASE-EVIDENCE-2026-08-28.md`](V2.0.0-BETA.1-RELEASE-EVIDENCE-2026-08-28.md). The latest stable distribution stays `@haiyangbg/buildbeat@1.21.0`, anchored by annotated tag `v1.21.0` at commit `ce69a05`, workflow run [32864438692](https://github.com/HaiYangBG1/BuildBeat/actions/runs/32864438692), and the matching [GitHub Release](https://github.com/HaiYangBG1/BuildBeat/releases/tag/v1.21.0). Exact registry identity, provenance, signatures, isolated-install readback, Environment approval, and immutable-artifact boundary are archived in [`V1.21-RELEASE-EVIDENCE-2026-08-25.md`](V1.21-RELEASE-EVIDENCE-2026-08-25.md). First-scoped-release bootstrap behavior and legacy deprecation remain archived in [`WP4.3-RELEASE-EVIDENCE-2026-08-25.md`](WP4.3-RELEASE-EVIDENCE-2026-08-25.md). The legacy distribution remains `solobaton@1.16.3`; all three published legacy versions are retained and deprecated toward the scoped package.
6
6
 
7
7
  ## Release invariants
8
8
 
@@ -1,6 +1,6 @@
1
1
  # v2 迭代 07:M5 闭环起步、迁移与 Beta
2
2
 
3
- > 状态:**beta-ready**(2026-08-28 开工并完成 T1–T4;T5 发布等待所有者单独授权)
3
+ > 状态:**已完成——M5 于 2026-08-28 关闭**(T1–T5 全部完成;`2.0.0-beta.1` 已发布到 dist-tag `next`,发布证据:[`v2.0.0-beta.1 evidence`](V2.0.0-BETA.1-RELEASE-EVIDENCE-2026-08-28.md))
4
4
  > 上游:[`V2-PLAN.md`](V2-PLAN.md) §8 M5;M4 收尾:[`V2-ITERATION-06.md`](V2-ITERATION-06.md)
5
5
  > 时间盒:**≤3 周**;授权边界沿用 `V2-D2=A`(仅本地 `v2` 分支,不含 push、merge、tag、部署);**`npm publish 2.0.0-beta.1` 是独立生产动作,须所有者单独授权后执行**
6
6
 
@@ -16,7 +16,7 @@
16
16
  - [x] **T2 v1→v2 迁移 runbook(半天手工,WP6.2 原则)**:只读分析 v1 → 草稿 → 人工确认活动 Work → 冻结旧看板 → 新工作只进 v2 → 归档不双写 → 一个真实 Run 后才正式切换;装机量 N=1,不写 importer 工具。→ [`guide/08-migration-v1.md`](v2/guide/08-migration-v1.md)
17
17
  - [x] **T3 文档十件套(WP6.3)**:快速开始 / Workflow 编写 / Policy / Adapter / Worker 合同 / Evidence / Human Approval / v1 迁移(=T2)/ 安全与权限边界 / 故障恢复,落 [`docs/v2/guide/`](v2/guide/README.md)。
18
18
  - [x] **T4 Beta 打包准备**:`package.json` 版本 `2.0.0-beta.1`、`bin/buildbeat-v2.js` 入口、`files` 覆盖 `src/v2/`、`pack:check` 通过、v1 全套测试保持绿(v1 只冻结不删除,`latest` 不动)。文档一致性守卫(`tests/check_docs.py`)教会识别 prerelease 版本号(additive),教学快照/CLI 契约/RELEASING 版本联动完成。
19
- - [ ] **T5 发布 `@haiyangbg/buildbeat@2.0.0-beta.1`(dist-tag `next`)**:**等待所有者单独授权后执行**。
19
+ - [x] **T5 发布 `@haiyangbg/buildbeat@2.0.0-beta.1`(dist-tag `next`)**:所有者授权("发布吧,授权也一起")后经 GitHub Actions OIDC Trusted Publishing 完成;prepublish 门抓出并修正 3 个真实缺陷(发布脚本 dist-tag 契约、v1 cliVersion prerelease 校验、SCAFFOLD_VERSION 虚构跨大版本升级);`latest` 未动;独立回读五项全过。证据:[`V2.0.0-BETA.1-RELEASE-EVIDENCE-2026-08-28.md`](V2.0.0-BETA.1-RELEASE-EVIDENCE-2026-08-28.md)。
20
20
 
21
21
  ## 完成定义
22
22
 
package/docs/V2-PLAN.md CHANGED
@@ -283,7 +283,7 @@ v1 的"Skill-only 完整等价"拆成两个承诺分别处置:
283
283
  - v1 迁移改为**半天手工 runbook**(收尾修正三:装机量 N=1,importer 工具砍掉;"不猜旧状态有效性、单向迁移、禁止双写"原则不变);
284
284
  - 文档十件套(B WP6.3);发布 `@haiyangbg/buildbeat@2.0.0-beta.1`(dist-tag `next`)。
285
285
 
286
- > **进展(2026-08-28):beta-ready。** observe v0 按 RFC-0003 §8 冻结契约实现(bands 三层 + intent 草稿只入队 + dismiss 回调;`tests/v2-observe.test.js` 8 项,含不变量 23)并在本仓库真实接入(探针=文档漂移守卫,cycle 1 证据入账);迁移 runbook 与文档十件套落 [`v2/guide/`](v2/guide/README.md);`2.0.0-beta.1` 打包核验通过(独立 bin `buildbeat-v2`,`latest` 不动)。全量测试 139/139。**仅剩 T5 `npm publish`(dist-tag `next`)等所有者授权**;跟踪见 [`V2-ITERATION-07.md`](V2-ITERATION-07.md)。
286
+ > **进展(2026-08-28):M5 完成,Beta 已发布。** observe v0 按 RFC-0003 §8 冻结契约实现(bands 三层 + intent 草稿只入队 + dismiss 回调;`tests/v2-observe.test.js` 8 项,含不变量 23)并在本仓库真实接入(探针=文档漂移守卫,cycle 1 证据入账);迁移 runbook 与文档十件套落 [`v2/guide/`](v2/guide/README.md);**`@haiyangbg/buildbeat@2.0.0-beta.1` 经所有者授权已发布(dist-tag `next`,`latest` 保持 v1.21.0)**,OIDC Trusted Publishing + 五项独立回读,证据:[`v2.0.0-beta.1 evidence`](V2.0.0-BETA.1-RELEASE-EVIDENCE-2026-08-28.md)。全量测试 142/142。跟踪见 [`V2-ITERATION-07.md`](V2-ITERATION-07.md)。
287
287
 
288
288
  ---
289
289
 
@@ -0,0 +1,41 @@
1
+ # v2.0.0-beta.1 发布证据(2026-08-28)
2
+
3
+ > 授权:所有者 Haiyang 于 solobaton 会话逐步授权("发布吧,授权也一起" = npm publish + `v2` 分支推送);执行 = 受托会话。
4
+ > 渠道:**prerelease → dist-tag `next`**;`latest` 保持 `1.21.0` 不动(v1 CLI 与脚手架冻结随包分发)。
5
+
6
+ ## 候选
7
+
8
+ - 源提交 `946d43f`(`v2` 分支 tip),附注 tag `v2.0.0-beta.1`;
9
+ - 本地候选门(prepublishOnly 全链,`FINAL_GATE_EXIT=0`):node `142/142`、scripts `222` 断言、pilot `15/15`、skill-only、plugin `7` 断言、`check:docs` 162 文件、`pack:check`;
10
+ - 静态与卫生:`bash -n`、`shellcheck`、`actionlint`、`gitleaks`(83 提交零泄露)、`git diff --check` 全过;
11
+ - 服务端 CI run `33170945581`:6 job 全 success(3 平台 CLI 矩阵 + 静态 + 脚本行为 ×2);
12
+ - registry 预检:`@haiyangbg/buildbeat@2.0.0-beta.1` 发布前不存在;dist-tags 仅 `{bootstrap: 0.0.0, latest: 1.21.0}`;
13
+ - tag 规则集回读:`Protect release tags` active、`refs/tags/v*`、仅 update+deletion、零 bypass——与 runbook 预期一致。
14
+
15
+ ## 发布道变更(本次随候选进 tag)
16
+
17
+ - publish workflow 新增 **prerelease 通道**:`vX.Y.Z-suffix` tag 只能从其发布分支的 origin tip 发布、强制 dist-tag `next`(`publish-candidate.sh` fail-closed 配对校验),verify job 回读 dist-tag 路由(`next` 指向本版、`latest` 未动);stable 通道 main-only 原样保留;
18
+ - `v2` 分支加分支保护(禁 force-push/删除)以满足 `npm-publish` 环境"仅受保护分支"部署策略;
19
+ - prepublish 门抓出并修正 v1 冻结面的两个谎言:manifest `cliVersion` 拒绝 prerelease(v1 CLI 在 beta 包里自坏);`SCAFFOLD_VERSION` 由包版本派生出虚构的 v1.21→v2.0 脚手架跨大版本升级——现钉死 `v1.21` 字面量,脚手架版本跟内容束、不跟 CLI。
20
+
21
+ ## 发布执行
22
+
23
+ - workflow_dispatch:publish.yml @ `v2`,run [33171071539](https://github.com/HaiYangBG1/BuildBeat/actions/runs/33171071539);
24
+ - `npm-publish` 环境审批(required reviewer = HaiYangBG1):按会话授权以所有者 gh 凭据落章,备注引用授权原文;
25
+ - Trusted Publishing(OIDC,无长期 token);publish job 在 tag 检出上重跑 `npm test` / `check:docs` / `pack:check` 后出包发布。
26
+
27
+ ## 独立回读(verify job + 本地各一遍)
28
+
29
+ - workflow run `33171071539` 双 job **success**(`Publish v2.0.0-beta.1 to npm` + `Verify v2.0.0-beta.1 from npm`:exact-integrity 回读、dist-tag 路由、provenance、隔离安装、`npm audit signatures`);
30
+ - 本地独立回读(不信任 workflow 单方):
31
+ - dist-tags:`{bootstrap: 0.0.0, latest: 1.21.0, next: 2.0.0-beta.1}`——**`latest` 未动**;
32
+ - `dist.integrity = sha512-kFXckWWd16bQJ9vyOmV61CLODEsnlblRlRyb/A/wijiVdlkofcZPje6EYr33HIzlHCZKdjtERfK+gDpA8vuBBw==`;
33
+ - provenance `predicateType = https://slsa.dev/provenance/v1`;
34
+ - 隔离安装(`--ignore-scripts`):`buildbeat --version` = `2.0.0-beta.1`(v1 bin 健康)、`buildbeat-v2` usage 正常、`src/v2/observe/` 与 `docs/v2/guide/` 十件套在包内;
35
+ - `npm audit signatures`:1 package has a verified attestation。
36
+
37
+ ## 边界
38
+
39
+ - 本 beta 不移动 `latest`;`buildbeat`/`solobaton` bin 仍为 v1 行为,v2 入口 `buildbeat-v2`;
40
+ - GitHub Release 以 prerelease 标记发布;
41
+ - 回退路径:npm dist-tag 可回指(`next` 删除或指向后继版本);已发布版本按不变量 1 不可变,不撤包。
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "scaffoldVersion": "v1.21",
4
- "cliVersion": "2.0.0-beta.1",
4
+ "cliVersion": "2.0.0-beta.2",
5
5
  "layout": "default",
6
6
  "installedAt": "2026-08-25T00:00:00.000Z",
7
7
  "files": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haiyangbg/buildbeat",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.2",
4
4
  "description": "BuildBeat: a Git-based, human-gated engineering delivery protocol for humans and AI sessions.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -98,10 +98,19 @@ export function readback(worktreePath) {
98
98
  // Paths changed relative to base: committed diff plus anything dirty in the
99
99
  // tree. Rename lines keep only the new path.
100
100
  export function listChangedPaths(worktreePath, base) {
101
- const committed = git(worktreePath, ["diff", "--name-only", `${base}..HEAD`])
101
+ // core.quotepath=off: git otherwise octal-escapes and quotes non-ASCII
102
+ // paths, which would defeat the allowedPaths prefix check (real incident:
103
+ // a Chinese board filename was reported as out of scope).
104
+ const committed = git(worktreePath, [
105
+ "-c",
106
+ "core.quotepath=off",
107
+ "diff",
108
+ "--name-only",
109
+ `${base}..HEAD`,
110
+ ])
102
111
  .split("\n")
103
112
  .filter(Boolean);
104
- const dirty = git(worktreePath, ["status", "--porcelain"])
113
+ const dirty = git(worktreePath, ["-c", "core.quotepath=off", "status", "--porcelain"])
105
114
  .split("\n")
106
115
  .filter(Boolean)
107
116
  .map((line) => {