docs(adr-0078): 状态行与实现对齐 —— 完整性闸门已落地,逐阶段标注 (#4787) - #4919
Merged
Conversation
ADR-0078 的状态行仍写着「Proposed……核心机制未建(2026-07-16 审计)」, 而它所说「未建」的机制早已合并四次:共享谓词 packages/spec/src/kernel/functional-completeness.ts、作者期闸门 packages/lint/src/validate-functional-completeness.ts(在 authoring-rules.ts 里注册为 gating 层,error 级发现会让 os build/validate/lint 直接失败),以及 packages/objectql/src/registry.ts 里的注册期孪生诊断。一份说「没建」的 ADR 本身就是误导源:后来者要么重新立项,要么绕开一道已经承重的闸门。 状态词按仓内既有已落地 ADR 的写法改为 「Accepted — framework implemented; the cloud half of §2/§3 pending (cloud)」, 并且**没有**笼统标成全做完 —— 分阶段的 ADR 标「全完成」比标「未开始」更有害, 因为它会让人不再去查。逐阶段:Phase 1 ✅(#4547)、Phase 2 🟡 只落地框架侧 (#4577)、Phase 3 ✅ 在验证支持的范围内(#4565)、Phase 4 ✅ 已裁决(#4599); §2 的 cloud graph-lint 复用共享谓词仍未落地,单独标注为唯一会悄悄腐烂的开口。 正文一并更新:§2/§3/§4 加落地说明;新增决策 §6 —— 「一条规则只有带上让它成立的 那行运行时静默跳过点才能上线」,以及「运行时注释对空值的祝福必须另有证据证明该模式 仍可达」(webhook 跳过点祝福的 manual-only 模式已被 #3196 删除)。Phase 4 的 生成式规则遍历记为**否决而非推迟**。两条推论(multiselect 无 options 的 NON-rule 等)在 scripts/adr-anchors.json 里锚定回实现文件。 仅文档;不发版。 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 16:15
This was referenced Aug 4, 2026
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 #4787
ADR-0078 的状态行说「核心机制未建」,而那道机制早已合并四次。一份状态与实现相反的 ADR 本身就是误导源:后来者读到「未建」,要么重新立项,要么绕开一道已经承重的闸门。
一、先核实前提,再动手
不信议题的说法,逐条在
origin/main(3edff5cf9)上查证。状态行现状 —— 仍是原文,没有被别人改过:
闸门在哪(代码,不是议题的说法):
packages/spec/src/kernel/functional-completeness.tscheckFieldCompleteness/checkViewCompleteness/checkWebhookCompleteness,规则 id 由FUNCTIONAL_COMPLETENESS_RULES钉住packages/lint/src/validate-functional-completeness.tspackages/lint/src/authoring-rules.ts注册为tier: 'gating'/input: 'normalized'/commands: ALLpackages/objectql/src/registry.tsimport { … checkFieldCompleteness } from '@objectstack/spec/kernel',[ADR-0078 Phase 4]一次性 per-object 诊断packages/plugins/plugin-webhooks/src/auto-enqueuer.tswebhook/without-triggers告警CI 调用点:
.github/workflows/ci.ymljob Test Core (shard/2) →pnpm turbo run test $FILTERS --concurrency=4,覆盖functional-completeness.test.ts(24 例)、validate-functional-completeness.test.ts(8 例)、registry.test.ts、auto-enqueuer.test.ts。AUTHORING_COMMANDS = ['validate', 'build', 'lint']生效:packages/cli/src/commands/{validate,compile,lint}.ts均调用runAuthoringRules(...),gating层 error 级发现直接让命令非零退出。.github/workflows/lint.yml的pnpm check:i18n-coverage会在 CI 里用构建后的 CLI 跑os lint(scripts/check-i18n-coverage.mjs),因此这条链路在 CI 内确实被执行到(该步只消费--json,不以完整性发现为门,故上表把 gating 归到 CLI 命令自身)。.github/workflows/lint.yml的pnpm check:adr-anchors覆盖。结论:议题前提成立,且比议题描述更细 —— 并非四个阶段都在本仓落地(见下)。
二、逐阶段核对(为什么不笼统标「已完成」)
分阶段的 ADR 标成「全做完了」比标成「未开始」更有害,因为它会让人不再去查。按本仓能证明的部分打钩:
validate-functional-completenessfield/summary-without-operations、field/formula-without-expression、field/relationship-without-reference、field/choice-without-options(select/radioerror,checkboxeswarning)、view/layout-without-binding(warning)BlueprintFieldSchema.expression槽位与 strict/lenient 键位对齐钉子;objectBody/editBuildFieldDef的 allow-list 改写在cloud仓,本 session 无该仓访问权,不予背书webhook/without-triggers;action-locations/ approval-approvers 核查后发现早已是独立校验器(validate-action-locations.ts、validate-approval-approvers.ts);nav target 归到 ADR-0072(#4574)。故意未落:dataset零 measure、cron 合法性(均未验证);另有三项是运行时/驱动缺口,根本不是 authoring-lint 项三、状态词的选择依据
不自创。翻仓内已落地 ADR 的写法(
0007/0015/0023/0029等),house form 是:本 ADR 取:
Accepted而非Implemented,因为仓内没有Implemented这个独立状态词;framework implemented; … pending (cloud)精确对应「本仓已落地、cloud 侧未证」的实际形状。阶段状态的 ✅ 标注沿用 ADR-0010 的Phase N — ✅ **Implemented**写法。四、正文一并更新(否则只是把矛盾换个地方)
tier/input/commands)与 ⬜ cloud 未落地;SchemaRegistry.registerObject、warn 不 throw 的理由(§1 的 error 是「这个实例死了」,不是「系统死了」);undeleteandapiare declared but never fire #3196 删除。两条推论都已有测试钉住(
functional-completeness.test.ts:100钉multiselectNON-rule;:170断言 webhook 发现必须带第二处引证),正文如实写明;五、
scripts/adr-anchors.json(唯一的 docs 之外改动)ADR-0078 现为 Accepted,而
check-adr-anchors.mjs的收录标准正是「一份已接受 ADR 的决策落在了单看代码会显得随意、甚至像是可以『改进』的地方」。谓词文件正是那种地方:一个善意的后来者很可能顺手补上multiselect无options的规则,而那恰恰是在回退一条决策。故加一条锚点,把 §6 与 NON-rule 的理由钉回实现文件。属于议题所说的「必要的关联引用」,未动根package.json、未动.github/workflows/。验证
跑后两组是为了核实正文里写的每一句「已落地」都对得上真实通过的断言,而不是照抄 changeset。
Changeset:
.changeset/adr-0078-status-calibration.md,空 frontmatter(等价skip-changeset) —— 仅文档,不发版。未触碰content/docs/releases/。