Measured during the #13594 decisive census (issue comment 5479634264 there): the exported constant CEL_STDLIB_FUNCTIONS (packages/formula/src/validate.ts:545) lists 35 function names, while the cel-js Environment built in packages/formula registers 72 distinct names. The 37 registered-but-unadvertised names include type, map, filter, exists, split, substring, getFullYear, base64, json, orValue — all resolve and evaluate today.
Why it matters — the hazard was nearly realized the same afternoon
The #13594 ruling (branch one) extends the lint gate to reject unknown CEL functions at ERROR level. An implementer keying that gate on this constant — the obvious-looking move, since the constant's name says "the stdlib" — would reject all 37 real functions as unknown. The ruling therefore pins the oracle to the engine's own check() verdict (execution comment 5479679994 on #13594), but the trap stays armed for every OTHER consumer of the export: docs generators, autocomplete surfaces, any future validator.
The question for grading
Is the constant meant to be:
- the complete registry — then it is stale by 37 entries and should be derived from the registration site (or
Environment.getDefinitions()) rather than hand-maintained; or - a deliberately advertised subset — then its name and docblock must say so, so no consumer treats it as complete.
Either way the fix owes a drift pin: the constant is a subset of the registered set (route 2) or equals it (route 1), asserted against the real Environment, so the two can never silently diverge again.
Refs: #13594 (census + ruling), packages/formula/src/stdlib.ts (27 registerFunction sites, the registration ground truth).
⛔ Filed unassigned — recording only, for the finding box to grade.
Measured during the #13594 decisive census (issue comment 5479634264 there): the exported constant
CEL_STDLIB_FUNCTIONS(packages/formula/src/validate.ts:545) lists 35 function names, while the cel-jsEnvironmentbuilt inpackages/formularegisters 72 distinct names. The 37 registered-but-unadvertised names includetype,map,filter,exists,split,substring,getFullYear,base64,json,orValue— all resolve and evaluate today.Why it matters — the hazard was nearly realized the same afternoon
The #13594 ruling (branch one) extends the lint gate to reject unknown CEL functions at ERROR level. An implementer keying that gate on this constant — the obvious-looking move, since the constant's name says "the stdlib" — would reject all 37 real functions as unknown. The ruling therefore pins the oracle to the engine's own
check()verdict (execution comment 5479679994 on #13594), but the trap stays armed for every OTHER consumer of the export: docs generators, autocomplete surfaces, any future validator.The question for grading
Is the constant meant to be:
Environment.getDefinitions()) rather than hand-maintained; orEither way the fix owes a drift pin: the constant is a subset of the registered set (route 2) or equals it (route 1), asserted against the real
Environment, so the two can never silently diverge again.Refs: #13594 (census + ruling),
packages/formula/src/stdlib.ts(27registerFunctionsites, the registration ground truth).⛔ Filed unassigned — recording only, for the finding box to grade.