schema-check
Compare current and proposed JSON Schema acceptance, validate real payloads natively, and return a path-specific compatibility verdict with a gated publication proposal.
- License 许可
- Apache-2.0
- 所属仓库
- runxhq/runx
- 最近更新
- 2026-11-09
- Stars
- ★ 103
- Forks
- 108
01 前言 Front Matter
- name
- schema-check
- description
- Compare current and proposed JSON Schema acceptance, validate real payloads natively, and return a path-specific compatibility verdict with a gated publication proposal.
02 资源文件 10
- 参考文档fixtures/allowed-removal-keeps-change-path.yaml737 B
- 参考文档fixtures/composes-in-graph.yaml949 B
- 其他fixtures/support/composed.graph733 B
- 资产文件mark.svg386 B
- 参考文档packets/check.v1.schema.json4.7 KB
- 参考文档references/catalog.md169 B
- 参考文档references/mark-license.md3.1 KB
- 参考文档run.yaml14.2 KB
- 脚本schema-check.mjs21.6 KB
- 脚本schema-check.test.mjs8.4 KB
03 SKILL.md 正文
Schema Check
Check whether a contract change can reject payloads the current contract accepts.
Supply the current schema, proposed schema, real payload examples and your
compatibility policy. The default check runner returns the affected paths,
sample failures, unsupported proof cases and, when allowed, a publication proposal
bound to the exact schema and sample values. It does not publish.
What the comparison means
The direction is current accepted instances → proposed accepted instances. For example, widening integer to number preserves acceptance. Adding an optional string field to an open object can break it: that key previously allowed a number. Adding the same field to an object that previously forbade it expands acceptance. Removing a property follows the new additionalProperties rule; a removed declaration is not automatically a rejected payload.
This is an input/data acceptance check. It does not establish response-consumer
compatibility, output completeness, business meaning or behavior across two API
implementations. Set policy required_fields for declarations the proposed
contract must retain, and assess consumer expectations separately. It never
transforms or strips fields from the actual data.
How it works
- Native
data.digestbinds the exact supplied JSON values for both schemas and the sample array. These identify values, not an unprovided original file. - Native
data.validatecompiles each original schema with external retrieval disabled and validates every sample against both contracts. Formats are annotations. The native validation steps retain both sets of diagnostics; the result includes the proposed-schema errors by sample index. - The domain comparison checks implication for practical object properties, required declarations, schema-valued additionalProperties, homogeneous arrays, JSON types/unions, enum/const values, string and collection lengths, numeric endpoints and unchanged patterns. Integer is included in number. Integer multipleOf relaxations are proved; decimal-divisor changes remain conservative. Local JSON Pointer references resolve against each original schema, including escaped pointer segments. Equal ref strings do not hide a changed definition.
- Potential narrowing is refused unless
breaking_allowedis true. A policy exception is stated in the notes; it does not turn that break into an unchanged acceptance guarantee. Missing policy-required fields always refuse. - Passing samples supplement the implication check. They never prove a changed unsupported constraint. Changed composition/tuple/conditional applicators, changed regular-expression inclusion, recursive inclusion, ref assertion siblings, nested resource IDs and external references require separate review. Identical assertion sets need no new inference. A policy exception cannot bypass an unsupported proof case.
The proof is conservative: interacting constraints can make a reported potential break unreachable. Inspect its path and the exact contracts rather than treating a potential break as an exhibited failing payload. Unknown semantics hold the proposal instead of disappearing behind the examples.
Using the result
schema_check keeps the existing runx/schema-check.check.v1 packet.
breaking_changes explains potential narrowing; validation.findings explains
unproven semantics. migration_notes records changes, policy exceptions and
which declared paths occur in samples, including homogeneous array items.
proposal is null when held. When present, it carries the native schema/sample
digests, affected paths and live_write_performed: false.
The same runner is reusable in a graph. A parent supplies its exact schemas, samples and policy, then consumes this verdict and these digests without a second comparison. No discovery, provider credentials, model turn or delivery is needed. Publication belongs to the schema publisher under its own authorization and readback. A compatible proposal is not publication approval.
For a normal list-contract change, widening a locally referenced item from integer to number while lowering minItems preserves acceptance. Requiring a new item field, tightening an endpoint or constraining a formerly open extra key produces a path-specific refusal even when the examples happen to pass.
04 同仓库更多 Skills
webhook-handoff
Validate a runx execution context and deliver a governed payload once to an n8n Cloud workflow webhook or a Zapier Catch Hook, with exact approval and the receiver's acknowledgement receipted.
web-search
Discover a bounded set of fresh web source candidates from one explicit search query, preserve provider evidence and reported cost, and prepare source selection for fetching and research.
web-fetch
Fetch and extract one public web source, optionally restrict its hosts, and return the content by digest with full provenance.
vuln-triage
Prioritize actual exact-coordinate vulnerability findings, preserve unknown exposure and partial coverage, and return practical remediation or an unsent advisory draft.
Govern X (Twitter) account work through three lanes: evidence reads, typed act plans for posting and account hygiene, and gated execution with per-act provider evidence. Nothing reaches a live timeline or mutates an account without an explicit approval recorded in the receipt.
team-delegate
Divide bounded work across an operator-selected team and return exact member assignments with source context, scope ceilings and acceptance checks.