Skip to content

Releases: SquabbyZ/peaks-loop

4.1.26

Choose a tag to compare

@SquabbyZ SquabbyZ released this 30 Oct 02:17
chore(release): sync the version constants with 4.1.26

`scripts/bump-version.mjs` moves `package.json#version` and the
workspace package manifests, but the two SOURCE constants are written by
`sync-version` during the BUILD — `packages/peaks-loop-shared/src/
version.ts` (CLI_VERSION) and `packages/peaks-loop-internal-runtime/src/
index.ts` (RUNTIME_VERSION). The 4.1.26 bump was committed without a
build afterwards, so those two files still read 4.1.25 while the root
manifest read 4.1.26, and the version-parity gate failed on it:

  tests/unit/runtime/cli-version-lockstep.test.ts
    expected '4.1.25' to be '4.1.26'
  tests/unit/release/version-parity-gate.test.ts
    '::error title=CLI_VERSION drift::…'
  tests/unit/publish/lockstep-three-packages.test.ts

This is the same class the release workflow's own "Verify peaks-loop-shared
tarball CLI_VERSION parity" gate exists to catch — the gate was right and
the tree was wrong.

The 4.1.25 tag was NOT affected: its tree carried 4.1.25 in all three
places, so its publish was not blocked by a version drift.

4.1.21

Choose a tag to compare

@SquabbyZ SquabbyZ released this 25 Oct 09:14

版本级别:候选 patch(沿用常设规则"默认版本新增采用最小的版本位")。本次没有改 fail-open 策略、
没有动 auto-compact 三档阈值,peaks-code 的 11 步工序与 Gate A–G 一字不改;改的是一个度量的口径、
两个门禁的诚实性、CI 的一个咨询性作业、一个算错单位的守卫,以及版本号本身。

一句话:peaks observability 之前把 QA 自己的内部迁移当成了"返工循环"数出来,于是 108 个切片里有 82 个
"超了帽"。这一版把它数对了 —— 真正超帽的只有 1 个。

1. 缺陷:返工循环数的是 QA 的内部迁移

旧口径数的是每一条 detail.artifactRole === 'qa' 的 slice-transition 事件。那是 QA 阶段内部的迁移,
和"RD 被打回去重做"没有关系。四个各自独立的缺陷叠在一起:

# 缺陷 实测
1 数的是 QA 内部迁移 与返工无关
2 一次迁移发两条事件 约 8ms 间隔,其中一条没有 detail.from
3 detail.from 不可信 仅 606/1102 存在,其中 395 条与事件顺序矛盾 ⇒ 绝不读它
4 qa-handoff 是 RD 的状态 正常收尾 verdict-issued→qa-handoff→handed-off 是快乐路径,不是返工

实测对比(10 个会话目录、108 个切片、1102 条事件):

口径 ≥cap(3) 的切片 分布 峰值
旧(QA 事件计数) 82 / 108 0:11 1:1 2:14 3:2 4:50 5:12 6:5 7:2 8:7 9:1 11:2 24:1 24
新(返工循环) 1 / 108 0:93 1:13 2:1 5:1 5

唯一真正超帽的那一个,序列是真的:implemented→qa-handoff→running→verdict-issued→implemented→…,五轮。

2. 度量版本化:v2 与 v1 并列,不让新旧数被静默对比

  • metricVersion: 2;旧计数保留在 legacyQaEventCount 下,capHitCount 用 v2。
  • 返工循环的判定:QA 阶段后回到 RD 工作态(draft|spec-locked|implemented)才算;一次返工只计一次;
    重复发射折叠;绝不读 detail.from;纯 QA 往返单列为 QA rounds,不混进返工。

3. 新命令与可复算的基线产物

  • peaks observability repair-cycles --all-sessions --json
  • peaks observability baseline [--write|--check] → .peaks/observability/results-baseline.json

基线行只用率与峰值;人口描述被单独隔离并注明"不得作为门禁",产物里写明 ciEnforceable: false
及其原因(观测数据在 gitignored 的会话空间里,CI 拿不到,硬接只会造一条假门禁)。

4. 没测过的门禁,必须说"没测过"

Phase A benchmark 门禁从二态改成三态:

状态 退出码 passesGate
measured-and-passed 0 true
measured-and-failed 1 false
not-measured 3 null
runner 报错 2 —

旧的 passesGate: false 既可能是"测了没过",也可能是"根本没测",读者分不出来,而根因恰恰是零次测量。
现在未决绝不等同于通过。runner 也拒绝把 --out 指向记忆库(exit 2)—— 它以前每次运行都会往
.peaks/memory/ 里写一份 _TBD_ 存根,覆盖掉平台预留给人类真实测量的那个文件。

5. 一个算错单位的守卫

peaks-loop-internal-runtime 的 resource-budget 守卫里,process.cpuUsage() 返回微秒,
而旧式算法 /1e6 × 100 得到的是厘秒。于是 maxCpuPct: 5 实际约束的是 50 毫秒 CPU,不是 5%。
现在 cpuPct 是占单核百分比,另出 cpuCentiseconds 字段,字段名与 Sample 形状保持不变。

6. CI 增加一个咨询性作业

changed-tests-subset:只在 PR、只在 ubuntu、continue-on-error: true(咨询性,不挡合并)、
fetch-depth: 0 + 显式 merge-base、PEAKS_VITEST_MAX_WORKERS: 4、timeout-minutes: 60。
权威门禁仍是全量 test 作业。

7. 这次发版带走了什么

v4.1.20..HEAD 的 44 个改动文件里,13 个真正进入已发布产物(12 个经 src/**→dist/**,
1 个是 peaks-loop-internal-runtime);dist/ 占 tarball 2889 条目中的 2670(92.4%)。
发版影响面按输入集算:展开 package.json#files 白名单得直发集,再补上 src/**→dist/** 与
packages/**→内部包 的间接集,最后排除发布元数据。

8. 版本号本身

包 从 到
peaks-loop 4.1.20 4.1.21
peaks-loop-shared 0.0.109 0.0.110
peaks-loop-mut 0.1.74 0.1.75
peaks-loop-shared-channel 0.0.77 0.0.78
peaks-loop-internal-runtime 0.0.60 0.0.61

4.1.20

Choose a tag to compare

@SquabbyZ SquabbyZ released this 25 Oct 02:58
chore(lint-baseline): one more file the ceiling has to know about

The lint baseline is a ceiling, not a report: it records what this
repository is allowed to have, so that anything that introduces more has
to say so out loud. Regenerating it after this batch is therefore a
measurement, and the measurement is one line.

The new guard test is a test file, and test files sit outside the scope
the baseline enforces, so it has no row of its own. What it does have is
a place in the shadow block, which accounts for the counted files that
are deliberately not gated. That count moves from 881 to 882, because
there is one more file in the repository than there was.

Everything else is identical. The findings stand at 767, the errors at
257, the over-cap files at 34, the excess lines at 11430. The ceilings
that are enforced did not move up and did not move down, and the run that
produced them says so in those words: every ceiling held.

The timestamp changes too, because the artifact records when it was
measured. That is the only other difference in the file, and it is the
reason this is a separate commit rather than a note appended to the fix:
a baseline measured against a tree that does not exist yet would be a
measurement of the wrong thing.

4.1.16

Choose a tag to compare

@SquabbyZ SquabbyZ released this 22 Oct 08:22

4.1.16

4.1.8

Choose a tag to compare

@SquabbyZ SquabbyZ released this 19 Oct 08:03

4.1.8 — 2026-10-19(24h backlog 清扫:25 个切片,棱镜与证据链收紧,测试判定重新成为代码属性)

版本级别: 未发布区间 v4.1.7..HEAD 共 57 个 commit(5 feat / 14 fix / 2 refactor / 3 test / 1 ci / 31 docs / 1 memory)。取 patch,依维护者 2026-07-22 的常设规则"默认版本新增采用最小的版本位"。本版无破坏性 CLI 变更;有两处刻意的行为收紧(config 请求的 security review 现在按 rid 分文件;reviewer 的 schemaPath 缺失会在 provider 调用前拒绝),升级路径均已覆盖。

1. 证据链与前置条件(4f15ccaf、3ad4aef4、bd559bc4、2468133e、fbb98dc9)

  • 缺失与存在但不合法被区分:前置条件检查现在返回 absent / body 两种 kind,LINT_GATE_FAILED 点名具体 artifact 与行号,不再让"文件不存在"和"文件在但内容不合规"共用一句报错。
  • - type: / - state: 在作者时校验:角色感知的取值校验,缺失 - state: 行也会被 lint 抓住;request init 写出裸 token,feature (…) 这类括注不再能通过。
  • getSessionDir 真正执行单段契约:a/b 不再被当作合法 session id,34 个调用点不受影响。
  • rd/security-review.md / rd/third-party-review.md 按 rid 分文件:两个切片在同一次会话中不再互相覆盖;裸路径保留为 back-compat legacy 层。

2. Third-party reviewer(64238afa、bedfb7af、e5f839cb)

  • skip 不再伪装成 passed: true;peaks reviewer config 有完整的 flag 驱动面,status 区分未配置 / provider 不足 / 已配置。
  • THIRD_PARTY_REVIEW 解析 rd/third-party-review-<rid>.md;producer 在第一次 mkdir 前用 REQUEST_ID_PATTERN 校验 rid;commit-leg 接受清单按 declared 路径键控,并接受该行自己的 legacy 层作为同 until 的别名——v4.1.7 播种的旧清单不会被升级打断。
  • distinctFromKarpathy 两侧都把 skipped/空视为"无可比 family";schemaPath 变为真正读取项:绝对路径 → 项目副本 → 包内副本,全部缺失时在调用 provider 前以 SCHEMA_MISSING 拒绝并列出所有候选,status 报告获胜路径与来源。

3. Lint 与策略(f4809134、6b733390、cd3f5637)

  • eslint 的 dot-directory 不再静默跳过;peaks lint --config 与 lint baseline --baseline-file 的读/写路径一致;空作用域有显式 EMPTY_SCOPE 而非静默零。baseline 只减不增的棘轮保持,三个切片期间曾两次拒绝上涨。

4. Dispatch / job(8fec96be、ad3a72a2、aee3532d)

  • --isolation container 恢复真实退出码与 JSON envelope(child.unref() 推迟到 close)。
  • job subagent-cleanup 只在真正收尾了 ledger 行时报告 cleaned:true。
  • --from-dag 校验每个节点的 role。

5. Release 与模板(59867889、41073d7a)

  • readReleaseState 对未知 stage 失败关闭。
  • QA 模板在 openspec/changes/ 缺失时渲染 - N/A — …,不再把无法填写的 <id> 段交给 QA 再因未填而拒绝;目录存在时保持原文。

6. 测试判定成为代码属性(b6174b8c)

  • daemon spawn lock 的真实 bug:writeFileSync({flag:'wx'}) 是先建后写,并发读者把零字节 body 当 stale,删除活锁后各自起一个 daemon。现在"年轻且不可读"视为持有,回收是原子 quarantine rename + moved-body + own-create 校验,还原用 COPYFILE_EXCL,release 不删不属于自己的年轻锁。
  • 六个负载敏感测试:四个按文件超时、walker 只排除自己的临时 fixture 树、staged-size-leg 的判定改为 judgeChangeSet(非空但全在策略外的变更集与干净树同义),并带 synthetic 输入与 throwing control——回退修复在干净 checkout 上也会变红。

7. CI(ec477874)

  • ci.yml 的七个 job 全部设置 timeout-minutes(20–60),不再继承 GitHub 的 360 分钟默认。

8. 文档与记忆(df379817、83373f67、15ba24bd、92b17867、664de2b5)

  • docs/superpowers/** 的历史计划文档显式豁免引用完整性;.peaks/memory/ 的 36 个指针类 / 47 处机械修复(skill 迁移、mut 包抽取、integration/ 缩写)。
  • security-audit SKILL 写明 --judged 循环的终止条件(先冻结 src/、审计最后、修复后只重跑一次、其余记为 accepted residual)。
  • backlog 增加 ## Decision record — 2026-10-19:meta 层保持冻结、体积债只维持 ratchet、integration 不进入默认配置、覆盖率地板等首个全绿 CI、中文 README 为权威;其余残余逐条写明接受理由。

4.1.6

Choose a tag to compare

@SquabbyZ SquabbyZ released this 17 Oct 17:21

4.1.6 — 2026-10-18(三类闸规则收紧:配置路径的 reader、skip 允许列表、声明类型;两个 refactor 切片被自己新增的规则抓住)

版本级别: 未发布区间 v4.1.5..HEAD 共 38 个 commit(2 feat / 11 fix / 3 refactor / 7 chore / 8 docs / 4 test+style)。取 patch,依维护者 2026-07-22 的常设规则"默认版本新增采用最小的版本位"。本版含两处用户可见的行为收紧,按 4.1.5 的先例明写:声明为 docs/chore/config 的请求不能再携带产品源码;config 不再能通过 skip 记录跳过它的 QA 阶段。

1. 声明类型第一次被改动内容佐证(f7de7828)

前置表由 rid 的声明类型选择,而没有任何东西检查类型与 diff 是否一致——一个标成 chore 的请求可以改运行时代码并通过提交闸。现在 docs/chore/config 的请求若触及 src/** 或 packages/<name>/src/**,会在 rd:implemented、rd:qa-handoff 和 rd:handed-off 被拒绝;工具链路径(scripts/、tests/、.husky/、配置、lockfile)不受影响。规则与 file-size 棘轮共用一次 git 枚举(-z + --relative),非 ASCII 路径不能借 C-quote 逃过 src/ 判定。原建议"把 checkTypeSanity 接到提交腿"被测量否决:它对 chore 只与纯 lockfile 一致,会拒掉本仓库自己的基础设施切片;提交腿也没有 rid↔commit 绑定。

这个切片被它自己的规则抓住了:它声明 chore 却改 src/,于是重定向为 refactor,走完 handoff / code review / security / perf / QA 的完整证据链,而不是给自己开豁免。perf 在 qa-handoff/handed-off 记了一个 block(+2 次 git spawn,约 126 ms 一次性),为关闭"implemented 之后再加 src/ 变更"的窗口而显式豁免并记录。

2. skip 允许列表从 QA-free 类型派生(98614528)

SKIPPABLE_TYPES 此前是手写列表 ['docs','config','chore'],而 typeRequiresQaPhase('config') 为 true——一条本地 skip 记录可以跳过 config 本来要求的 SECURITY_REVIEW 与 TEST_REPORT。现在 QA_FREE_TYPES = VALID_REQUEST_TYPES.filter(t => !typeRequiresQaPhase(t)),允许列表就是它(今天 docs + chore),config 退出。读路径还拒绝写入侧不可能产生的记录:空 reason、空/未 trim/含控制字符的 gate 名(C0/DEL/C1)、控制字符字段;坏记录读成 null,闸照常执行。署名行改成 "record says applied by …"——它是自述,不是证明。

3. 配置路径的 reader 不再在复合 diff 里消失(43f3cc51)

分类器只看映射决定网:一个不映射到任何测试的路径既不触发全量回退,也不扩大子集。.gitignore + src/ 因此会跳过读根 .gitignore 的 tests/unit/workspace/top-level-change-id-guard.test.ts——用线上分类器扫全部 2246 个非空提交,9 个提交就是这个复合形状。落地的是一条声明映射(.gitignore、pnpm-workspace.yaml)+ /^\.gitattributes$/ 全量触发器(它没有根 reader,记下的映射指向的测试只把键写在注释里)。arm 要求一行非注释代码同时命名键、带读/join 调用、绑定 REPO_ROOT、且不带写调用;红控包括注释-only、临时根读取、写操作和缺失的 reader。

4. 两个"把崩溃/竞态读成通过"的修复(988c6197、1cba9312)

  • format 棘轮把 prettier 崩溃读成干净树:typeof '' === 'string' 让 exit 1 + 空 stdout 返回 '',腿打印 0 unformatted file(s) + held。现在只有 prettier 确实列出了文件才返回列表。
  • 树扫描器在文件消失时杀死整个测试文件:ENOENT 发生在枚举与读取之间,而扫描在模块作用域运行,失败是 (0 tests)。现在只容忍 ENOENT,并报告 listed/read/vanished,缺口可见而不是被吞掉。

5. 其余已落地

  • A–F sweep 的闸改进:.github/ 与 .husky/ 成为全量触发器(af8f8053);GATE_GUARD_SUITES 的根层按规则并入每个子集(27a85b7f);src/ 的每一段都映射到 tests/unit/<area>,130 个孤儿测试降到 6 个且逐个记录(7fa29669);类型表决定 QA 相位(d62eda51)。
  • CI 与门禁:覆盖率地板成为 CI 可执行的棘轮(87b76fa3);coverage 地板测量它记录的人口(b1c5c89e);一个要求 100% 且无人调用的门被移除(888fb3e9)。
  • CLI:peaks scan best-practice 可以真正查阅文档(195f573b);VM isolation 表面(从未运行)被移除(0172d89f);路径守卫判断目录本身而不是调用者的拼写(82c6f384)。

已知残余(记录,不粉饰)

  • ③c 的反向不可发现性(未在映射中的 reader)、tooling 路径的误标、skip 记录 provenance 不可验证。
  • 13 个 A–F 的 RD 工件停在 implemented——grandfathered;现在回溯关闭会触发 ③c。
  • ③c 的 perf block 已显式豁免;③b 的安全/文档 LOW 已记录。
  • 4 个 workspace 包随根版本各 +1 patch(internal-runtime 0.0.46、mut 0.1.60、shared 0.0.95、shared-channel 0.0.63),CLI_VERSION 与 RUNTIME_VERSION 由 scripts/sync-version.mjs 同步。

4.1.4

Choose a tag to compare

@SquabbyZ SquabbyZ released this 10 Oct 08:34

4.1.4

4.1.3

Choose a tag to compare

@SquabbyZ SquabbyZ released this 09 Oct 17:13

4.1.3

4.1.2

Choose a tag to compare

@SquabbyZ SquabbyZ released this 08 Oct 06:28

4.1.2

v4.0.34

Choose a tag to compare

@SquabbyZ SquabbyZ released this 09 Sep 14:13
chore(release): bump to 4.0.34 — mode consolidation + auto-compact de…