Skip to content

Promote staging to main: synth distributions + ODCS/TS SDK parity - #463

Merged
nightmoose merged 11 commits into
mainfrom
staging
Nov 26, 2026
Merged

nightmoose merged 11 commits into
mainfrom
staging

Conversation

@nightmoose

Copy link
Copy Markdown
Owner

Promotes staging (bc71ead) to main. Three follow-ups to the ODCS compatibility fix (#458/#459). All additive and backward compatible, no migration.

Included

  • feat: synth distribution hints for numeric fields (normal, lognormal, exponential) #460 Synth distributions. Optional per-field distribution on number and integer fields: uniform (default, unchanged), normal (mean, sd), lognormal (mean and sd of the underlying normal), exponential (rate). Values are truncated to min/max by resampling, pass the validator, and are deterministic per seed. The validation engine ignores the hint. ODCS: customProperties x-cg-distribution. Bad parameters give a clear error naming the field. Docs and the Python SDK model updated.
  • feat(sdk-ts): accept ODCS v3.x contracts and make ontology optional #461 TypeScript SDK. ontology optional and ODCS v3.x accepted wherever the SDK parses a contract locally, mirroring the Python SDK. Tests added.
  • ODCS: choose a schema object, notes for composite key and relationships #462 ODCS mapping gaps. schema_object (--schema-object on validate, synth, test, enforce; API param on POST /contracts/synth and POST /contracts/import) picks one object of a multi-object schema, first by default. Unmapped content (ignored objects, composite primary key, relationships) is returned as notes in API responses. Composite key uniqueness and relationships are not enforced (engine uniqueness is single field); the notes and docs say so.

Verified on staging (build bc71ead)

  • Normal distribution, 5000 rows, seed 42, mean 120 sd 25 truncated to 0..300: sample mean 119.78, sd 25.11, min 40.9, max 221.6. Same seed gives identical rows. ODCS x-cg-distribution gives mean 120.09, sd 24.89.
  • Official ODCS full example: default imports tbl with two notes; schema_object: receivers imports that object; an unknown name returns 422 listing tbl, receivers.

Before or after merge

  • The TypeScript SDK needs a version bump (0.4.2) to publish; package.json is deliberately not bumped here, so nothing publishes on merge. See sdks/typescript/CHANGELOG.md.

ContractGate Lead and others added 9 commits November 26, 2026 10:54
… exponential)

Optional per-field distribution on integer and number fields. Uniform stays the default
and the rows are unchanged without a hint. Draws outside min/max are redrawn. Validation
ignores the hint. ODCS: x-cg-distribution customProperty (import and export).
Python SDK reads and checks the hint. Docs and tests.
Mirrors the Python SDK and the gateway. Tests with the official full example and a minimal
contract. No version bump or publish; changelog notes the 0.4.2 bump needed.
… for composite key and relationships, notes in API responses
feat: synth distribution hints for numeric fields (normal, lognormal, exponential)
feat(sdk-ts): accept ODCS v3.x contracts and make ontology optional
ODCS: choose a schema object, notes for composite key and relationships
@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
contractgate Ready Ready Preview Nov 26, 2026 4:58pm UTC

Request Review

@nightmoose
nightmoose merged commit 443182b into main Nov 26, 2026
47 checks passed

This branch was successfully deployed

1 active deployment
Preview — dd722325 Deployed Nov 26, 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