Skip to content

Add independent tooling schema parity guard - #105

Merged
kmosoti merged 3 commits into
mainfrom
agent/tooling-schema-parity
Jul 28, 2026
Merged

Add independent tooling schema parity guard#105
kmosoti merged 3 commits into
mainfrom
agent/tooling-schema-parity

Conversation

@kmosoti

@kmosoti kmosoti commented Jul 28, 2026

Copy link
Copy Markdown
Owner

What changed

  • add the Rust-backed jsonschema-rs validator to the development dependency group
  • replace runtime-only surface-sequence negatives with an executable acceptance matrix
  • validate the exact schema emitted by blackcell adapters schema under Draft 2020-12
  • require Pydantic's JSON boundary and the emitted schema to agree across structural and custom-validator cases
  • project capability uniqueness, shared-facet uniqueness, and version-preflight invariants into the public schema
  • close the difference-facet name type over the emitted catalog and project per-facet uniqueness into the schema

Why

PR #104 exposed a gap between runtime validation and the public machine-readable schema. Structural keyword assertions fixed that defect, but they did not independently execute the advertised schema. This follow-up adds deterministic corroboration with a separate standards implementation so future schema projection drift fails locally and in CI.

Codex review then found that the first parity matrix omitted custom model validators. The follow-up commit adds representative cases for duplicate capabilities, duplicate shared facets, and inconsistent version-preflight fields, and makes the emitted schema reject them consistently with Pydantic.

A second exact-head Codex review found the analogous nested-key invariant for difference facets. The final remediation preserves the catalog payload while using a closed facet-name type plus Draft 2020-12 contains/maxContains constraints to reject repeated facets even when the descriptive fields differ.

Impact

The emitted catalog payload is unchanged. Runtime and schema acceptance are now closed to the seven difference facets the catalog emits, and both reject duplicate facet keys. The Rust-backed validator remains development-only, and the guard is intentionally limited to the tooling catalog before any reusable framework abstraction is introduced.

Verification

  • uv run python tools/run_pytest.py tests/unit/test_tooling_surfaces.py -q --blackcell-require-all-pass (18 passed)
  • uv run ruff format --check src/blackcell/gateway/__init__.py src/blackcell/gateway/tooling.py tests/unit/test_tooling_surfaces.py
  • uv run ruff check src/blackcell/gateway/__init__.py src/blackcell/gateway/tooling.py tests/unit/test_tooling_surfaces.py
  • uv run ty check
  • uv run python tools/run_pytest.py --cov=blackcell --cov-report=term-missing (593 passed, 1 opt-in Podman test skipped, 86.11% coverage)

@kmosoti
kmosoti marked this pull request as ready for review July 28, 2026 06:08
@kmosoti

kmosoti commented Jul 28, 2026

Copy link
Copy Markdown
Owner Author

@codex 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: 13b388071a

ℹ️ 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".

Comment thread tests/unit/test_tooling_surfaces.py
@kmosoti

kmosoti commented Jul 28, 2026

Copy link
Copy Markdown
Owner Author

@codex 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: 0ed97c5527

ℹ️ 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".

Comment thread tests/unit/test_tooling_surfaces.py
@kmosoti

kmosoti commented Jul 28, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 69a3dd5fa4

ℹ️ 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".

@kmosoti
kmosoti merged commit 8ab386b into main Jul 28, 2026
2 checks passed
@kmosoti
kmosoti deleted the agent/tooling-schema-parity branch July 28, 2026 16:52
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