Skip to content

test(DEN-4080): normalize authored fixtures for TJSV corpus - #7

Merged
ORESoftware merged 5 commits into
mainfrom
den-4080/normalize-fixture-corpus
Sep 9, 2026
Merged

test(DEN-4080): normalize authored fixtures for TJSV corpus#7
ORESoftware merged 5 commits into
mainfrom
den-4080/normalize-fixture-corpus

Conversation

@ORESoftware

Copy link
Copy Markdown
Contributor

Summary

Preserve the production repository's independently authored fixture bytes while deriving a declaration-indexed corpus for the pinned ORESoftware/typespec-json-schema-validator differential gate.

TJSV intentionally treats the first corpus directory as the declaration (instances/<Declaration>/...). ORES Chat production fixtures are currently arranged as <slice>/<Declaration>.json, so passing that tree directly makes admin, conversations, etc. look like declaration names. This PR fixes the acceptance action rather than weakening or disabling TJSV's corpus checks.

Behavior

  • snapshot TypeSpec A, independently authored JSON Schema A, and the original fixture tree before derivation;
  • read declaration names from JSON Schema $defs rather than hard-coding ORES Chat slices;
  • preserve already-canonical TJSV layouts (<Declaration>/valid|invalid/*.json and <Declaration>/*.json);
  • route production <slice>/<Declaration>.json to an isolated evidence-only <Declaration>/<slice>--<Declaration>.json copy;
  • retain an explicit reviewed mapping for legacy ticket-created.json -> SupportEvent;
  • reject unknown declarations, unsafe nesting, symlinks, non-regular files, invalid JSON, and output collisions fail-closed;
  • verify byte-for-byte SHA-256 equality between each authored fixture and its derived copy;
  • make the composite action pass only the derived corpus to pinned TJSV 24e3bb322b8d7c9cd2e0c7dd185d659ad3fd7328 while the immutability receipt continues to bind the original authored inputs.

Tests

  • unit tests cover canonical valid/invalid routing, production slice routing, legacy routing, unknown declarations and unsafe nesting;
  • CI derives a production-style support/Widget.json layout from the existing convergent fixture and executes the complete composite action against it;
  • existing convergent, deliberate-drift, numeric-positive, and wrong-int64-encoding negative canaries remain required.

No authored TypeSpec, JSON Schema, or fixture source becomes generated authority. Normalized corpus files are downstream evidence only.

Linear: DEN-4080; related DEN-3828 and DEN-3959.

@ORESoftware
ORESoftware merged commit 166c6a9 into main Sep 9, 2026
1 check passed
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