feat(validate): scope-conditioned question preflight for entries whose ECCN depends on destination, end-use, jurisdiction or availability - #4
Open
isaac-maya wants to merge 1 commit into
Conversation
… the committed index, no API)
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.
Discovery. Found while sourcing questions for the data PR: some answers depend on context, not specs. Generalizes the "input starvation" diagnosis in results/future_research_directions.md.
What it does: a preflight script that finds questions whose answer depends on context before models are spent on them. Run:
python scripts/scope_preflight.py --questions data/questions.jsonlWhy: some products cannot be classified from specs alone. The answer depends on where it is going (0A998 is a Russia-sanctions entry), what it is for (heavy water, 1C298), or whether it is mass-market (the crypto rows the future-research doc calls input starvation). Those questions measure noise until the missing context exists. Better to know that up front.
The script reads the committed CCL index (data/ccl/ccl_index.json, no API, no network) and separates two things that look alike: entries whose definition depends on context (the real problem) from entries that merely mention sanctions in their license rules (8A992-type, which are normal and fine).
Run on the 34 published questions it flags 11 rows: the 8 gold-5A992.c crypto rows (the cluster the future-research doc diagnoses) plus 3 rows whose gold head is scope-conditioned but whose own paragraph the conditioning sentence does not reach (piper 9A991.d x2, adi 7A003.d.1) — an entry-level granularity limit the tool states in its docstring and reports rather than fakes. That is how I know it works: the 8 real flags reproduce the repo's own diagnosis from the regulation text alone.