Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .changeset/20595-formula-provenance-anchors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
'@objectstack/formula': patch
---

Provenance comments in `@objectstack/formula` cite the commit that decided them, not a tracker number that no longer resolves

Clause-②: no

Comments and docblocks in the package cited an issue-tracker number that now answers 404 on GitHub.
Each one now cites the commit in this repository's history that made the decision it describes. One of
these docblocks sits on an exported member (`SCOPE_ROOTS`), so the reworded text appears in the
published `index.d.ts` / `index.d.mts`; one comment esbuild keeps inside that list appears in the
JavaScript output (`index.js` / `index.mjs`); the sourcemaps do not change.

Comment only: no export, type, error code, status, message text or runtime behaviour changes.
8 changes: 4 additions & 4 deletions packages/formula/src/cel-engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function buildEnv(
* `*When` gate is exactly such a surface — it binds `record` / `previous` /
* `parent` and nothing else — and it used to carry a hand-written DENYLIST of
* three roots instead. A denylist structurally cannot track this list: every
* root added here (`current_user` arrived in #6290) is silently unreported at
* root added here (`current_user` arrived in commit e9b526597) is silently unreported at
* that surface until somebody remembers to copy it over, and #6713 measured 21
* roots sitting in that gap.
*
Expand All @@ -144,7 +144,7 @@ export const SCOPE_ROOTS = [
// env doesn't misread `current.x` as a bare field reference.
'current',
// ADR-0068 D1's CANONICAL user root, and the last one this list was missing
// (#6290). `buildScope` mounts the same `EvalUser` object under
// (commit e9b526597). `buildScope` mounts the same `EvalUser` object under
// `current_user` / `user` / `ctx.user` / `os.user` whenever the evaluation
// carries a user, and this package already told the rest of the platform so:
// `introspectScope` lists `current_user` among the roots it hands an author,
Expand All @@ -157,7 +157,7 @@ export const SCOPE_ROOTS = [

/*
* Why widening this list is the safe direction, and where the narrow verdict
* lives instead (#6290).
* lives instead (commit e9b526597).
*
* This list is a "never faults" BASELINE, not a per-surface contract —
* `SCOPE_ROOTS`'s own doc-comment opens by saying exactly that, and every entry
Expand All @@ -170,7 +170,7 @@ export const SCOPE_ROOTS = [
*
* That matters here because field- and section-level `visibleWhen` genuinely do
* NOT bind `current_user` (#6146, measured at both ends: `evalFieldPredicate`
* binds `record` + `previous` + `parent` and nothing else). Before #6290 that
* binds `record` + `previous` + `parent` and nothing else). Before commit e9b526597 that
* surface's rejection came out of this list's omission as a SIDE EFFECT, and it
* showed: the diagnostic was the generic bare-field one, so it prescribed
* "Write `record.current_user`" — a shape that binds on no layer at all. A
Expand Down
4 changes: 2 additions & 2 deletions packages/formula/src/validate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ describe('validateExpression (ADR-0032)', () => {
});

/**
* [#6290] The package must give ONE answer about what a root is.
* [commit e9b526597] The package must give ONE answer about what a root is.
*
* `introspectScope` is the roots list this package HANDS an author (and the
* agent authoring tool); `firstUndeclaredReference` is the strict env that
Expand All @@ -955,7 +955,7 @@ describe('validateExpression (ADR-0032)', () => {
});

/**
* [#6290] The same drift, seen from `checkRoleCatalog`'s side: its four
* [commit e9b526597] The same drift, seen from `checkRoleCatalog`'s side: its four
* position-membership regexes accept `current_user` / `user` / `ctx.user`
* as the user subject, so a role-catalog verdict on a `current_user`
* predicate was only ever reachable at sites that do not run the
Expand Down
Loading