Skip to content

test(contracts): preserve JSON Schema/Zod non-equivalence - #133

Merged
SebastienElet merged 1 commit into
mainfrom
fm/assertledger-e3-delivery
Nov 9, 2026
Merged

SebastienElet merged 1 commit into
mainfrom
fm/assertledger-e3-delivery

Conversation

@SebastienElet

@SebastienElet SebastienElet commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

E3's equal-acceptance hypothesis is false on the existing corpus: 19 inputs pass JSON Schema but fail Zod refinements, 16 more pass both and fail semantic parsing, and two digest mutations fail only at replay. This change preserves those distinctions as tests instead of forcing parity.

  • Retain all 211 concrete inputs and original raw observations, with unchanged decompressed hashes, plus the schema inventory and the supplied reproducer adapted for an external output directory.
  • Exercise each input through Ajv, its Zod export, its public parser where present, and the recorded replay flags. Compile all 56 locked schemas; 16 schema types have input witnesses.
  • Document the 19 refinement witnesses, 16 post-parse checks, historical replays, reproduction commands and coverage limits. Link from the existing SDK surface map.
  • Pin explicitly approved Ajv 8.17.1 as a development dependency. Product code, contracts, schemas, goldens, digest projections and CI configuration are unchanged. D3 and Rust-validator admission remain separate.

Validation:

  • Native 211-case suite passed on Darwin 27.2.0 arm64 with Node 22.22.0 and 24.22.1, Zod 4.6.7 and Ajv 8.17.1.
  • Re-emitted corpus, raw results and schema inventory matched all three source artifact hashes before commit.
  • Four isolated negative witnesses failed the intended assertion: JSON Schema acceptance, Zod refinement, parser uniqueness and replay integrity; after restoration all 211 cases passed.
  • Full pnpm check passed with Node 24.22.1 and official Bun 1.4.4+38afee6c8 on Darwin 27.2.0 arm64: 1,443 passed, 0 failed, 1 pre-existing optional witness skipped (ASSERTLEDGER_WITNESS_28_REQUEST unset). Format, lint, schema/conformance checks, typecheck, build and tests completed. Local container-suite coverage is limited to the configured environment; real Docker coverage belongs to Linux CI.
  • CI run 42247976374 passed all 12 matrix jobs: full pnpm check on Linux/Windows/macOS with Node 22/24, plus package smoke tests on Node 22.15.0/24. All 13 reported checks passed. The Linux/Node 24 log explicitly records the new non-equivalence suite passing.
  • Author standards/spec/oracle review only, as requested; no independent proof-audit or Rust qualification is claimed.

Refs #118. The reproducible counterexamples answer the experiment negatively. The issue remains open for review/conclusion after delivery; this PR has no automatic closing keyword and makes no contract migration decision.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T15:59:39.020656Z 7276535 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SebastienElet
SebastienElet force-pushed the fm/assertledger-e3-delivery branch from 188fc5f to 8a75e17 Compare November 9, 2026 18:06
@SebastienElet
SebastienElet merged commit e2670ab into main Nov 9, 2026
13 checks passed
@SebastienElet
SebastienElet deleted the fm/assertledger-e3-delivery branch November 9, 2026 18:21
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