Skip to content

feat(formula): align CEL stdlib catalog with runtime (#1928) - #1949

Merged
os-zhuang merged 2 commits into
mainfrom
feat/cel-stdlib-catalog-align
Jun 16, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
feat/cel-stdlib-catalog-align

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Platform fix #1 of #1928. Catalog advertised 25 CEL funcs, only 8 registered; 14 faulted at runtime (daysBetween/abs/round/min/max/upper/lower/len/isEmpty/contains/startsWith/endsWith/matches/date/datetime). Registered the useful set in registerStdLib (dyn-lenient sigs + coercion) and reconciled CEL_STDLIB_FUNCTIONS so every advertised entry resolves; drift-guard test evaluates every entry. 119/119 tests, tsc clean. Pure additions.

🤖 Generated with Claude Code

The authoring catalog (introspectScope / CEL_STDLIB_FUNCTIONS) advertised 25
functions but only 8 were registered; 14 faulted at runtime — authors (incl.
AI) were told to call functions that don't exist (daysBetween, abs, round, min,
max, upper, lower, len, isEmpty, contains, startsWith, endsWith, matches,
date/datetime).

Register the genuinely-useful set in registerStdLib (dyn-lenient sigs + internal
coercion so a Field.date string arg still works) and reconcile the catalog so
every advertised entry resolves. Adds a drift-guard test evaluating every
CEL_STDLIB_FUNCTIONS entry. Pure additions — no change to existing expressions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 16, 2026 7:31am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling size/m labels Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/formula.

5 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/concepts/packages.mdx (via @objectstack/formula)
  • content/docs/guides/formula.mdx (via @objectstack/formula)
  • content/docs/guides/metadata/validation.mdx (via @objectstack/formula)
  • content/docs/guides/packages.mdx (via @objectstack/formula)
  • content/docs/protocol/objectui/record-alert.mdx (via @objectstack/formula)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

…lib fn

Demonstrates (and regression-covers, via the example build) the newly-registered
`daysBetween` — the canonical "days remaining" formula. Browser-verified: computes
+30/+60/… for open deals and negative for past closed_won dates.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant