Add deterministic SGD context audit - #25
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
(service, slot)pairtrain/dialogues_NNN.jsonprovenancepremove-audit-sgdCLIWhy
The SGD enrichment plan needs an explicit inventory before slot-to-ITN mapping begins. This audit provides that inventory without assigning ITN labels or generating training records.
The protected invariant is that the same SGD train split produces the same counts, descriptions, sample identities, and provenance on every machine. Slot descriptions flow through the validated schema index, so the later mapping policy can use SGD's semantics without maintaining a second schema parser. Without stable provenance and deterministic sampling, audit reports could differ by checkout location or source traversal details.
Full-corpus audit
Running:
produced:
All 94 service-slot pairs have a non-empty schema description. The generated report is ignored and is not included in this PR.
Validation
uv run ruff check .uv run pytest— 234 passeduv buildutterance[start:end] == valuemin(50, count)examplesuv run ruff format --check .still reports two pre-existing formatting differences intests/test_golden.pyandtests/test_types.py; this PR does not modify those files.