feat(core)!: retire DataScopeManager and its row-level filter types (objectui#7750) - #10467
Conversation
Deletes the class, its shared instance, the RowLevelFilter and DataScopeConfig types, their barrel exports and the class's two test files. ViewDataProvider and the element data-source helpers in the same module stay exported. Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN Co-authored-by: Claude <noreply@anthropic.com>
The core README teaches evaluateExpression alone, the architecture overview lists what data-scope/ still holds, the doc-example ledger drops the row for the deleted example, and the evaluator docblocks stop citing the deleted file while keeping their point about the guard. The changeset states the removed public API as BREAKING (minor, per the fixed group's version policy) and reconciles the pending entries that describe the class. Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN Co-authored-by: Claude <noreply@anthropic.com>
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contract reviewServed-tier: Branch ① Derived judgmentsRemoval set — exactly the ruled set plus Nothing else moved. In-repo consumers: zero. Surface pin: the dev's H3 is verified — none exists. Docblock rewrites — comment-only and true. README and docs — true at head. README's "Expressions" section imports only ② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #7750
Clause-②: yes
Executes ruling
5564753628on objectui#7750 (option C, maintainer 「同意」):DataScopeManagerand itsRowLevelFiltervocabulary are retired from@object-ui/core. No alias, no deprecation window. Implemented by thedomain:uiseat 2 dispatch, sessionhttps://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN.Public surface removed (
@object-ui/core)DataScopeManagerdefaultDataScopeManagerRowLevelFilterDataScopeConfigregisterScopeWithConfig; nothing else in the repo read it, so it goes with the class)Kept:
ViewDataProviderand every element data-source export indata-scope/, and theexport * from './data-scope/index.js'line in the package barrel.DataScope/DataContextin@object-ui/typesare not touched (not ruled).Files
packages/core/src/data-scope/DataScopeManager.tsand its two tests__tests__/DataScopeManager.test.ts,__tests__/DataScopeManager.hardening.test.tspackages/core/src/data-scope/index.ts: the four-name export block removed; the module docblock now describes what the module still holds and says row-level security is not evaluated herepackages/core/README.md: the "Data Scope" section becomes "Expressions" (evaluateExpressionalone); the matching Features bullet followscontent/docs/guide/architecture-overview.md: thedata-scope/line in the directory map names what is leftscripts/check-doc-example-types.mjs: the ledger row for the deleted class's@exampleis removedpackages/permissions/src/evaluator.ts: the two docblock pointers to the deleted file are rewritten; they keep their point about the guard and cite only issuespackages/permissions/src/__tests__/evaluator.prototype-guard-8044.test.ts: outside the claim's file surface. Its header docblock cited the deleted file by path and the class by name, the same dangling-pointer class as the twoevaluator.tspointers. Bounded in-place repair: same defect class, mechanical, no open PR touches the file (all 12 open PR file lists read), same gate family (the permissions suite already runs forevaluator.ts). Comment-only..changeset/7750-retire-datascopemanager.md:'@object-ui/core': minorwith a BREAKING body naming each removed export, "no replacement", and the migration (row-level security is the spec'sRowLevelSecurityPolicySchemausingCEL predicate, lowered to an ObjectQL filter, fail-closed).minor, notmajor, per this repo's AGENTS.md version section, enforced bycheck-changeset-no-major; precedent PR objectui#10453. One paragraph reconciles the three pending entries that describe the class (the twocore-datascope-*entries andpermissions-evaluator-prototype-guard-8044), which are not edited (check-changeset-overwrite).Premise checks on this base (
ab50ccc)git grep -E "DataScopeManager|RowLevelFilter|defaultDataScopeManager|DataScopeConfig"over the whole tree minus CHANGELOGs: on the head only the three pending changesets named above still hit. Lit controlViewDataProvider: 16 files.DataContext(@object-ui/types): with the class gone it has no implementer and no consumer in this repository, only its declaration and the types barrel. Not removed, not ruled.@object-ui/core. PR objectui#10426 (1237ae4) regenerated no artefact (its 25-file diff has no generated file);scripts/dump-public-manifest.mjsdumps the SDUI component manifest from a browser build, not package exports; no committed file lists core's exports (control:composeElementDataSourcehits no json, snap or api file). The instruments that read core's export set arecheck:readme-exports(TypeScriptgetExportsOfModuleon the builtdist/index.d.ts) andcheck:doc-examples(its ledger). Both are shown red on the removal commit and green on the head below. There was nothing to regenerate.Red, then green
Removal-only commit
094a2bd, core rebuilt from a cleandist/:node scripts/check-readme-exports.mjsexit 1:check-readme-exports: 1 README import name(s) NO package exports/packages/core/README.mdteachingimport { DataScopeManager } from '@object-ui/core'; export symbols read 3379 on the base, 3375 here (the four names).node scripts/check-doc-example-types.mjsexit 1:STALE LEDGER ROW packages/core/src/data-scope/DataScopeManager.ts DataScopeManager #1.scripts/__tests__/check-doc-example-types.test.ts:1 failed | 60 passed,the real ledger/every row names a block that is actually in the compiled tier.Head: all three green (numbers below). Both gates were green on the base too (
ab50ccc: readme-exports exit 0, doc-examples exit 0, 89 ledger rows).Local verification
Gate union on
ee616cc(the head):check-changeset-presenceexit 0:6 source file(s) of 2 released package(s) changed, and this change declares 1 changeset(s)check-changeset-fixedexit 0,check-changeset-no-majorexit 0 (No changeset declares a major bump),check-changeset-overwriteexit 0 (No pre-existing changeset was modified or deleted),check:changeset-claimsexit 0 (report-only)check:new-line-citationsexit 0:VERDICT new-cross-file-line-citations: 0 new citation(s)check:control-bytesexit 0check:readme-exportsexit 0:543 real, 0 wrong-path, 0 fabricated, 3375 export symbolscheck:doc-examplesexit 0: 123 blocks, 88 ledger rows,Every covered @example compiles, or fails exactly as its ledger row declaresdocs:check-linksexit 0,check:doc-snippetsexit 0vitest run scripts/__tests__/check-pending-changeset-literals.test.ts scripts/__tests__/check-changeset-no-major.test.ts scripts/__tests__/check-doc-example-types.test.ts(the suites that read.changeset/or the edited ledger):Test Files 3 passed (3),Tests 83 passed (83)On
9bb75c6(its tree differs fromee616cconly in the changeset's wording, 4 lines):pnpm exec vitest run packages/core/ packages/permissions/ scripts/__tests__/check-doc-example-types.test.ts scripts/__tests__/check-pending-changeset-literals.test.ts:Test Files 179 passed (179),Tests 3663 passed (3663)pnpm --filter @object-ui/core --filter @object-ui/permissions type-check: bothDone, exit 0vitest run scripts/__tests__/check-doc-example-ids.test.ts scripts/__tests__/check-doc-example-types.test.ts(the suites that name the edited script): 87 passed;pnpm type-check:scriptsexit 0check:doc-fences,check:doc-types,check:unreferenced-sources,check:doc-example-readers,check:esm-specifiers: all exit 0--no-inline-config --format json) on the four touched lintable source files: 4 files, 0 errors, 0 warnings; the config has no type-aware linting, so deleting or editing these files cannot change a verdict on an untouched file. The repo-widepnpm lintis left to CI.Consumer closure: the downstream type-check of every
@object-ui/coreimporter is left to CI'sType Check; locally the tree-scoped absence grep above is the evidence that no importer names a removed export.Acceptance notes
DataContextandDataScope(@object-ui/types) have no implementer or consumer left in this repository. Observation only, not carded (zero pull, not ruled).needs:contract-reviewis the seat's label to set at landing (Clause-② yes).Generated by Claude Code