refactor(spec)!: the honesty layer reads one marker — _dev is retired (#4319) - #4333
Merged
Conversation
…ed (#4319) `readServiceSelfInfo` recognized two spellings: the standard `__serviceInfo` descriptor and plugin-dev's legacy `_dev: true`, normalized to `{ status: 'stub', handlerReady: false }`. The `_dev` branch had no producers left — ADR-0115 retired the stub table that wrote it, and a sweep of framework, objectui and cloud found only comments — so it fired from test fixtures alone. Deleting rather than keeping a harmless alias, because a boolean cannot say WHICH kind of unreal a service is. `stub` (fabricates — the domain refuses it) versus `degraded` (really serves with reduced capability — the domain keeps serving it) is the split every consumer gates on, and collapsing both into "fake" is exactly what made "adopt the dispatcher gate everywhere?" unanswerable until #4082 unpicked it. Three markers have now become one, and neither retirement taught the reader a new dialect: both moved their producers onto the descriptor instead. The cost, stated in the changeset, the ADR and the test that pins it: a service still carrying `_dev: true` now reads as unmarked, i.e. as fully real — over-reporting, the direction D12 exists to prevent. Acceptable only because the producer count was zero; consumers get the FROM → TO mapping through the package CHANGELOG, which is what an upgrading agent greps. - `SERVICE_DEV_MARKER_KEY` export and the `_dev` branch removed; api-surface regenerated (one line), all 8 spec artifact gates green - four test fixtures rewritten to `__serviceInfo: { status: 'stub' }` — they were always pinning "a stub is never reported available", not the spelling - one test inverted to pin the new fact: retired markers read as unmarked - ADR-0076 conclusion 11 records the retirement and its cost Closes #4319 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 3 package(s): 121 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
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.
背景
readServiceSelfInfo识别两种标记:标准的__serviceInfo描述符,以及 plugin-dev 的遗留_dev: true(归一为{ status: 'stub', handlerReady: false })。_dev的生产者已清零:ADR-0115 退役了写它的 stub 表,framework / objectui / cloud 三个仓扫下来只剩注释。也就是说这个分支只被测试 fixture 触发。为什么删而不是留个无害别名
一个 boolean 说不出"这个服务是哪一种不真实"。
stub—— 编造答案,dispatcher 域拒绝调用它;degraded—— 真的在服务,只是能力削减,域继续服务它。这是每个 consumer 实际据以判断的分界,而
_dev: true把两者压成同一个"fake"。#4058 的"要不要把 dispatcher 门推广到所有域"之所以长期答不了,正是因为这个压缩 —— 直到 #4082 把它拆开(plugin-dev 的实现按真实类别重新分类)才有了答案。三种标记至此归一为一种,而且两次退役都不是教 reader 认新方言,是把生产者迁到描述符上:
_fallback: true__serviceInfo(它本来就没有任何 reader —— 这正是它们被报成available的原因)_dev: true__serviceInfo代价(已写进 changeset、ADR 和一条测试)
一个仍然带着
_dev: true的服务,现在读作无标记,即完全真实 —— 这是过度上报,正是 D12 要防的方向。之所以可接受,只因为生产者计数为零。外部实现者通过 npm 包的CHANGELOG.md拿到 FROM → TO 映射(升级时 agent 会 grep 的正是这个)。改动
SERVICE_DEV_MARKER_KEY导出与readServiceSelfInfo的_dev分支;api-surface.json重新生成(减一行),spec 八个 artifact 门全绿__serviceInfo: { status: 'stub' }—— 它们钉的一直是"stub 绝不被报成 available",不是标记的拼写验证
@objectstack/spec7149/7149、@objectstack/objectql1374/1374、@objectstack/runtime951/951、@objectstack/core437/437 全部通过;pnpm build通过(删公开导出没有编译期断链);check:generated八门全绿。Closes #4319
🤖 Generated with Claude Code