test(spec): extend downstream-contract to all 16 writable domains (#2035)#2095
Merged
Conversation
) The depth gate (#2089) only exercised object/view/action/report/page. Adds a frozen bare-literal fixture for the remaining domains — datasource, connector, policy, sharing rule, role, permission set, email template, webhook, object extension, cube, mapping, theme, translation bundle — typed with the spec's own input aliases and parsed against each domain's schema. Now a narrowed/removed schema property on ANY writable domain breaks the contract (authoring it surfaced two already: EmailTemplate requires `bodyHtml`, Cube requires `dimensions`). 15 cases, typecheck + test green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckNo hand-written docs reference the 1 changed package(s). ✅ |
This was referenced Jun 21, 2026
xuyushun441-sys
added a commit
that referenced
this pull request
Jun 21, 2026
…ates (#2035) (#2098) Documents the layered strategy built across #2088/#2089/#2092/#2093/#2095/#2097 in one authoritative place: why in-repo consumers can't witness backward compat (they co-evolve with the spec), the six gates and each one's job, and — crucially — the FREEZE CONTRACT: a change that requires editing the fixtures or removing a snapshot entry is by definition breaking (bump major), never a mechanical test-update. Also formalizes `objectstack validate` as the third party's authoritative self-gate. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
xuyushun441-sys
added a commit
that referenced
this pull request
Jun 21, 2026
…erals (#2035) (#2124) The example apps were migrated to the `defineX` factories in #2088/#2095 and a lint guard keeps them clean — but the skills and hand-written docs still taught the old bare-literal pattern (`: Page = {}`, `: Action = {}`, `: PermissionSet = {}`, …). Skills are the corpus AI authors from, so this directly undercut the #2035 north star: leaving the unsafe pattern as the thing AI copies. Converts every bare output/Input-type metadata literal for the 16 factory domains to its `defineX(...)` factory call, across: - skills/objectstack-ui/SKILL.md (8: Page/Action/Report/Cube) - content/docs/guides/security.mdx (8: PermissionSet/SharingRule) - content/docs/{guides/standards,concepts/index,concepts/architecture, getting-started/architecture,protocol/objectui/record-alert}.* (7) Imports are rewritten in place (preserving each block's import source — root vs subpath) or injected where the snippet had none. Pre-existing `defineView` / `defineFlow` examples are untouched. `check:skill-docs` stays green (generated references come from frontmatter, unchanged). Docs-only — no package code, no changeset. Code blocks in MDX/skills are not type-checked by any gate, which is why they drifted; a lightweight MDX code-block lint is noted as a separate follow-up. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
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 free
to 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.
Strengthens the depth gate from #2089. It previously exercised only object/view/action/report/page; this adds a frozen bare-literal fixture per remaining domain — datasource, connector, policy, sharing rule, role, permission set, email template, webhook, object extension, cube, mapping, theme, translation bundle — typed with the spec's own input aliases and parsed against each domain's schema.
So a narrowed/removed schema property on any writable domain now breaks the contract. Authoring it already caught two latent constraints the gate now locks in:
EmailTemplaterequiresbodyHtml,Cuberequiresdimensions.Same freeze contract as #2089 — these fixtures must not be edited to make a failing spec change pass.
Verification
pnpm --filter @objectstack/downstream-contract typecheck→ 0pnpm --filter @objectstack/downstream-contract test→ 15 passed (2 original + 13 new domains)🤖 Generated with Claude Code