From 7a520db9d7731424ca92b899b78eba150dff78a4 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 3 Oct 2026 20:22:28 +0000 Subject: [PATCH 1/2] docs(formula): re-anchor the dead tracker citations to the commit that decided them Six comment and docblock sites in packages/formula cited a tracker number that now answers 404 (four census sites in src/cel-engine.ts, two test comments in src/validate.test.ts). Each now cites commit e9b526597, the change that added current_user to SCOPE_ROOTS and moved the field-level rejection into its own rule. Comment text only; no line count changes. Claude-Session: https://claude.ai/code/session_017ErfyP2Rx7XWHJA27QjyUi Co-authored-by: Claude --- packages/formula/src/cel-engine.ts | 8 ++++---- packages/formula/src/validate.test.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/formula/src/cel-engine.ts b/packages/formula/src/cel-engine.ts index 667f87448ee..6fa1738be71 100644 --- a/packages/formula/src/cel-engine.ts +++ b/packages/formula/src/cel-engine.ts @@ -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. * @@ -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, @@ -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 @@ -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 diff --git a/packages/formula/src/validate.test.ts b/packages/formula/src/validate.test.ts index 879936ab348..832c4f069ec 100644 --- a/packages/formula/src/validate.test.ts +++ b/packages/formula/src/validate.test.ts @@ -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 @@ -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 From b89eb86cbe1542c7adea98424516f17ca3a10a70 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 3 Oct 2026 20:29:58 +0000 Subject: [PATCH 2/2] chore(changeset): patch for @objectstack/formula provenance comments Two of the four rewritten cel-engine.ts lines reach the published dist (the SCOPE_ROOTS docblock in the declarations, one kept comment in the JavaScript), measured with a three-leg dist reading. Claude-Session: https://claude.ai/code/session_017ErfyP2Rx7XWHJA27QjyUi Co-authored-by: Claude --- .changeset/20595-formula-provenance-anchors.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .changeset/20595-formula-provenance-anchors.md diff --git a/.changeset/20595-formula-provenance-anchors.md b/.changeset/20595-formula-provenance-anchors.md new file mode 100644 index 00000000000..9cb49b8b5b0 --- /dev/null +++ b/.changeset/20595-formula-provenance-anchors.md @@ -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.