Skip to content

docs(ui,protocol): 补齐六个此前只被"点过名"的变体 - #4244

Merged
os-zhuang merged 2 commits into
mainfrom
claude/unknown-key-stripping-strictness-h3a3zt
Jul 31, 2026
Merged

docs(ui,protocol): 补齐六个此前只被"点过名"的变体#4244
os-zhuang merged 2 commits into
mainfrom
claude/unknown-key-stripping-strictness-h3a3zt

Conversation

@os-zhuang

@os-zhuang os-zhuang commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

#4177 变体/文档闸门的后续,用的正是它产出的信号。

那道闸门判定一个变体"已记录"的条件是:页面里出现 <判别键>: '<变体>' 出现裸的 `变体`。它的头注写得很直白:第二种形态是宽松的,通过只代表页面说了这个词,不代表它记录了这件事。

有六个变体正是只靠宽松形态通过的——那就是闸门自己产出的"弱通过"清单,也是一份精确的工作单。

apps.mdx:列举了九种,只记录了六种

reportactioncomponent 共享一句话——"the spec also defines …"——而另外六种各有独立小节和示例。现在它们也有了,导言也不再暗示存在"半支持的第二梯队"。

action 那节尤其值得写:actionName 位于嵌套的 actionDef 块里,不是顶层键——这恰恰是读者最容易猜错的形状。

actioncomponent 都点明了哪个子对象是刻意开放的(actionDef.paramscomponent.params):那是兄弟契约的地盘,而在 #4165 之后它们周围的一切都已经是 strict。

knowledge.mdx:有表格,零示例

原本有一张表点名 object / file / http,但一个示例都没有,于是三种 kind 各自的键(contentFields vs prefix vs urls)在文档里根本无处可见。各补了一个示例。

每个示例都对着真实 schema 解析过

提交前用 NavigationItemSchemaKnowledgeSourceKindSchema 逐个 safeParse,六个全过

凭记忆写文档正是 #4218 里那个 region 示例用上不存在的 id 键的原因——不重复同一个错误。

度量

之前 之后
app navigation item 锚定形态 6/9 9/9
knowledge source kind 锚定形态 0/3 3/3

check:variant-docscheck:docscheck-doc-authoringcheck:strictness-ledger 全绿;content/docs/references 零变动。

更正:changeset

这份描述最初写的是「纯文档改动,无 changeset」。那是错的,Check Changeset 随即失败并给出了正解:该闸门要求每个 PR 都有 changeset,而「不发布任何东西的改动用空 changeset 即可」。

仓库里已经有 72 个空 changeset——那正是文档类工作在不 bump 任何包的前提下留下记录的方式。已按该形式补上(空 frontmatter + 描述)。

闸门提示的另一个选项 skip-changeset 标签被我放弃了:它是压制记录而不是写下记录,对一个在发布说明里确实有话可说的改动来说是错误的取舍。

Refs #4001, #4177

🤖 Generated with Claude Code

https://claude.ai/code/session_0147tNF4Snk7Ry1KGt4a5PY4

…checked

Follow-up to the #4177 variant/doc gate, using the signal it produced. That gate
passes a variant if the page contains either `<disc>: '<variant>'` or a bare
`` `variant` ``, and its header says plainly that the second form is loose: a
pass means the page says the word, not that it documents the thing. Six variants
were passing on the loose form alone — the gate's own "weak pass" list, and a
precise worklist.

apps.mdx enumerated nine navigation item types but only documented six. `report`,
`action` and `component` shared one sentence — "the spec also defines …" — while
the other six each had a section with an example. They now have their own, and
the intro no longer implies a second tier of half-supported types.

The `action` section earns its place: `actionName` lives inside a nested
`actionDef` block, not at the top level, which is exactly the shape a reader
guesses wrong. Both it and `component` note which sub-object stays OPEN by design
(`actionDef.params`, `component.params`) — the sibling contract owns those, and
after #4165 everything around them is strict.

knowledge.mdx had a table naming `object` / `file` / `http` and no example of
any, so the per-kind keys (`contentFields` vs `prefix` vs `urls`) appeared
nowhere. Added one example each.

Every example was parsed against the real schema before committing —
NavigationItemSchema and KnowledgeSourceKindSchema, six for six. Writing docs
from memory is how the region example in #4218 ended up using an `id` key that
does not exist; not repeating that.

Anchored-form coverage for these two unions: 9/12 → 12/12.

check:variant-docs, check:docs, check-doc-authoring and check:strictness-ledger
all green; content/docs/references unchanged.

Refs #4001, #4177

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147tNF4Snk7Ry1KGt4a5PY4
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Jul 31, 2026 12:35am

Request Review

@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation labels Jul 31, 2026
Check Changeset failed: the gate wants a changeset on every PR, and its message
says how — "an empty changeset is fine for changes that release nothing".

I had asserted in the PR description that a docs-only change needs no changeset.
That was wrong about this repo's convention: 72 empty changesets already exist,
and they are how documentation work records itself without bumping a package.
Added one in that form (empty frontmatter, description only).

The alternative the message offers — a `skip-changeset` label — would suppress
the record instead of writing it, which is the wrong trade for a change that has
something worth saying in the release notes.

Refs #4001, #4177

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147tNF4Snk7Ry1KGt4a5PY4
@os-zhuang
os-zhuang marked this pull request as ready for review July 31, 2026 00:53
@os-zhuang
os-zhuang merged commit 23fc3e2 into main Jul 31, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the claude/unknown-key-stripping-strictness-h3a3zt branch July 31, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants