docs(formula): SCOPE_ROOTS's docblock stops making a false statement about itself - #17904
Conversation
…t about itself
The constant's opening line read as a per-surface accept set ("roots a
`record`-scoped CEL site may legitimately reference"), while the companion
block ninety lines below cited it as saying the opposite — "a 'never faults'
BASELINE, not a per-surface contract — the doc-comment above says so". The
doc-comment above did not say so.
The opening line now states the baseline contract it actually is, denies the
accept-set reading explicitly, and points at the per-surface authority by name:
`@objectstack/lint`'s `fieldRuleRootIssue`, judged against that surface's own
closed `FIELD_RULE_BOUND_ROOTS`. The companion block's self-reference is now
true and anchored to a named symbol rather than to "above".
Comment lines only. `SCOPE_ROOTS` keeps all 27 members unchanged and `app` is
not added.
Claude-Session: https://claude.ai/code/session_01RuoNSXUbBoWHkNS4AknTrM
Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check
What this run could not see
Coarse fallback — 7 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contract reviewHead reviewed: ① derived judgments —— 接受集与公开面变化,逐条点名
⭐⭐ 第 4/5/6 条是本轮复核的重点,理由值得写下来:本卡要修的缺陷就是「一句关于自己的假陈述」。 一个修法若引入新的无法兑现的指针,就是把同一个缺陷换个地方再犯一次。⇒ 本席把新文本做出的每一个可证伪断言都单独验了一遍,三条全部为真。 ⭐ 另记一处超出验收要求的改进,本席认可:验收第 2 条只要求让自引「成立」,而实现把它从位置词(「the doc-comment above」)改锚到具名符号(「 ② semver 定级 —— 与 changeset 声明一致?
③ 边界旗处置 —— 逐旗
独立性对Implemented-by: claude/issue-17409-scope-roots-baseline-docblock (dev 为 判词PASS。 ①②③ 无欠改。落地前检:① 本记录即是;② Generated by Claude Code |
Fixes #17409
Clause-②: no
Scope is C only, per the triage ruling in comment
5648962048(2026-09-12T21:58Z, ruling A′ + C). The card BODY still describes the original, wider question — the ruling supersedes it. The A′ half was transferred to objectui#9318 and is not touched here.SCOPE_ROOTSis not narrowed, andappis not added (objectstack#16420'snot_plannedclosure stands and is not reopened).The defect: a docblock that made a false statement about itself
packages/formula/src/cel-engine.tscarried the claim at two sites, ninety lines apart, and they contradicted each other::67opened the exportedSCOPE_ROOTSdocblock with "Namespace roots that arecord-scoped CEL site may legitimately reference" — read alone, that is the per-surface accept set reading.:134-135asserted "This list is a 'never faults' BASELINE, not a per-surface contract — the doc-comment above says so". The doc-comment above did not say so; it said close to the opposite.This is not a docs nit, and the evidence is a card: the accept-set reading is what a downstream seat took away, and it measurably generated this cross-repo card about a lint/runtime "disagreement" that is not one — the baseline declares
data, the field-rule surface refuses it, and both are correct.Before / after, both sites
Site 1 —
:67, the opening line of theSCOPE_ROOTSTSDoc.Before (one line):
After (two new paragraphs ahead of the retained body, which is unchanged from
Declared so that member access…onward):Site 2 — the companion block, now
:145-150. The self-reference is made true and anchored to a named symbol instead of to the word "above":Before:
After:
The per-surface pointer was verified to exist, not assumed
The ruling asks the docblock to point at
fieldRuleRootIssue/FIELD_RULE_BOUND_ROOTSin@objectstack/lint. Both exist and both are exported from the package entry:Zero behaviour change, measured not asserted
SCOPE_ROOTSkeeps 27 members — counted from the source, not recalled:The diff over those lines is empty —
git diffon the change set produces no+/-line containing a member literal or theas constterminator. The whole diff is comment lines: 18 insertions, 3 deletions in one file, plus the changeset.Narrowing was refuted by measurement rather than preference, and this PR re-verified the seat's reading rather than copying it: 6
*.form.tsmetadata-form modules in this repo carry livedata.predicates —packages/spec/src/data/field.form.ts,data/object.form.ts,ui/action.form.ts,ui/page.form.ts,ui/report.form.ts,ui/view.form.ts.Changeset grade:
patch, forced by adist/measurement@objectstack/formulais released (17.4.0) and itsfiles[]is['dist','README.md','CHANGELOG.md']—src/is not published, butdistis, and TSDoc reachesdist/*.d.ts. Built for real (pnpm --filter '@objectstack/formula...' build, DTS build success), then grepped, with both controls:dist/index.d.tsdist/index.d.mtsThe PER-SURFACE verdict lives inis the standing example (#17409)err toward declaring morezzq-fabricated-phrase-not-in-any-source-17409Subject hits with the lit control lit and the dark control dark ⇒ a published byte moves ⇒
patch, ⛔ notskip-changeset. Same rule as objectstack#17701 / #17702 (patch, measured to reachdist) and #17717 (skip-changeset, measured 0) — opposite measurements, opposite conclusions.Site 2 is a plain block comment attached to no declaration and reads 0 in
dist. So the half that ships is exactly the half that was wrong, which is itself why this is not comment noise.Verification
All commands run in a dedicated worktree at
ce95c8892b; exit codes captured before any pipe.pnpm --filter @objectstack/formula test— 29 files, 856 tests passed0(lock VERDICTcommand-exit 0)pnpm --filter @objectstack/formula typecheck(tsc --noEmit+check:test-typecheck)0(same VERDICT)pnpm --filter '@objectstack/formula...' build(dependency closure:@objectstack/spec+ self)0(lock VERDICTcommand-exit 0)pnpm lint— repo-wideeslint . --no-inline-config, not narrowed0scripts/pm/dispatch-gates.mjs --commands, 53 commands)0, 2 ×3dispatch-gates --ranreconciliation53 derived, 51 run, 2 NOT-MEASURED, 0 UNRUNcheck-changeset-fixed,check:authz-resolver,check:error-code-casing,check:filter-alias-parity0,0,0,0NOT MEASURED — 2 families, reason: prerequisite absent, deliberately not a pass or a failure.
pnpm check:dual-build-cjs-loadsandpnpm check:lean-entry-closureboth exit3withPREREQUISITE NOT MET: they load BUILT entry points across the whole monorepo and this worktree hasdist/for onlyspecandformula. Their own text says "This is NOT MEASURED. It is neither a pass nor a failure, and exits 3 so nothing reads it as either." Both read emitted JS entry points; this diff emits no JS byte at all (site 1 reaches.d.tsonly, site 2 reaches nothing), so neither can be moved by it. CI builds the full tree and measures them there.Acceptance notes
Four acceptance items from the ruling, each mapped:
:67says baseline, not accept set, and points per-surface — done; the opening paragraph states the baseline contract and denies the accept-set reading in the same sentence, and the second paragraph namesfieldRuleRootIssue/FIELD_RULE_BOUND_ROOTSin@objectstack/lint.:134-135's self-reference becomes true or is rewritten — both: it is now true, and it citesSCOPE_ROOTS's doc-comment by name rather than by position, so a future edit that moves the block cannot silently re-falsify it.appnot added — not added; objectstack#16420 is referenced in the changeset as standing, not reopened.Out of scope, noted and not filed:
SCOPE_ROOTSacceptsdataatscope: 'record', and as of objectui#8166 the consumer now FAULTS on it — a permanent lint/runtime disagreement with no open owner #17409 still describes the original, wider question and will mislead anyone who reads the card without first reading the ruling comment. That is card hygiene on a card this PR closes, not a code defect, and the body belongs to the seat that owns it. 承接者: thedomain:engineexecution PM seat, on this PR's review pass.⛔ Left as a draft deliberately: landing is the PM seat's act.
Generated by Claude Code