fix(tooling): objectui-range 改读 objectui 声明的 changeset,不再按 commit 类型猜 (#4843) - #4905
Merged
xuyushun441-sys merged 1 commit intoAug 3, 2026
Merged
Conversation
…t commit types (#4843) `scripts/objectui-range.mjs` — whose output is pasted into a release page's Console section — kept the `feat|fix` subject-line guess that #4731 removed from `bump-objectui.sh`. Measured on the same real range (7d9734d5e321..785b8a5d432c, 53 non-merge objectui commits) the default output dropped 13 commits that actually released, 6 of them breaking `refactor(...)!`, and listed 5 that release nothing in objectui. The two scripts now share ONE criterion instead of each carrying a copy: the classification moved into an exported `classifyRange()` in objectui-changeset-digest.mjs, used by both the pin changeset (the platform release record) and this release-page aggregation. Because the output IS release-page body text, the accounting is unconditional — every run states how many changesets released of how many were added across how many commits, plus the excluded counts (release-nothing changesets, changeset-less commits), zeros included. `--all` now names those entries instead of switching a filter off. Headings group by declared level; grouping is presentation, never a filter. Guarded by `objectui-range.mjs --self-test`, folded into the existing `pnpm check:objectui-changeset` gate. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iARDqtrhQgz6fVHDeDkbQ
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
xuyushun441-sys
marked this pull request as ready for review
August 3, 2026 15:14
xuyushun441-sys
deleted the
claude/issue-4843-objectui-range-read-changesets
branch
August 3, 2026 15:18
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.
Fixes #4843
问题
scripts/objectui-range.mjs的产物是发布页 Console 段落的正文。它一直沿用 #4731 已经从bump-objectui.sh里拆掉的那套猜测:比 #4731 轻的地方:过滤在
--help里写明了,也有--all。重的地方:读者拿到的是一份看不出被过滤过的 markdown —— 尾部没有任何「另有 N 条被排除」的说明,而--all不是默认。实测(真实 objectui 检出,非构造)
区间
7d9734d5e321..785b8a5d432c,53 个非 merge 提交。跑新旧两套逻辑做集合差:!的破坏性变更丢掉的 13 条里包括
refactor(layout)!: delete PageNodeRenderer、burn ledger batch 2/4/5/6/7,以及chore(deps): lockstep the @objectstack family onto 17.0.0-rc.1。误收的 5 条里有两条fix(ci)(一条完全没有 changeset,一条 changeset 的 frontmatter 是空的)。这三个数字与议题正文完全一致 —— 我用真实检出复核过,没有偏差。
破坏性变更是唯一被类型过滤结构性挡在门外的一类,而它出现在一份「以破坏性变更打头」的产物里。
改动
1. 两处收敛到同一个判据,而不是各写一份
判据抽成
scripts/objectui-changeset-digest.mjs导出的classifyRange(),buildDigest()(即bump-objectui.sh走的路径)和objectui-range.mjs都走它。复制一份平行实现两边必然漂,而第一个漂掉的就是已经掉过一次的那一类。复用的既有导出:
collectAddedChangesets()/parseChangeset()/highestLevel()/clampSummary()。对公开面只做了两处小幅扩展,没有新写平行逻辑:collectAddedChangesets()多返回commits(区间内全部非 merge 提交)和commitsWithChangesetShas,这样调用方能点名被排除的提交,而不只是数出来;classifyRange(),把原先内嵌在buildDigest()里的分类循环提出来 ——buildDigest()的返回字段和行为一字未改,它自己的--self-test20 条断言全绿即为证。2. 排除必须出声
产物是发布页正文,所以账目是无条件打印的,零也打印:
只在「有东西被丢掉时」才出现的脚注,仍然让读者分不清「没丢东西」和「脚注没实现」。
--all语义随之改变:过滤已经不存在了,所以它从「包含所有 commit 类型」变成「逐条点名被排除的条目」(release-nothing 的 changeset + 无 changeset 的提交),--help里写明。3. 分组是呈现,不是筛选
标题按 objectui 声明的级别分组(Breaking changes / Features / Fixes),正好对上发布页的结构(破坏性 → 迁移,minor → 新能力,patch → 修复)。没有任何一处再读 commit 类型来决定收不收 —— commit 的 scope 只用来生成
_Largest areas_那一行和条目前缀,纯呈现。验证
--self-test(按scripts/既有惯例,折进已有的pnpm check:objectui-changeset)构造一次性 git 仓库复刻实测到的五种形态,跑真实代码,断言产物:
objectui-changeset-digest --self-test的 20 条断言同样全绿(重构未改行为)。反向验证 —— 证明这些用例是有承重的
把同一份构造 fixture 喂给
origin/main上改动前的objectui-range.mjs,再用新用例的断言去评它。改动前的产物长这样:失效模式在这几行里一览无余:破坏性的
refactor(layout)!不见了,列出来的两条fix(ci)恰恰是 objectui 侧什么都不发版的两条,计数写的是「3 commit(s)」而真实区间有 5 条,而且没有任何一处提示这份清单被过滤过。断言评估结果:
8/8 全部失败 —— 用例确实压在改动上,不是一组什么都断言不到的绿灯。
其他
npx eslint scripts/objectui-range.mjs scripts/objectui-changeset-digest.mjs --no-inline-config→ exit 0pnpm check:objectui-changeset→ exit 0(两个 self-test 串起来)--json/--all/--help/ 无 objectui 检出的降级路径本 PR 动了两个本仓最热的合并冲突点,已尽量压到最小:
package.json—— 改了 1 行既有的(check:objectui-changeset后面串上第二个 self-test),没有新增 script key;.github/workflows/lint.yml—— 只加了 3 行注释,step 名和run:都没动。请据此安排合并顺序。
与议题描述的出入
无。议题正文的三个数字(丢 13 / 其中 6 条带
!/ 误收 5 条含两条fix(ci))我在真实 objectui 检出上逐条复核过,全部吻合。一处议题没提、实测才看到的事实值得记一笔:被排除的 7 条「无 changeset」提交里,有两条确实改了已发布包的源码 ——
fix(charts): name the slices(动了packages/plugin-charts/src/、packages/plugin-dashboard/src/)和fix(i18n): resolve qualified view ids(动了packages/i18n/src/)。旧口径碰巧收了它们,但那是因为 subject 以fix开头,和是否发版无关;真正的洞在 objectui 侧没有「改了包源码就必须带 changeset」的门禁,以致这两条在 objectui 自己的 CHANGELOG 里也查不到。本 PR 之后它们至少不再无声(计数 +--all点名),但出声不等于修好 —— 已按 Prime Directive #10 另立 #4904(未认领),未在本 PR 内扩范围。关联
bump-objectui.sh侧,本 PR 复用其导出