Skip to content

Validate shared clinical contracts - #1

Draft
vaalessi wants to merge 1 commit into
mainfrom
codex/shared-platform-contracts
Draft

Validate shared clinical contracts#1
vaalessi wants to merge 1 commit into
mainfrom
codex/shared-platform-contracts

Conversation

@vaalessi

Copy link
Copy Markdown

What changed

  • Vendors the exact shared interpretability and canonical snake_case IndicationThesis schemas from platform-contracts commit 755499b42ab65d3b01f959b11624dd4e61bdd561.
  • Records both SHA-256 values in contract-lock.json and checks them in tests.
  • Validates every public thesis before the live clinical run and validates emitted interpretability before writing output.
  • Keeps bun run simulate INPUT --out OUTPUT and all simulated_* output names unchanged.
  • Returns one concise CANNOT_COMPLETE JSON record for invalid input, missing credentials, registry failures, provider failures, or other execution errors.

Why

Clinical previously maintained its own schema identities and translated requests without enforcing the public snake_case contract at runtime.

Functional impact

A valid request still enters the existing CT.gov and Anthropic execution path. An invalid request now exits before provider work with reason_code INPUT_SCHEMA_INVALID and does not create an output file.

Verification

  • bun run check: clean
  • bun run typecheck: clean
  • bun test: 46 pass, 0 fail
  • Manual invalid-request CLI smoke: exit 1, INPUT_SCHEMA_INVALID, no output file

Live network/provider execution was not run because this draft must not alter or depend on the existing demo environment.

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