Skip to content

docs(adr): ADR-0058 — expression & predicate surface audit + consolidation (closes #1887) - #2087

Merged
xuyushun441-sys merged 1 commit into
mainfrom
adr/0058-expression-surface
Jun 21, 2026
Merged

docs(adr): ADR-0058 — expression & predicate surface audit + consolidation (closes #1887)#2087
xuyushun441-sys merged 1 commit into
mainfrom
adr/0058-expression-surface

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

What

A whole-surface audit + consolidation of every authorable expression on the platform (the expression-layer analogue of ADR-0056's permission landing). Decision-only ADR; implementation follows in phased PRs.

The finding

One authoring language (ExpressionInput/CEL, ~50 declarations) but two runtime backends: a unified per-record CEL interpreter (@objectstack/formula, works) and a fragmented compile-to-filter path (rls-compiler 4-form regex + sharing celToFilter field-equality + read-scope-sql rich backend) that shares no AST. That fragmentation is the root of the predicate-honesty debt: sharing condition never compiled (#1887), RLS check declared-but-unenforced, and inconsistent silent-fail policies (formula→null unlogged, hook→false, validation→skip, flow→throw, RLS→drop+warn, sharing→silent-empty).

The decision

One canonical CEL→FilterCondition pushdown compiler on the interpreter's AST (retiring the regex + celToFilter, feeding the existing rich SQL backend); the supported pushdown subset (no subqueries, ADR-0055); reconcile #1887 + RLS check; one fail-policy matrix (compile-error / fail-closed-security / fail-soft-but-logged); a durable Expression Surface Conformance ledger. Non-expression experimental subsystems stay under ADR-0056 D8 (scoped out).

Phasing: P1 compiler → P2 cutover + fail-policy → P3 close#1887 + RLS check → P4 conformance ledger.

Closes#1887.

🤖 Generated with Claude Code

…olidation (closes#1887)
Whole-surface audit (3 passes) of every authorable expression on the platform:
one authoring language (ExpressionInput/CEL, ~50 declarations) but TWO runtime
backends — a unified per-record CEL interpreter (works) and a FRAGMENTED
compile-to-filter path (rls-compiler regex + celToFilter field-equality +
read-scope-sql backend, no shared AST). That fragmentation is the root of the
predicate-honesty debt: sharing `condition` never compiled (#1887), RLS `check`
unenforced, inconsistent silent-fail policies.
Decision: one canonical CEL→FilterCondition pushdown compiler on the interpreter's
AST; the supported pushdown subset (no subqueries, ADR-0055); reconcile sharing
#1887 + RLS check; one fail-policy matrix (compile-error / fail-closed-security /
fail-soft-but-logged); a durable Expression Surface Conformance ledger. Scopes OUT
the non-expression experimental subsystems (ADR-0056 D8).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercelBot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
specReadyReadyPreview, CommentJun 21, 2026 4:23am

Request Review

@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation size/m labels Jun 21, 2026
@xuyushun441-sys
xuyushun441-sys merged commit 94a249f into mainJun 21, 2026
15 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the adr/0058-expression-surface branch June 21, 2026 04:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P0][security] SharingRuleSchema disconnected from the live engine

2 participants

@xuyushun441-sys@os-zhuang