Repository navigation
Open
Labels
area:databugSomething isn't workingdomain:serverDomain lane — seat card indexed by label:pm:seatpm:queueReady for the PM dispatch looppriority:p3
Description
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7
Filing gate: ① · Source: fleet (carrier: seat 7, contract review 7048183393 S4 on PR #35916; dev out-of-scope finding 7048006771)
Area: area:data · Type: Bug · Priority: p3 (fleet-graded: no user-visible wrong answer measured yet; latent for every ObjectSchema narrowing)
维护者速读
- 是什么: 元数据保存时会按当前 ObjectSchema 校验,但发布时把草稿提升为正式版本,并不会再用 ObjectSchema 重新解析一遍。
- 影响: 一份在某条新的 ObjectSchema 校验规则(比如 audit seal: publish refuses a sealed object that has neither a tenant_id field nor a chainField #34352 的封存默认链列规则)上线之前存下的草稿,发布时会绕过这条规则直接上线。
- 建议: 发布提升时对 object 草稿重新做一次 ObjectSchema 解析,不通过就按保存时的同一格式拒绝。
- 注意: 先测一次可达性;这是对所有 ObjectSchema 收窄都成立的通用缺口,不是某一条规则独有。
What happens
- The save door parses. It parses an object draft against
ObjectSchemathroughresolveOverlaySchemaandgetMetadataTypeSchema('object')(protocol-save.ts), so a body the current schema refuses is refused with 422. - The publish promotion does not.
ProtocolHistoryAndPublish.promoteDraftForPublish(packages/metadata-protocol/src/protocol-history-and-publish.ts:677at origin/main) re-runs many save-door refusals on the stored draft, with the save door's judge and envelope. For example, its comments nameassertRuntimeAuthoringRules, the namespace prefix andobjectRegistrationRefusal. It never parses the draft againstObjectSchemaagain.- The same comment explains why the other refusals are repeated: "a draft stored before
saveMetaItemjudged every…". The schema parse is the one judge left out.
- The same comment explains why the other refusals are repeated: "a draft stored before
- The effect: an object draft saved before a narrowing
ObjectSchemarefinement lands is promoted live at publish, unjudged by that refinement. The first concrete case is audit seal: publish refuses a sealed object that has neither a tenant_id field nor a chainField #34352 / PR feat(spec)!: refuse a sealed object whose default chain column tenant_id cannot chain its rows #35916: a sealed object whose default chain columntenant_idis missing, non-text or listed invalueFields. - reach: found by reading the code path on main, not yet measured through the doors. Step 1 below measures it once.
Business rationale
- Who benefits: deployments that upgrade while drafts are pending, and the authors of every
ObjectSchemanarrowing. - What happens without it: each narrowing stays open on one door for drafts saved before the upgrade. The definition goes live, and only run-time reports catch it, if anything does. For the audit seal that is the condition the narrowing exists to close.
- Reader: the area:data seat's dev, in metadata-protocol.
Done when
- Reach is measured once on main. A test saves an object draft that parses, a refinement is made to refuse that draft's body (or a draft row is stored directly), and publish promotes it. If publish already refuses it, close this card with the evidence.
- The promotion parses an object draft against the current
ObjectSchema(getMetadataTypeSchema('object')). It refuses with the save door's envelope (422) beforerepo.promoteDraftwrites. Judge-only batches judge it too. - There are pins: a pre-refinement draft refused at publish, and a CONTROL where a valid draft still publishes.
- Declare it as a narrowing if a body that published before is now refused at publish.
Dedupe
Searched open issues: draft promote publish re-parse returned 1 hit (#34352, the narrowing that exposes the gap; not a duplicate). promote draft schema validation publish stale returned 0 issue hits apart from seat posts. No open card covers this.
Metadata
Metadata
Assignees
Labels
area:databugSomething isn't workingdomain:serverDomain lane — seat card indexed by label:pm:seatpm:queueReady for the PM dispatch looppriority:p3
Activity
objectstack-fleet commentedon Nov 20, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:server(metadata publish) ·pm:queue; rationale: area:data · Bug · a draft saved before an ObjectSchema refinement landed is promoted at publish without being parsed again; latent for every schema narrowing; no wrong answer measured → p3 as filed · size S.