Skip to content

Declare metadata.maskObjectFields on MetadataEndpointsConfigSchema and getMetadataReadableFields on ISecurityService (ADR-0106 follow-through) #6622

Description

@baozhoutao

Part of #3682 (ADR-0106 metadata-plane FLS, implemented in PR #6612). Filed by the accepting seat per the linkage-chore rule; packages/spec is the spec seat's surface, so the implementing PR deliberately did NOT touch it and shipped both members honoured-but-undeclared. This card is the declaration half.

What ships undeclared today (deliberate, precedented — see PR #6612's report on #3682)

  1. metadata.maskObjectFields (ADR-0106 D8, default on): read via (metadata as any).maskObjectFields in packages/rest's normalizeConfig, following the existing (api as any).enableOpenApi / (api as any).enableSearch precedent. Needs a declared seat on MetadataEndpointsConfigSchemamaskObjectFields: z.boolean().default(true) — so the key is type-safe in objectstack.config.ts.
  2. ISecurityService.getMetadataReadableFields (ADR-0106 D7): implemented in plugin-security and registered as an explicit Object.assign extension of the typed service literal (visible, commented), feature-detected by the dispatch layers with fallback to getReadableFields. Needs the optional member declared on packages/spec/src/contracts/security-service.ts — same precedent as loadDiagnosed/getDiagnosed (dispatcher 多个 domain 调用契约里没有的方法 —— #4087 的同类,只是方向相反(契约缺声明,不是调用点乱编) #4127 batch 4 / fix(metadata,metadata-protocol,objectql): getDiagnosed —— get() 不再把 loader outage 答成「这一项没声明」 (#5840) #6051: call sites and implementation already agree, only the contract is missing).

One spec PR closes both. Acceptance-surface note for the spec seat: declaring an optional member and a defaulted boolean key are additive; whether either needs the strictness-ledger treatment is the spec seat's judgment.

Blocked-by: #3682

(The Blocked-by clears when #3682 closes on PR #6612's merge — the members being declared must exist on main first.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions