Skip to content

feat(validator): add authoring contract metadata - #28

Merged
mikeylong merged 1 commit into
mainfrom
codex/interfacectl-agent-contracts
Mar 12, 2026
Merged

mikeylong merged 1 commit into
mainfrom
codex/interfacectl-agent-contracts

Conversation

@mikeylong

Copy link
Copy Markdown
Collaborator

Summary

  • add generic, advisory-first authoring metadata to the canonical web contract schema
  • validate referential integrity for components, slots, states, responsive rules, and web-only authoring fields
  • document generator consumption order and add an annotated reference-target example fixture

Testing

  • pnpm --filter @surfaces/interfacectl-validator build
  • pnpm --filter @surfaces/interfacectl-validator test

@vercel

vercel Bot commented Mar 12, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
interfacectl Ready Ready Preview, Comment Mar 12, 2026 9:24pm

Request Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 180443b0d4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

for (const slotBehavior of rule.slotBehaviors ?? []) {
if (knownSlotIds.size > 0 && !knownSlotIds.has(slotBehavior.slotId)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate slotBehaviors even when no section slots are known

The knownSlotIds.size > 0 guard means sections[*].responsive.rules[*].slotBehaviors[*].slotId is never validated when a section omits anatomy.slots and has no resolvable defaultComponent, so contracts with completely unknown slot references are accepted as structurally valid. This undermines the new referential-integrity guarantees for responsive metadata and can surface later as generator/runtime failures when a slot behavior targets a slot that does not exist.

Useful? React with 👍 / 👎.

@mikeylong
mikeylong merged commit 75ba340 into main Mar 12, 2026
4 checks passed
@mikeylong
mikeylong deleted the codex/interfacectl-agent-contracts branch March 12, 2026 21:38

This branch was successfully deployed

1 active deployment
Preview — 180443b0 Deployed Mar 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant