Skip to content

docs(scripts): 按真实机制改写两处 Lychee 门禁描述,并删掉 judgeHref 重复注释 (#3587) (#3648) - #3656

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-3587-lychee-comment-truth
Aug 7, 2026
Merged

docs(scripts): 按真实机制改写两处 Lychee 门禁描述,并删掉 judgeHref 重复注释 (#3587) (#3648)#3656
yinlianghui merged 1 commit into
mainfrom
claude/issue-3587-lychee-comment-truth

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes#3587
Fixes#3648

纯注释改动,零行为变化,两文件三处。

前提复核(先按内容锚定,再改)

正文引的行号确已大漂,但三处失真都还在origin/main(93c2619,含 #3649):

issue 说的行今天实际结论
#3587 spot 1check-doc-links.mjs:157仍是 :157存在,未被改写
#3587 spot 2check-doc-links.test.ts:853漂到 :886存在,未被改写
#3648 重复注释check-doc-links.mjs:689-696漂到 :764-771存在,git blame 指向 0e4ea07(#3629)

.github/workflows/check-links.yml 现状我重测过,不是照抄正文:

所以「gates nothing」这个结论对,机制反了。

改动一:机制正确的表述(#3587)

scripts/check-doc-links.mjs(§2 自仓 blob/tree URL 那段):

改前

 * thing that would resolve it — is a weekly cron with `continue-on-error`, so
* it gates nothing.

改后

 * thing that would resolve it — is a `schedule` + `workflow_dispatch` workflow
* with no PR trigger, so it blocks nobody. (It is `fail: true`, not a
* soft-failing job: what keeps it off pull requests is the absent trigger, not
* a tolerated failure. #3213 ruling B says keep it that way — uncommenting
* `pull_request:` would turn it into a hard gate over the network.)

措辞对齐同一文件 :194 起已有的正确版本(#3589 写的头注释:"that workflow is schedule + workflow_dispatch only … so it blocks nobody")——同一文件里两种说法并存,本来就是下一个读者踩坑的地方。括号那句是 issue 的核心指控落地:按旧注释行事的人会去摘一行不存在continue-on-error,而真实风险方向相反。

scripts/__tests__/check-doc-links.test.ts:886,某断言上方的说明文字,只改文字,断言一行未动:

改前

 // scheme, and lychee (weekly cron, continue-on-error) gates nothing.

改后

 // scheme, and lychee (`schedule` + `workflow_dispatch`, no PR trigger) blocks
// nobody.

改动二:删掉重复粘贴的 4 行(#3648)

judgeHref() 里 "A URL on this site is an internal route wearing an origin…" 那 4 行出现两遍、一字不差,删掉后一份。

先预测后验证

预测改前实测改后实测结果
grep -rn 'continue-on-error' scripts/ 归零20
grep -rn 'weekly cron' scripts/ 归零20
重复注释特征行 2 → 121
node scripts/check-doc-links.mjs 前后同输出Links are valid across 7 scan roots. exit 0同上,exit 0✅ 行为零变化
vitest 前后同绿同数82 passed82 passed(连 check-links-workflow.test.ts 共 89 passed / 2 files)
pnpm type-check:scripts 绿exit 0exit 0
pnpm check:control-bytes 绿OK (scanned 3661 tracked text file(s)),另加 grep -naP 自扫两文件干净

一处没按预测走、如实记下:草稿里我曾在新注释中写 "carries no continue-on-error" 来正面否认旧说法,那会让 grep 'continue-on-error' 停在 1 而不是 0。改用 "not a soft-failing job" 表达同一个意思,既保留了防误读的价值,又让 grep 真正归零。

围栏

  • content/docs/guide/ci-cd-pipeline.md未动——它对该工作流的描述本身正确(issue 已确认)。
  • .github/workflows/check-links.yml未动——本单只修注释,不改门禁行为。
  • 无 changeset:scripts/ 不是发布包,且改动纯注释、零用户可见变化。
  • 与在途 i18n 门禁:en 文案变更时其余九包必须同批跟改(或显式挂账)——#3582/#3625 族缺陷缺的那道不变量 #3650(在 scripts/ 新增 en-drift 门禁文件)实测零相交。
  • 仓内 prettier 说明:pnpm exec prettier --check 对这两文件报 warn,但改前的 origin/main 版本同样报(默认配置下 389 / 1646 行差异),仓内既无 prettier 配置也无任何工作流跑 prettier——非本 PR 引入,不处理。

🤖 Generated with Claude Code

https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt


Generated by Claude Code

两处注释称 lychee 是「weekly cron with continue-on-error」,结论「gates
nothing」对,机制反了:check-links.yml 里没有任何 continue-on-error,第 77 行
是 fail: true,`on:` 只有 workflow_dispatch + schedule('17 4 * * 0'),push 与
pull_request 被注释掉并附 ⛔ Do NOT enable(#3213 ruling B)。按错误理由行事的
人会去摘一行不存在的 continue-on-error,而真实风险相反 —— 取消注释
pull_request: 会让它立刻变成走网络的硬门禁。
改成同一文件 :194 起已有的正确表述(#3589 头注释措辞):schedule +
workflow_dispatch、无 PR 触发器,所以它谁也拦不住。
同时删掉 judgeHref() 里被逐字复制两遍的那 4 行注释(#3629 合并时的重复粘贴)。
纯注释改动,零行为变化;test 那处只改说明文字,断言未动。scripts/ 非发布包且
无用户可见变化,故无 changeset。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
@vercel

vercelBot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
objectuiIgnoredIgnoredAug 7, 2026 5:33pm

Request Review

@yinlianghui
yinlianghui marked this pull request as ready for review August 7, 2026 17:42
yinlianghui pushed a commit that referenced this pull request Aug 7, 2026
The two sidebars' `sys-datasources` entry now names the canonical
`…/metadata/datasource` route, so three comments claiming the setup left-nav
points at the legacy alias became false as of the previous commit.
Rewritten as positive statements of what is true now. Per #3656, none of them
re-plants the alias URL in a denial sentence — a comment that says "no longer
points at X" keeps a grep for X returning the very hit the rewrite was meant
to clear.
`console/AppContent.tsx` is a comment-only change: the two alias route
declarations, and every other line of code, are untouched. Its #3610 history
is preserved and extended rather than replaced — #3610 declined to re-point
the navigation because a zero-app-only spelling would have given the alias a
second canonical destination, and #3660 re-pointed it at the shared route, so
that reasoning still holds.
Fixes#3666
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
@yinlianghui
yinlianghui added this pull request to the merge queueAug 7, 2026
Merged via the queue into main with commit f4b8288Aug 7, 2026
17 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-3587-lychee-comment-truth branch August 7, 2026 18:54
This was referenced Aug 7, 2026
github-merge-queueBot pushed a commit that referenced this pull request Aug 8, 2026
* docs(app-shell): 两个 AppContent 路由测试的生产端叙述改写为「历史 + 现状」两段 (#3749)
三处注释以现在时枚举「侧边栏 / QuickActions 现在发哪些 URL」,而这些 URL 已被
#3660(`sys-datasources`)与 #3739(`sys-objects` + 首页 Manage Objects 卡片)改指
metadata-admin 引擎的规范路由。断言全部正确且全绿 —— 陈旧的只有叙述,以及两个以
生产端命名的 `it` 标题:它们实际量的是别名路由仍能解析且只跳一次。
手法照 #3666:每处拆成「#3610 当时如此」(过去时)与「#3660/#3739 之后如此」
(现在时)两段,现状段正面陈述两条别名今天的身份 —— 不再是任何导航的目标,而是
书签与外部链接的到达路径,这正是重定向必须继续工作的理由。按 #3656,现状段不靠
「不再指向 X」的否认句复述别名 URL。
- `AppContent.noAppComponentRoutes.test.tsx`:头注拆段;两个 `it` 标题从
`sys-datasources:` / `sys-objects:` 改为 `shell alias:` / `host alias:`,即两条
别名各自的改写者(shell 自己的 `LegacyMetadataRedirect` vs 宿主的
`MetadataRedirect`)—— 文件正文本来就画了这条区分。用例体内两处重申同一陈旧
断言的行内注释同步(`sys-datasources` item still points straight at this
spelling / this case now measures what production actually does),否则改完标题
的文件会自相矛盾。顺带把同一段落里 `isMetadataRoute` 的现在时「substring test」
收敛为过去时 —— #3638 起它是 `pathSegments.includes('metadata')` 段测试。
- `AppContent.pseudoRouteSegments.test.tsx`:生产端表格按实读重写(逐条读自
`AppSidebar` / `UnifiedSidebar` / `QuickActions` / `HomePage` / `InboxPopover`),
并补一段说明两条旧拼写并未消失,只是从 `navigation` 行移到了上面两行的到达面。
`metadata` 两种拼写下都是完整路径段,所以本文件要证伪的论断不受影响。
- `AppContent.tsx`(#3610 那段):收尾句补上 #3739 也已重指,并注明 `sys-objects`
的链路早在 #3658 就离开了这两条路由。该段前半的过去时叙述保留。
零行为改动:两个测试文件跑前跑后同为 43 passed,断言与用例数未动。
无 changeset —— 注释-only,照 #3666(bd04651)与 #3785(f9d70a7)先例。
Fixes#3749
* chore(changeset): 为 #3749 注释改写声明「不发布任何东西」(空 frontmatter)
CI 的 Changeset Declaration 门(scripts/check-changeset-presence.mjs)守的是
「fixed 组内任一包的 `<pkg>/src/**` 被改动 -> 必须有 `.changeset/*.md` 声明」,
本次三个改动文件全部落在 packages/app-shell/src 下,所以门要求声明。
先前照 #3666(bd04651)与 #3785(f9d70a7)判断「注释-only 不带 changeset」是
读错了先例:那两个 PR 早于这道门(#3387 引入),且 #3785 只动 content/docs/**,
根本不在守护面内。门自己写明了正确出口 —— 「If this change really should release
nothing, say so — that is a pass, not a workaround」,即空 frontmatter,照
.changeset/registry-inputs-spec-parity-gate-3797.md 的先例写法。
空 frontmatter 而非 patch:AppContent.tsx 只改 JSX 注释,两条
LegacyMetadataRedirect 路由声明与其余每一行代码未动;两个测试文件断言与用例数
逐字节未变(前后同为 43 passed)。确无可发布的行为改动。
本地验证:
node scripts/check-changeset-presence.mjs -> exit 0(识别为空 frontmatter 豁免)
node scripts/check-changeset-no-major.mjs -> exit 0
---------
Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Aug 10, 2026
…bjectstack-ai#3660) (objectstack-ai#3668)
* fix(nav): the last four producers emit canonical metadata routes, not the deprecated alias (objectstack-ai#3660)
The System hub's "Metadata" and "Datasources" cards, and the `sys-datasources`
entry in both AppSidebar and UnifiedSidebar, aimed at
`component/metadata/{directory,resource?type=datasource}`. app-shell declares
those spellings as legacy aliases whose route element is
`LegacyMetadataRedirect` — a bare Navigate onto `metadata` and
`metadata/datasource`. Each click paid a redundant hop plus a re-render.
All four now name the destination directly. Endpoints are byte-identical to
what the alias hop computed; only the intermediate hop is gone. The alias
routes are untouched and stay reachable for bookmarks and external links.
Completes objectstack-ai#3639, which fixed the console host's two redirects and enumerated
these four as the remainder.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
* docs(app-shell): rewrite three docblocks this branch falsified (objectstack-ai#3666)
The two sidebars' `sys-datasources` entry now names the canonical
`…/metadata/datasource` route, so three comments claiming the setup left-nav
points at the legacy alias became false as of the previous commit.
Rewritten as positive statements of what is true now. Per objectstack-ai#3656, none of them
re-plants the alias URL in a denial sentence — a comment that says "no longer
points at X" keeps a grep for X returning the very hit the rewrite was meant
to clear.
`console/AppContent.tsx` is a comment-only change: the two alias route
declarations, and every other line of code, are untouched. Its objectstack-ai#3610 history
is preserved and extended rather than replaced — objectstack-ai#3610 declined to re-point
the navigation because a zero-app-only spelling would have given the alias a
second canonical destination, and objectstack-ai#3660 re-pointed it at the shared route, so
that reasoning still holds.
Fixesobjectstack-ai#3666
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
---------
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

2 participants

@yinlianghui@claude