Uh oh!
There was an error while loading. Please reload this page.
fix(metadata-admin): drop policy client-validator (PolicySchema removed in spec 11.2.0) - #2098
Merged
Merged
Conversation
…ed in spec 11.2.0) Spec 11.2.0 (#2078) removed the generic `PolicySchema` family (org-wide password/network/session/audit policy) from `@objectstack/spec/security`, breaking `tsc` for @object-ui/app-shell — the Bundle Analysis CI check (Build & E2E / Test use vite/esbuild and don't catch it). The `policy` metadata type has no entry in the spec's canonical metadata-type→schema registry (kernel/metadata-type-schemas.ts), and `RowLevelSecurityPolicySchema` is a different shape (a per-object RLS rule), so it must not be substituted. Remove the loader; `policy` drafts fall through to server-side validation like other unschematized types. Also corrected a stale comment claiming `profile` falls through (it maps to PermissionSetSchema). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Uh oh!
There was an error while loading. Please reload this page.
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
@object-ui/app-shell's build (tsc) fails onmainafter the@objectstack/spec11.0.0 → 11.2.0 bump (#2078):This breaks the Bundle Analysis CI check on every PR. (Build & E2E / Test use vite/esbuild, which don't type-check, so they don't catch it.)
Root cause
Spec 11.2.0 removed the entire generic org-policy family from
@objectstack/spec/security—PolicySchema,PolicyInput,definePolicy, plusPassword/Network/Session/AuditPolicySchema. It wasn't moved or renamed; it's gone from every subpath and the root export.clientValidation.tsmapped thepolicymetadata type to that now-removed schema.Why not swap to
RowLevelSecurityPolicySchemaThey model different things:
PolicySchema(removed)RowLevelSecurityPolicySchema(kept)password,network,session,audit,assignedProfilesobject,operation,using,check,rolesThe framework's canonical
metadata-type-schemas.tsregistry (now on 11.2.0) has nopolicyentry at all, so there is no client schema for thepolicymetadata type. Substituting the RLS schema would wrongly reject valid drafts.Fix
Drop the
policyloader so it falls through to server-side validation — the file's documented pattern for unschematized types (trigger,sharing_rule, …). Also corrected a stale adjacent comment that claimedprofilefalls through (it actually maps toPermissionSetSchema).policyis not an authorable resource in the console registry, so the loader was effectively defensive/dead code → zero user-facing impact.Verification
turbo run build --filter=@object-ui/app-shell→ 28/28 tasks pass, app-shelltscclean.PermissionSetSchema,RoleSchema,MappingSchema,CubeSchema,ThemeSchema,WebhookSchema,EmailTemplateSchema,ApiEndpointSchema, …) —PolicySchemawas the only break.createConformance.test.ts→ 11/11 pass.🤖 Generated with Claude Code