Skip to content

Publish-time validation of predicate path references — a spec-delivered predicate naming a nonexistent path should fail at authoring, not evaluate to a guess at render (#6936 companion) #7010

Description

@os-project-manager

Spun out of #6936's ruling (maintainer 2026-08-09, Option C: the objectui evaluator goes fail-open-with-warning). That ruling fixes the renderer's posture; this card is the producer-side fix the #6936 filing itself identified as the long-term answer: 「谓词表达式应在发布期被校验(引用的路径必须存在于对应 schema),而不是让渲染器在运行期猜」.

Deliverable

An authoring-time check (landing point to be established by the implementing dev — the AUTHORING_RULES family in metadata-protocol, or packages/lint, following where the existing predicate-shape validations live): a metadata-delivered predicate (visibleWhen / requiredWhen / metadata-admin conditional fields — enumerate the actual carriers as step 1) whose identifier paths do not resolve against the target schema's scope (data.* after objectstack#6254's spelling correction) is refused or warned at publish/validate time, naming the unresolvable path.

Sequencing / evidence base

  • objectstack#6254 fixed 16 bare-spelling predicates in object.form.ts — the corpus that would have been caught by this check; use it as the fixture base.
  • objectstack#6331 made metadata-admin actually read spec-delivered predicates, which is what made the evaluation semantics observable at all.
  • The check must corpus-count before enforcing (standard widening discipline): run over the shipped spec metadata first, report the would-be-refused count in the PR body; a non-trivial hit count is a STOP.

Not in scope

The objectui evaluator change (#6936, ruled C) — independent, already queued in its own card.

No domain:* label applied — routing is the triage seat's.

Refs: #6936 (ruling + measurements), objectstack#6254, objectstack#6331, #5149 (fail-open family).

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