Repository navigation
feat(lint): report a declared field with zero consumers across the registered metadata roots (#15922) - #16323
Conversation
…gistered metadata roots New advisory rule `field-no-consumers` (`validateFieldConsumers`): an object field that nothing in the stack reads or displays is a warning on validate, build and lint. Object-aware (the same name on two objects gets two verdicts), carriers (translations, seeds, mappings, permission grants, flow writes, prose) never count, and the finding carries the verdict, the carrier paths a removal must clean, and the roots scanned. Exemptions are derived from the spec: injected system columns, the ADR-0079 title field, master_detail. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
…o-consumers is registered `check:docs-transcript-drift` holds the four hand-written `os validate` / `os build` transcripts equal to what `authoringRulesFor()` derives; the new registry entry moves that count from 42 to 43. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
📓 Docs Drift CheckThis PR changes 1 package(s): 74 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 5 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 93af4788b79249c26c60aaffc638d3c23ca5f257 && git checkout 93af4788b79249c26c60aaffc638d3c23ca5f257
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ac6213ee95e49fa62af824b60a062b3f97dfc87f ad909f3709ea7721cd8fca35c4ee82fec04e7c0a && git checkout -B drift-repro ac6213ee95e49fa62af824b60a062b3f97dfc87f && git merge --no-ff ad909f3709ea7721cd8fca35c4ee82fec04e7c0a
node scripts/docs-audit/affected-docs.mjs --json ac6213ee95e49fa62af824b60a062b3f97dfc87f
|
…nd the inline grid's line-position field (objectstack-ai#32276) domain:spec#3 · os-support-ai · session_01WGufzh7cM8EmUX4T2CBNHX <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBD51tXwx3Q3tVXsAku498wA)_ Closes objectstack-ai#32256 Clause-②: yes (widening) Metadata-protocol: none ## 维护者速读 - 改了什么:`field-no-consumers` 不再把两类其实有人读的字段报成「没人用」:① 权限集行级安全策略 `rowLevelSecurity[].using` / `.check`(以及对象自己的 `defaultRowScope`)里按字段过滤或校验的字段;② 内联明细表拖拽排序时写入、加载时按它排序的「行序字段」(如 `position`)。spec 新增一个纯函数 `deriveInlineGridSortField`,按渲染器同一规则算出这个字段,名单本身仍不公开。showcase 白名单里为这两个误报加的两条随之删除。 - 为什么改:showcase 上 `showcase_invoice.owner`(被 `invoice_own_rows` 的 `using` 每次查询读取)和 `showcase_invoice_line.position`(发票明细表的行序字段)被误报;PR objectstack-ai#32233 只能先把它们列进白名单。 - 风险与回滚:只是一条建议级(warning)lint 少报误报,不拒收任何元数据;spec 只多一个导出函数,不改任何 schema。权限集里除行级策略以外的路径(字段级授权等)仍算「只携带不读取」。回滚即 revert。 - 先看:① `packages/lint/src/validate-field-consumers.ts` 的 `isRlsPredicateSite` 与 `creditInlineGridSortField`(两处计入点);② `packages/spec/src/data/inline-grid-columns.ts` 的 `deriveInlineGridSortField`;③ `examples/app-showcase/test/author-time-advisories.test.ts` 删掉的两条白名单。 - 两分钟验证:`pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/validate-field-consumers.test.ts -t 32256`,预期两组共 16 条全绿(行级策略 9 条、行序字段 7 条)。 - 需要你做的:无,席位落地。 ## What changes - **`packages/lint/src/validate-field-consumers.ts`, credit 1: a row-level security predicate is a read.** `CARRIER_ROOTS` still lists `permissions`, and every path under it stays a carrier except a policy's two predicate clauses, `permissions[].rowLevelSecurity[].using` and `.check`. Those are now `behaviour` sites, and their text is scanned as an expression (every bare identifier a candidate), because a policy names its fields as bare CEL identifiers (`owner == current_user.email`). The policy's `object` is the context the walk already resolves, so the field is credited on the object the policy filters, never on another object declaring the same name. - `using` is compiled into the row filter of every read, update and delete the policy governs (ADR-0056 D4); `check` is matched against every row an insert or update writes (ADR-0058 D4). Both read the field on every request, as a sharing-rule `condition` (already credited) does. - The key names are typed against the spec rather than read from it: `'rowLevelSecurity' satisfies keyof PermissionSet`, and `['using', 'check'] satisfies readonly (keyof RowLevelSecurityPolicy & keyof DefaultRowScope)[]`. The spec exports no list of a policy's predicate clauses (its own refinement names the same two members by hand), and `satisfies` turns a rename there into a typecheck failure here instead of a credit that quietly stops matching. - **Same class, fixed in place:** an object's `defaultRowScope` (`DefaultRowScopeSchema`, enforced by `plugin-security`'s `object-default-row-scope.ts`) is the same policy with the object implied. It was already a behaviour site under `objects`, but `using` / `check` were not scanned as expressions, so a field only it filters on was reported `inert` (repro in Acceptance notes). The same predicate test now covers `objects[].defaultRowScope.using` / `.check`, keyed by `'defaultRowScope' satisfies keyof ServiceObject`. - **Credit 2: an inline grid's line-position field is a read.** The renderer resolves, on every inline grid, the child field it stamps each line's position into on drag-reorder and orders the child rows by (`deriveDetail` in `ui/packages/plugin-form/src/deriveMasterDetail.ts`; `MasterDetailForm.tsx` sets `sortField` from it on both the authored-columns and the derived branch and adds it to the child fetch's `$orderby`). No column draws it: both spec derivations skip the sort-position names. The rule now credits that field as `behaviour` through the spec's own derivation on each carrier that draws a grid: a `lookup` / `master_detail` field that sets `inlineEdit` (authored `inlineColumns` or derived), and every `subforms` / `details` collection entry. A `record:line_items` panel is not credited: it does not go through `deriveDetail`. - **`packages/spec/src/data/inline-grid-columns.ts`: new `deriveInlineGridSortField(def)`** on `@objectstack/spec/data`. The renderer's rule, reproduced exactly: the first child field, in field-map order, whose name is one of `INLINE_GRID_SORT_FIELDS`; no flag or type is consulted; `undefined` when the child declares none or carries no field map. `INLINE_GRID_SORT_FIELDS` stays private (no barrel re-export, no subpath), as its module says. The module note gains a section on it. Generated `api-surface/data.json` and `export-origins/data.json` each gain the one line. - **`packages/lint/src/rule-explanations.ts`.** `os explain field-no-consumers` lists both reads among the consumers, and the carrier paragraph says "a field-level permission grant". - **`examples/app-showcase/test/author-time-advisories.test.ts`.** The two `field-no-consumers` allow-list entries objectstack-ai#32233 added for these false positives (`showcase_invoice.owner`, `showcase_invoice_line.position`) are deleted, with their section heading. The list is two-directional, so it now requires both findings to be gone. - **`.changeset/32256-field-consumers-rls-and-grid-position.md`.** `patch` for `@objectstack/lint` and `@objectstack/spec`, with both declaration lines. Responsibility: `CARRIER_ROOTS` with `permissions`, and the branch where a carrier root decides the bucket before anything else is asked, came in with the rule itself (`a87163c89b`, objectstack-ai#16323). The later inline-grid credits (objectstack-ai#20929, objectstack-ai#20951, objectstack-ai#21091) covered the columns, the join key and the row form, never the line-position field; the renderer derives that field from the child since objectui#11070, after the authored `sortField` was retired. ## Why objectstack-ai#32256: the QA run for objectstack-ai#32168 found both showcase findings (class a) and objectstack-ai#32233 allow-listed them as a workaround. The card asks for both credits, a negative for each, and the two entries off once objectstack-ai#32233 merged. It merged as `d391babc`; this branch is on it. Seat ruling on the card (claim amendment 2): route A, one spec helper; `INLINE_GRID_SORT_FIELDS` stays private. Prior rulings read (`check-prior-rulings.mjs --card 32256 --terms field-no-consumers,CARRIER_ROOTS,rls,inline-grid`, 35 hits): ADR-0056 D4 and ADR-0058 D4 decide that `using` and `check` are compiled and enforced, which is why both clauses count as reads; ADR-0058 D5 (security predicates fail closed) changes nothing here. The other hits (ADR-0054 §3, ADR-0055 §1/§4, ADR-0056 D2/D3/D9, ADR-0058 D1/D6) touch RLS enforcement, not this rule. ## Tests All new lint pins are top-level `describe` blocks in the rule's existing harness, `packages/lint/src/validate-field-consumers.test.ts`, placed above the two `objectstack-ai#22161` blocks that must stay last (they read what the cases above fired). **`[objectstack-ai#32256] … a row-level security predicate reads the fields it names`** (9 cases). Two objects (`inv`, `other`) both declare `owner`; `inv` also declares `region`. - Baseline: no policy, `owner` reported on both. - `using` (`owner == current_user.email`) credits `inv.owner`; `check` on an `update` policy credits it the same way. - A compound `using` credits every field it names (`owner`, `region`). - A name-keyed `permissions` map reads the same as the array shape. - An object's `defaultRowScope` with `using` and `check` credits `inv.region` and `inv.owner`. - ⛔ A field-level grant beside the policy stays a carrier: `inv.region` is `carrier-only` with exactly `permissions[0].objects.inv.fields.region`. - ⛔ The predicate credits only the object it filters: `other.owner` stays `inert`. - ⛔ The same predicate text under an ordinary object key (`description`) credits nothing. **`[objectstack-ai#32256] … an inline grid reads its line-position field`** (7 cases). The child `lin` declares `position` then `sort_order`. - Baseline: a `lookup` with no `inlineEdit` leaves both sort-named fields reported. - A grid with authored `inlineColumns: [{ name: 'qty' }]`, and one with derived columns, both credit `position` only. - A form view `subforms` entry and an `object-master-detail-form` `details` entry credit it on their `childObject`. - The field is the first sort name in the child's FIELD order: with `sort_order` declared first, `sort_order` is credited and `position` reported. - ⛔ The child's second sort-named field stays reported, and so does a sort-named field on the parent. **`packages/spec/src/data/inline-grid-columns.test.ts`, `deriveInlineGridSortField`** (5 cases): resolves the declared name; first match in field order, not list order; flags and type are not consulted; the resolved name is one both derivations leave out; a look-alike name (`order`, `rank`) and a missing field map resolve `undefined`. <details><summary>Runs at the final head (c448e8e)</summary> ```text pnpm --filter @objectstack/lint typecheck && pnpm --filter @objectstack/lint test (under os-verify-lock) Test Files 199 passed (199) Tests 8427 passed (8427) os-verify-lock: VERDICT command-exit 0 pnpm --filter @objectstack/spec typecheck && pnpm --filter @objectstack/spec test (spec unchanged since 297e59f) Test Files 833 passed (833) Tests 26580 passed | 1 todo (26581) os-verify-lock: VERDICT command-exit 0 examples/app-showcase: pnpm exec vitest run test/author-time-advisories.test.ts Tests 2 passed (2) ``` </details> ### Ablations Each ran from a committed head through `scripts/ablation-replace.mjs` on `packages/lint/src/validate-field-consumers.ts` (the suite imports the rule from source, so no rebuild is involved). Every restore was checked: `git diff HEAD` empty afterwards. <details><summary>A: drop the permission-set credit (`if (isRlsPredicateSite(root, segments)) return 'behaviour';` deleted): 4 red</summary> ```text ablation-replace: ok mutation landed: anchor 1 -> 0, blob 62b396f -> 367a7c93f76f × a `using` predicate reads its bare field, on the object the policy names × a `check` predicate is the same read, on the row a write produces (ADR-0058 D4) × every field a compound predicate names is read × a name-keyed permission set map reads the same way Tests 4 failed | 171 passed (175) ``` </details> <details><summary>B: drop the relationship grid's sort-field credit (the `creditInlineGridSortField(…, `${fieldPath}.inlineEdit`)` call deleted): 4 red</summary> ```text ablation-replace: ok mutation landed: anchor 1 -> 0, blob 62b396f -> 0f9c8109e183 × a grid with authored `inlineColumns` reads `position`, which no column draws × a grid with derived columns reads it too (the derivation skips it as a column) × the line-position field is the first sort name in the child's FIELD order, not the list's × ⛔ a child field the grid does not derive stays reported, and so does the parent's own sort-named field Tests 4 failed | 171 passed (175) ``` </details> <details><summary>C: drop the `defaultRowScope` arm (replaced by `false`): 1 red</summary> ```text ablation-replace: ok mutation landed: anchor 1 -> 0, blob aaac992 -> 8cdb8220969c × an object's `defaultRowScope` is the same policy, on the object that declares it Tests 1 failed | 176 passed (177) ``` </details> ## Acceptance notes - **`current_user.*` paths.** In an RLS predicate, `current_user.email` matches the rule's `.x` reference shape, so a field named `email` on the policy's object would also be credited. That is the scan every expression site already gets (a sharing-rule `condition` included) and the quiet direction the rule's header chooses ("under-crediting is the noisy direction"). Not narrowed here. - **A field permission's `when`** (`permissions[].objects.X.fields.Y.when`, a CEL row condition on the edit vote) is still a carrier, as the card asks ("every other path under `permissions` stays a carrier"). It does read the fields it names; whether that is a consumer is not decided here. carrier: none. - **`defaultRowScope` repro (in-place fix).** Before this branch, `validateFieldConsumers({ objects: [{ name: 'o', defaultRowScope: { operation: 'select', using: "region == 'emea'" }, fields: { name: { type: 'text' }, region: { type: 'text' } } }], views: [{ list: { data: { object: 'o' }, columns: [] } }] })` returned `region` as `inert` (measured on the built lint dist, `[["region","inert"]]`). The four in-place conditions hold: same defect class, the same predicate test, a file this claim holds, the same gate family. The showcase declares no `defaultRowScope`, so the showcase readings do not move. - `packages/spec/src/data/inline-grid-sort-fields.ts` still says "Two readers here"; the new helper sits in one of them (`inline-grid-columns.ts`), so the sentence stays true and the file is untouched. ## Verification **`os validate --json` on `examples/app-showcase`, before and after.** Before = this branch with `validate-field-consumers.ts`, `rule-explanations.ts` and `inline-grid-columns.ts` checked out from `origin/main` (`d391babc`) and `@objectstack/spec`, `@objectstack/lint`, `@objectstack/cli` and `@objectstack/rest` rebuilt (the CLI and `rest` bundle the lint rules); after = the final head, the same four rebuilt. Findings compared as whole JSON objects. ```text before 31 warnings field-no-consumers 3 (+ approval-approvers-may-resolve-empty 11, security-rollup-source-unreadable 9, …) after 29 warnings field-no-consumers 1 (every other rule's count identical) gone: field-no-consumers · object "showcase_invoice" · field "owner" field-no-consumers · object "showcase_invoice_line" · field "position" new: 0 ``` The remaining `field-no-consumers` is `showcase_semantic_zoo.notes`, allow-listed on purpose. With the two allow-list entries removed, `test/author-time-advisories.test.ts` fails on the before build (`new author-time advisories: … [ "field-no-consumers · object \"showcase_invoice\" · field \"owner\" · objects[].fields.owner", "… showcase_invoice_line … position …" ]`) and passes on the after build (2/2). The same two disappeared, and nothing else moved, when first measured at the claim's base `a2bdaea1` (before objectstack-ai#32233 merged): 77 → 75 warnings, field-no-consumers 49 → 47. **Gates.** All 91 families `node scripts/pm/dispatch-gates.mjs --commands` derives for this diff ran locally at the final head `c448e8e3eb`, each with its exit code captured before any pipe, and every one exited 0. `--ran` reconciliation: "91 derived famil(ies) accounted for — 91 run, 0 NOT-MEASURED (a DERIVED zero — all 91 recorded an exit code and none of them is 3)". The record is `gates-ran.list` beside this body's draft. `check-changeset-no-major` ran with this body as the `--event` payload: "LEVEL AXIS: this PR declares clause-② `no` and metadata-protocol `none`, and it introduces no changeset entry graded `minor` or above". `check:dual-build-cjs-loads` first answered `PREREQUISITE NOT MET` (exit 3: six packages had no dist), then a load failure while other gates were rebuilding dists beside it; after building the six and with nothing else running it passed ("122 published require entry point(s) across 72 package(s) load"). Local-only: `check:skill-frame-freshness` green; `check:dev-prereqs` reports this box's `ui/**` packages unbuilt, a reading about the container, not the diff. `pnpm --filter @objectstack/spec check:generated`: "All 14 generated artifacts are up to date". **Not run locally, declared to CI:** the vitest `repo` project (`Test Core`), the repo-wide `pnpm lint`, the full dogfood battery (no `!` in the title, no `(narrowing)` arm). --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzejML1KeqT77XQrAiu)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
Fixes #15922
Clause-②: yes
What this adds
A new advisory rule in
@objectstack/lint,field-no-consumers(validateFieldConsumers), registered inAUTHORING_RULESsoos validate,os buildandos lintall run it. It reports, as awarning, an object field that nothing in the stack reads or displays — the field-level remainder of #4698 (that card is not addressed here; this is the platform half of the hotcrm#1543 ruling F, verbatim 「1543 选 F」, under which HotCRM retired its own scanner).The retired scanner was read as design input, not ported: its judgements (object-aware resolution, the consumer/carrier split, prose is not a read, a flow WRITE is a carrier) are carried; its implementation is not. The rule is built on the package's shared primitives —
collectionEntries(positional paths on both collection shapes),recordsOf,injectedColumnsFor, and the spec'sresolveDisplayField.Derived judgments (for the in-seat contract review)
behavioursites and zerodisplaysites across the scanned roots;carriersites never rescue it. Exempt: registry-injected system columns an author re-declared (injectedColumnsFor, i.e.resolveInjectedSystemColumnsin@objectstack/spec/data), the record title field (resolveDisplayField, the ADR-0079nameFieldladder —packages/spec/src/data/display-name.ts:220), andmaster_detailfields (ADR-0035 —packages/objectql/src/master-detail.tsnames cascade delete,controlled_by_parentsharing, roll-ups and inline grids as readers of the relationship). A stack that declares no consumer root at all (objects only, or objects plus carriers) is not judged.validateFieldConsumers,FIELD_NO_CONSUMERS,FIELD_CONSUMER_ROOTS,FIELD_CARRIER_ROOTS; typesFieldConsumerFinding,FieldConsumerVerdict,FieldConsumerSeverity. The finding shape is the standard six keys plusobject,field,verdict,carriers[](config paths a removal must clean) androotsScanned[].tier: 'advisory',input: 'normalized',commands: ALL,surfaces: CLI_ONLYwithsurfaceReason: RUNTIME_NEEDS_FULL_SNAPSHOT— the sharpest instance of that reason in the table: the verdict is the ABSENCE of a reference across views / pages / flows / datasets, none of which the per-write snapshot carries, so on an object write it would report every field of the written object as inert.Taxonomy decision — one rule id, verdict on the finding
HotCRM's scanner produced
live/display-only/inertwith a separate carrier count (its code has three verdicts, not four). Decided on the four axes:display-onlyis the ordinary state of most fields (a drawnphone) and the scanner itself listed it only under--all— reporting it would be noise, so it is not a verdict here.verdict: 'inert' | 'carrier-only',carriers[]); if a consumer ever needs separate ids the split is additive, whereas retiring two ids later is a breaking change.carrier-onlyas "fine" and laundering the inert class through it.Severity:
warning, per triage's placement; a refusal would narrow the authorable surface (today-valid metadata would start being refused) and is the maintainer's call, not this PR's. The rule never emitserror(the wiring guard reads its source to hold that).Boundaries, stated in the rule and in every finding
rootsScannedand the hint: consumersobjects, views, pages, apps, flows, dashboards, reports, datasets, actions, hooks, jobs, emailTemplates, agents, tools, skills, apis, webhooks, sharingRules, analyticsCubes; carrierstranslations, data, mappings, permissions.test/fixtures are never scanned — the boundary that made hotcrm#1543 a decision is written down rather than left as lore.object/objectName/targetObject/data.object/config.objectName/list.data.object/ adatasetresolved to its object / a map keyed by object name / a flow's trigger object), and only when that object declares the token; in a text blob the nearest preceding mention of a declared object is a second candidate. The same name on two objects gets two verdicts, and the finding names the other objects so a per-object verdict is never mistaken for a name-level one.{record.x}in a notify message) is a read.source,expression,condition, …) a bare identifier is a read (total_amount >= 5000in a flow trigger); elsewhere only reference shapes count (record.x, a quoted name, a{x}token, an object-literal key).Corpus reading —
examples/*atad909f370Spot-checked against the source rather than trusted: app-crm's
crm_account.*/crm_contact.*rows are real (that example ships no view for either object; the views index exports Opportunity, Lead and Activity only),crm_opportunity.days_to_closeis a formula nothing draws,showcase_task.sync_statusis only ever WRITTEN by a flow, andshowcase_field_zoo.f_imageis named nowhere outside its declaration. Two spot checks found walker misses and were fixed with pins: theceltagged-template envelope'ssourcetext was being skipped (quantity/unit_price on the CRM line item), and a bare identifier in a triggerconditionwas not a reference shape (total_amounton the showcase expense report).packages/apps/*(setup / studio / account) are plugins, not authored stacks — their own tests say so — so there is no stack to run the rule over; no reading is invented for them. HotCRM's currentmainwas not re-derived: thehotcrmrepository is outside this session's scope (its retired scanner source was readable, its current stack was not loaded), so no HotCRM count appears here and the historical 15 is not used as an acceptance number.These findings are data, not things this PR fixes. The one design question the corpus raises is recorded below for the maintainer.
Tests and gates — pinned to
ad909f370packages/lint/src/validate-field-consumers.test.ts— 25 tests: the five-verdict fixture with the same-name pair (assert by rule id AND declaration path), positional path on the array shape, negative control (all consumed → zero findings), the skip gate, each derived exemption both ways, one credit per root, carriers never rescue, prose vs template, bare identifier in an expression, and registry wiring end to end throughrunAuthoringRuleson all three commands.pnpm --filter @objectstack/lint test—Test Files 100 passed (100) · Tests 3405 passed (3405);pnpm --filter @objectstack/lint typecheck— tsc clean andcheck:test-typecheck: OK.5 failed | 20 passed), restored withgit checkout HEAD -- path, blob hash equal to HEAD's andgit diff HEADempty. The test imports the rule fromsrc(relative.jsspecifier, noexportshop), so no dist preflight applies.dist:@objectstack/cliunit tier180 passed (180)(one pin file first refused on an unbuilt CLI, then measured green afterpnpm --filter @objectstack/cli build; the integration tier is declared to CI),@objectstack/metadata-protocol166 passed | 2 skipped,@objectstack/platform-objects35 passed,@objectstack/example-crm5 passed,@objectstack/example-todo4 passed.node scripts/pm/dispatch-gates.mjs --ranatad909f370:82 derived, 82 run, 0 UNRUN. Two of those runs are NOT MEASURED, not green:pnpm check:type-check-debtandpnpm check:dual-build-cjs-loadsboth exit 3PREREQUISITE NOT MET(unbuilt dists in this worktree). Every other family exited 0, includingcheck:docs-transcript-driftafter the second commit.check:docs-transcript-driftholds four hand-writtenos validate/os buildtranscripts undercontent/docs/equal to whatauthoringRulesFor()derives; the new registry entry moves that count from 42 to 43, so those four lines moved with it.Changeset:
.changeset/lint-field-no-consumers.md—@objectstack/lintminor.Open question for the maintainer (not a blocker)
Should default-layout rendering count as display? A form view with no declared sections renders every field, and a nav-exposed object gets a default list and detail — so on the showcase, roughly half the rows are fields drawn only by a default layout. The rule reads declared metadata only (the same definition HotCRM's adjudicated ledger used, and AGENTS.md's "explicit composition over default magic"), and states the boundary in every finding. Recommendation: keep declared-only, and read the corpus counts as the volume cost of that choice; if the maintainer prefers the default-layout credit, it is a bounded follow-up (credit every non-hidden field of an object that has a section-less form view or a nav entry).
🤖 Generated with Claude Code
https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
Generated by Claude Code