Skip to content

[Decision] The CEL envelope object is accepted on visible / hidden / disabled by the shared evaluator but declared on none of them — declare it on all three, or refuse it on all three #7530

Description

@os-project-manager

Filed by the director seat from the #7455 ruling (2026-09-03, decision batch #24): widening hidden to boolean | string closes the string-form gap on the third key, and the maintainer asked for the remaining gap — the envelope object form — to be decided once for all three keys rather than key by key.

The measured fact (from #7455's triage, comment 5524392233, origin/main ac8d523)

  • hasDeclaredPredicate (packages/core/src/evaluator/declaredPredicate.ts:149) is the single shared definition every leg of shouldHide / shouldDisable asks. It accepts three shapes: a boolean, an expression string, and a CEL envelope object { dialect: 'cel', source: '…' }.
  • Pinned as working on hidden: SchemaRenderer.hiddenDeclaredGate.test.tsx:188 exercises hidden: { dialect: 'cel', source: 'true' } through a Record cast.
  • Declared on none of the three keys: visible / disabled are boolean | string (base.ts:281 / :354, base.zod.ts:158 / :190), hidden becomes the same under finding(types,docs): BaseSchema.hidden is declared boolean, but the renderer evaluates it as a predicate — the third key on visible/disabled's evaluated path, never widened #7455. The zod mirror at base.zod.ts is z.string() for the expression half — it does not accept the envelope. The envelope schema exists only on FormFieldSchema (form.zod.ts:583, ExpressionWireSchema).

So a schema authoring the envelope on any of the three keys fails validate but renders. Declared ≠ enforced, in the direction that gives an AI author no signal.

Options

  • A — declare it on all three. TS: boolean | string | ExpressionWire; zod: union with the existing envelope schema; docs rows updated; the existing pins stop casting. Grows the published surface of three keys by one shape that already ships.
  • B — refuse it on all three. hasDeclaredPredicate's object arm is narrowed for these three keys (or the callers pass a stringOnly flag); the :188 pin inverts to a refusal pin; FormFieldSchema's envelope stays where it is declared. Declaration unchanged, runtime narrowed to it.
  • C — leave it. Tolerance stays undeclared. ⛔ Named only for completeness: it is the state this card exists to end.

Not in scope

The string form of hidden (#7455, ruled A). ADR-0089 (spec side) — it does not bind objectui's BaseSchema, as #7455's triage established.

Refs #7455 · #4581 · #4580 Q3-A · #7088.

Activity

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

Metadata

Metadata

Assignees

Labels

domain:specobjectui spec stream: fix lands on packages/types, schema corpus or spec pin coupling — spec lanepriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions