Skip to content

test(spec): extend downstream-contract to all 16 writable domains (#2035)#2095

Merged
xuyushun441-sys merged 1 commit into
mainfrom
spec/contract-all-domains
Jun 21, 2026
Merged

test(spec): extend downstream-contract to all 16 writable domains (#2035)#2095
xuyushun441-sys merged 1 commit into
mainfrom
spec/contract-all-domains

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

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: EmailTemplate requires bodyHtml, Cube requires dimensions.

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 → 0
  • pnpm --filter @objectstack/downstream-contract test → 15 passed (2 original + 13 new domains)

🤖 Generated with Claude Code

)

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>
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 21, 2026 6:37am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

No hand-written docs reference the 1 changed package(s). ✅

@xuyushun441-sys
xuyushun441-sys merged commit 98ca40b into main Jun 21, 2026
16 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the spec/contract-all-domains branch June 21, 2026 06:49
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants