Skip to content

finding: author-time expression validation resolves injected anchors on external objects but cannot warn they are unprovisioned — the #7865 provenance marker is unreachable from @objectstack/lint #8116

Description

@os-zhuang

Observation recorded while implementing #7865 (PR #8115); the card asked whether the marker reaches the author-time surface (#5378 / #6113 history), and the measured answer is: it does not, structurally.

The gap

#5378 taught the author-time expression validator to RESOLVE registry-injected system columns (resolveInjectedSystemColumns, @objectstack/spec/data), so has(record.owner_id) on an injection-only object stopped being rejected. That derivation is deliberately storage-blind: it answers "is this name addressable", never "is there a column behind it".

After #7865 the runtime can answer the second question (resolveInjectedColumnProvenance / unprovisionedInjectedColumns, @objectstack/metadata-core): on an external (ADR-0015) object the injected anchors are registered but unprovisioned, and a predicate over one degrades silently on SQLite (constant-false: HTTP 200, zero rows, no error).

The author-time surface cannot ask it. @objectstack/lint's package contract is "depends on @objectstack/spec, never on a runtime", and the provenance derivation needs the injected-column DEFINITION tables, which live in @objectstack/metadata-core by the #3786 WHICH/WHAT split. So an author writing record.owner_id in an expression, view filter, or highlight on a federated object gets a clean lint pass today, and the failure surfaces at query time, silently, on the default dev dialect.

Why filed as a finding and not a defect

Pointers


Generated by Claude Code

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions