docs(specs): 按 TD 裁决拆写 §6.2-1——generated 面已提供者必须委托使用 - #3
Merged
Conversation
ADR-048 的 Owner/consumers 行明列 LumioGame,其引述的 published rule 「must not invent a public contract / must use the generated validator」 对本仓生效。原 §6.2-1「设计不依赖 generated 类型 / validator 存在」一句 在 catalog-only 时期同时承载两层含义,按裁决拆开: - 保留「架构韧性」含义:设计不因 generated 面缺失或收窄而阻塞(容错)。 - 作废「不使用、自行实现一份」含义:与 published rule 冲突,且自造等于 发明第二套定义、必然漂移。 - 补齐正面约束:凡 generated 面已提供者必须委托使用(ContractBodies 类型 本体、ProtocolGate.Evaluate gate 执行体),不手写等价 DTO / gate 判定 / 转抄常量。与 LumioServer R-00273 / R-00276 同一口径。 - 记入 gate 能力边界红线:ProtocolGate 只校验 messageId 已注册、不校验 角色权限(ADR-048 §2);不足则停下标 BLOCKED,不得本地补 role→message 权限表(抢跑仍 blocked 的 D-009)。 连带:§6.2-2 补明适配工程是消费通道而非再实现层(否则单点引用变单点重造); §4.1 红线补上类型本体与 gate 判定;§8 该条 Known gap 转为「已裁决」留档; mvp spec 假设 A8 同步。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
依据
R-00259 卡上 TD 总调度追加裁决(2026-08-29):上一轮我把「本仓是否应改为直接消费 generated 类型 / validator」作为设计结论变更上报而未自决;TD 核实后裁定要改,但改的是表述不是结论。
核实点(架构仓
origin/main,逐字复核过)::4Owner/consumers 行明列LumioGame;:16:"Two published rules make this unresolvable downstream: a repository must not invent a public contract, and it must use the generated validator."→ 「must use the generated validator」对本仓生效。
改动
原 §6.2-1「本仓设计不依赖 generated 类型 / validator 存在」写于 catalog-only 时期,一句话承载两层真值已分离的含义,按裁决拆开:
委托口径与 LumioServer 一致(TD 同日裁决 R-00273 不得手写
MvpEnvelopeDocumentDTO、R-00276 不得手写 permission gate 执行体):不手写等价 DTO、不手写 gate 判定、不转抄常量。新增 gate 能力边界红线:
ProtocolGate只校验「messageId已注册为MessageType」,不校验角色→消息权限(ADR-048 §2:架构源尚无 role→message 权限表,"the gate therefore checks registration and stops")。若本仓发现仅此不够 → 停下、卡上标 BLOCKED 上报,不得本地补表(既发明公共契约,也抢跑仍 blocked 的 D-009)。连带:
验证
node .spec/tools/spec-lint.mjs→spec-lint: OKnode --test .spec/tools/spec-lint.test.mjs→ tests 13 / pass 13 / fail 0repository-policy.yml逐条复跑通过;sha256sum -c docs/architecture/.baseline.sha256→ OK(exit=0,仓根执行,与 CI 一致)docs/specs/engineering/相对链接全可达,无 DEAD纯文档改动,走
AGENTS.md快速模式收口白名单,未派 reviewer。🤖 Generated with Claude Code