Repository navigation
feat: tiered release-notes visibility (#1870) - #1873
Conversation
The self-updater is a silent courier on native lanes: 'Restart to finish' only reaches a log file, so disk runs new while the process runs old for days. Ship a tiered, model-written release-notes channel and surface it where users and agents actually look. - src/update-notes.ts: watcher for the companion package billion-context-release-notes (same mechanics as advisories/, #1481): fetch + cache only, never installs. Derives the user-side span (every release strictly newer than the running version) and the restart-pending signal (disk newer than running). - Surfaces: acp_status 'UPDATE READY/AVAILABLE (instance-level)' section with the full span; /acp panel one-liner before the footer (same stripper-safe slot + $-escape as the #1577 advisory line). Clean installs stay byte-identical to pre-#1870 output. - release-notes/: companion payload (schema 1; routine|recommended tiers, model-written summaries, newest-first, cap 20) + process README. - .github/workflows/release-notes.yml: validate + publish the companion package on release-notes/** pushes (mirrors advisories.yml, version churn handled by CI). - Release gates (#1870): release-manual.yml checks the entry at dispatch time, release.yml re-checks before tag/publish — a stable release without a tiered entry fails the run. Prereleases exempt. - Config: releaseNotesCheck (default ON, env BILI_RELEASE_NOTES_CHECK) + releaseNotesUrl (BILI_RELEASE_NOTES_URL); documented EN/zh. Fixes #1870
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.1868-pr.1873.219f2b3This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr1873.tgz
npm install -g packageInstall instructions are refreshed on each push. |
PR #1873 review 完成(head ① 原 issue(方向关)对照设计 #1870 逐条核对,三部分实现到位:
② 回归审查(既有行为清点)
③ 代码审查发现
处置说明:六条都能在本分支合并前一个 commit 内解决,故不单独立项(loop guard);按你「review-only」指示,我不直接推分支,留你处置。 ④ 测试有效性6 个测试都有牙:解析契约(bad-entry 跳过 vs broken-doc 报错 vs 空 feed 合法)、span 语义(严格新于/升序/非法 base 安全)、可见性矩阵(pendingRestart 压倒一切;仅 recommended 也显示;clean/garbage 不可见——钉住验收标准)、措辞字节稳定、两表面内容 + clean-state 字节缺席、面板位置/footer 唯一性/$& 存活。回归捕获力:gating 松动(visible 恒真)→ clean-state 测试抓;$-escape 退化 → dollar-summary 测试抓;span 排序翻转 → spanNotes 测试抓。缺口(不阻塞):没有驱动 ⑤ diff 整洁度单一线性 commit,13 个文件全部与本 PR 目的直接相关,无跑题文件、生成物、lock 漂移或空白噪音。干净。 结构化七问
判定修掉发现 1 后可合并((a)/(b) 任选;想要脚本化活状态就选 (b))。发现 2/3/5 为 nit,顺手修或留后续均可;发现 4 需你确认范围;发现 6 为流程建议。整体质量高:机制与 #1481 逐行同构、gate 位置正确、字节不变性有测试钉死、CI 全绿含四条真实 lane e2e。 |
) The 'Verify release-notes entry' step ended its node -e double-quoted script with a stray backslash-quote (\\\" ), which bash parses as a literal quote INSIDE the script, leaving the -e string unterminated. Result: 'unexpected EOF while looking for matching quote', the step fails for every stable release before tag/publish, and node never runs. Both gates (release.yml before publish, release-manual.yml at dispatch) were affected; the PR's own green CI never exercised them because those gates only fire on a master release-branch merge/dispatch. Fix: drop the backslash so the -e string closes cleanly and $VER is passed as argv[1]. Verified end-to-end by extracting each real run block and executing it: present version -> exit 0 ('entry ok'), absent version -> exit 1.
PR #1873 审查完成。结论先行:可合并 —— 三件事都打到根因、回归面干净、测试有牙。审查中发现 1 个阻断发版的缺陷,已按「小问题直接修」推回分支(commit ① 方向关:issue 要的是"例行更新从哑巴快递变成可见+可行动"。方案 = companion-package(沿用 advisory #1481 机制)+ 只读 watcher + 两个按需状态面,不打 wire/不自动重启/不动更新判定 —— 完全命中边界与非目标,修的是"可见性缺失"这个根因而非贴补丁。✓ ② 回归关(逐项过触碰路径的既有行为):
③ 代码关:fail-open 贯穿(fetch/parse 出错只 warnOnce 不阻断);garbage diskVersion fail-closed(不 crash、不误报 pending);span 严格 newer+升序; ④ 测试有效性:真测试、断言有牙。清洁态两面"字节缺席/无更新行"有钉;panel footer「恰好一次 + 更新行在其前」直接锚定 stripper; ⑤ diff 整洁度:13 文件全与本 PR 目的相关,无跑题/生成物/锁文件 churn,无大段重排。干净。✓ 行为变更披露(Deliverables 第4条) —— 两处均为有意新增:
结构化七问:
可选清理(非阻断): 判定:可合并。 唯一阻断性缺陷(gate 引用 bug)已以标注 commit |
The acp_status/panel tests render through the real process VERSION, so their hardcoded 0.1.179-running spans broke on the first release after #1873 landed (0.1.180): pull_request CI runs the merge tree, and PR #1896 inherited the red lanes. Derive the UI fixtures with patchBump(VERSION, ±n) instead; pure-function tests keep the static ENTRIES (running is explicit there). Adds a teeth assertion: at-or-below-running entries stay out of the span.
Fixes #1870. Implements the design agreed in issue #1870: a tiered (routine | recommended), model-written release-notes channel + release gates + two visibility surfaces.
Why
The self-updater is a silent courier on native lanes:
installed X → Y. Restart to finish.only reaches a log file pi/opencode/dsh users never open, so the disk runs new while the process runs old for days (real case observed on this machine). #1577 fixed advisory visibility the same way; #1870 extends the pattern to ordinary releases.What
release-notes/package.json(schema 1, mirrorsadvisories/搞一个自动强制更新,针对重大bug的版本 #1481): newest-first entries{version, date?, tier: routine|recommended, summary ≤400ch}, cap 20; seeded with 0.1.176–0.1.179.release-notes/README.mddocuments the process..github/workflows/release-notes.yml: validates the payload (semver, tier, summary, date, dupes, cap) and publishes the companion package on everyrelease-notes/**push to master — version churn handled by CI, never by hand.release-manual.ymlfails at dispatch time,release.ymlre-checks before tag/publish, if the version being released has no entry — a stable release can no longer ship invisible. Prereleases (dev channel) exempt.src/update-notes.ts: fetch + cache only (throttled by the updater's CHECK_INTERVAL_MS, 5s timeout, fail-open, never installs). Derives:pendingRestart— disk version newer than the running process (the actionable case),acp_status:UPDATE READY (instance-level)section — headline + one· version [tier] summaryline per span entry + live-state pointer;UPDATE AVAILABLEvariant with the manualnpm install -gcommand when nothing is pending (auto-update off)./acppanel: one line beforePANEL_BOX_FOOTER(same stripper-safe slot +$-escape as the [follow-up #1483] Advisory visibility in native/plugin lanes: all three surfaces are effectively invisible #1577 advisory line).releaseNotesCheck(default ON, envBILI_RELEASE_NOTES_CHECK),releaseNotesUrl(BILI_RELEASE_NOTES_URL); documented in CONFIGURATION.md + zh-CN.Tier policy:
recommended= worth restarting soon (correctness/cache/self-heal fixes). Critical defects stay inadvisories/(#1481) — this doc never claims critical.Tests
tests/update-notes.test.ts(6): doc parsing/validation (bad entries skipped, broken doc = error, empty feed legal); span derivation (strictly-newer, ascending, invalid base = none); visibility matrix (pendingRestart beats all; recommended-only still visible; clean/garbage invisible); wording byte-stability; acp_status section content + clean-state byte-absence; panel line placement before footer, single footer,$-safety, clean-state byte-absence.Note for ework: per the issue, review-only — no implementation help needed.