Skip to content

spec: PackageInstallRequestSchema.enableOnInstall must stop erasing absence at parse time — .default(true) hides the case ruling batch #157 item 5 needs the install door to see #19273

Description

@huangyiirene

Blocked-by: #18605

Filed by the domain:engine execution seat (session_01NcPSwnmJHczmTu6FG7NMjE, seat post #6367) as the sub-card the ruling on #18877 explicitly owes its claimant. Ruling: batch #157 item 5 · letter C (5727164909, maintainer 「其他同意」), director seat summon #24. Its item 5, verbatim:

  1. If PackageInstallRequestSchema's enableOnInstall: z.boolean().default(true) erases absence at parse time so the door cannot see it, the declaration becomes optional() with its semantics written on the field (absent = keep the current state; a fresh install lands enabled) ⇒ that half is Clause-②: yes, @objectstack/spec patch changeset, a spec-lane sub-card by charter conflict: does a Clause-②: no PR that touches no contract surface still owe an in-seat review before it can land? #18536 rule 2; the engine half lands with or after it. ⛔ The door does not sniff the raw body around the schema.

⛔⛔ PREMISE CORRECTED 2026-09-20T10:12Z — read comment 5749156912 before acting on this card. The ruling's item 5 is a conjunction, and only its first half holds:

clause verdict
(a) .default(true) erases absence at parse time TRUEpackage-api.zod.ts:286; lit control package-api.test.ts:85 (parse({manifest})true)
(b) 「so the door cannot see it FALSE — nothing parses an install request through that schema on the serving path

(b), measured on origin/main: PackageInstallRequestSchema occurs in packages/runtime/src/domains/packages.ts only in a comment (no .parse/.safeParse anywhere in that file); the door reads the raw body at :796. PackageApiContracts, which declares the route's input, is defined at package-api.zod.ts:661 and occurs nowhere else but CHANGELOGs and generated api-surface artefacts ⇒ zero runtime consumers. ⚠️ Radius: packages/** + apps/** in THIS repo; a parser in objectui, cloud or a third party is ⛔ outside it and unestablished.

⇒ ⛔ Item 5's optional() prescription is NOT mechanically authorised here — the conjunction it rides on does not hold, and the filing seat ⛔ does not substitute its own direction.

⭐ The card is NOT obsolete — its reason INVERTED

The real divergence arrives when PR #19291 (card #18877) lands:

  • packages/spec declares enableOnInstall: z.boolean().default(true) — 「absent means true」;
  • the runtime implements ruling letter C — 「absent means preserve this row's current state」.

⇒ a published declaration stating a default the runtime deliberately stops applying — 「declared ≠ enforced」 on a published contract surface. ⛔ A different defect from the one this card was filed for, and it did not exist until letter C was ruled.

The open question, narrowed: once the runtime honours 「缺省 = 保持」, what should the published enableOnInstall declaration say? ⛔ It cannot keep claiming default(true). .optional() with the preserve semantics written on the field remains the obvious candidate — and is still exactly what flips PR #19130's 缺省 pin.


Original filing text follows, kept rather than erased.

The ruling makes this card conditional on a measurement. ⭐ The condition measures TRUE.

Measured — ref stated, ⛔ not recalled

Read on origin/main 1739f71879 (== this checkout's HEAD), 2026-09-20T08:45Z:

reading value instrument
the declaration enableOnInstall: z.boolean().default(true) at packages/spec/src/api/package-api.zod.ts:286 git grep -n enableOnInstall origin/main -- 'packages/spec/src/**' ':!*.test.ts'
lit control — absence is really erased PackageInstallRequestSchema.parse({manifest:{…}})expect(result.enableOnInstall).toBe(true) at packages/spec/src/api/package-api.test.ts:85 git show origin/main:packages/spec/src/api/package-api.test.ts

⇒ a request that omits the key and a request that sets it true are byte-identical after parse. The door at SchemaRegistry.installPackage cannot tell them apart, which is exactly the distinction letter C's rule 2 (「absent ⇒ no lifecycle call」) is built on.

⚠️ Instrument radius, per 「零命中须写仪器可达半径」: the greps above reach declaration sites under packages/spec/src/**. ⛔ Outside that radius, and so NOT established here: whether any non-packages/spec copy of this key also defaults, and what the two sibling declarations below are for. Two further .default(true) sites exist and are named, ⛔ not judged: packages/spec/src/kernel/package-registry.zod.ts:283 and packages/spec/src/marketplace/marketplace.zod.ts:494.

⛔⛔ This card COLLIDES with #18605, which is in the maintainer's decision box right now

This is the reason the card is filed pm:blocked rather than queued, and it is the part a taker must not discover late.

⇒ ⭐ Two rulings meet here and the later one moves the earlier one's ground. Batch #153 item 5 letter 1 (5724940709, 2026-09-18T03:59Z) settled 「one authority = package-api.zod.ts, default true」. Batch #157 item 5 letter C (5727164909, 2026-09-18T08:10Z) — four hours later, on a different card — requires absence to become visible. ⛔ Nothing in the #157 ruling text mentions #18605 or PR #19130, so this seat reads the collision as unnoticed at ruling time, ⛔ not as a silent reversal already decided.

This seat does not resolve that. Per 「本卡 pin 断言兄弟卡在改的行为 ⇒ 派发令注明,并在用例内预登记翻转触发词,⛔ 不修绿」 the collision is declared, ⛔ not patched green. The sequencing call and any re-ruling belong to the domain:spec seat and the maintainer.

Executable criterion (one line, as the transfer rule asks)

PackageInstallRequestSchema.parse({ manifest }) leaves enableOnInstall undefined, while parse({ manifest, enableOnInstall: true }) still yields true and parse({ manifest, enableOnInstall: false }) still yields false — and the field's own describe/docblock states the semantics letter C fixes: absent = keep the current lifecycle state; a fresh install lands enabled.

Control in the other direction, required: a fix that makes absence visible by making the key mean nothing is worse than the bug. The true/false arms must be re-read after the change, ⛔ not assumed.

Fences

  • Clause-②: yes — set by the ruling itself, ⛔ not this seat's grading. @objectstack/spec patch changeset.
  • Not the engine half. #18877 (domain:engine) carries SchemaRegistry.installPackage / enablePackage / disablePackage in packages/objectql/src/registry.ts and is dispatched separately by this seat; the ruling says the engine half 「lands with or after」 this one.
  • ⛔ The door does not sniff the raw body around the schema (ruling item 5, verbatim).
  • Grading is the triage seat's production: this card carries domain:spec because the ruling names the lane (「a spec-lane sub-card by charter conflict: does a Clause-②: no PR that touches no contract surface still owe an in-seat review before it can land? #18536 rule 2」), ⛔ not because an execution seat routed it. priority:* and type are left for triage.

Dedupe words

enableOnInstall default erases absence, PackageInstallRequestSchema optional, absent means keep lifecycle state, install door cannot see absence, 18877 item 5 spec half


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions