Map the Tier-2a ECCN shape key onto the CCL's own keys - #10
Merged
Conversation
OpenContracts #2276 moves ECCN citation extraction out of the Tier-1 registry extractor and into the Tier-2a grammars, where it emits a SHAPE-level key (`eccn:3a611`) instead of `ccl:3a611`. That change is right — core recognises "ECCN 3A611" without knowing whether a Commerce Control List corpus is installed, so emitting `ccl:` would hardcode the prefix THIS pack happens to bind into the framework, exactly as the `usreporter:`/`htsus:` precedent warns. But it means the pack now has to close the loop: without these rows every extracted ECCN citation resolves to nothing. 638 rows, one per CCL section, generated by `build/gen_equivalences.py` rather than hand-written — and generated for EVERY section rather than the ones some document happens to cite, so the next document to cite an ECCN works without anyone remembering this. They belong here rather than in the domain pack: ownership is decided by `to_key` alone, and `eccn:` is a shape prefix no pack declares, so these are not cross-pack rows. Verified from the registry root: `validate_pack.py ear` OK, `validate_domain.py --all` OK, both self-tests behaving. The ITAR workspace's `verify_split.py` gate confirms the split still preserves the monolith exactly (2,855 rows: 2,663 to packs, 192 cross-pack, 0 resolving to no pack). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Companion to OpenContracts #2276. Neither is much use without the other.
Why
#2276 moves ECCN citation extraction out of the Tier-1 registry extractor into
the Tier-2a grammars, and changes what it emits:
That is the correct split.
ECCN 3A611is anchored on a literal, so corerecognises the form without knowing whether a Commerce Control List corpus is
installed — which makes it a SHAPE, and a shape must not emit
ccl:, theprefix this pack happens to bind. The old code looked the prefix up through a
hardcoded
"ccl"alias string, baking one pack's naming convention into theframework.
usreporter:andhtsus:already establish the opposite pattern.The consequence for this repo: the pack now has to close the loop. Without
these rows every extracted ECCN citation resolves to nothing.
What
638
eccn:<code>→ccl:<code>rows, one per CCL section.Generated by the ITAR workspace's
build/gen_equivalences.py, not hand-written— and generated for every section rather than the ones some document
happens to cite, so the next document to cite an ECCN works without anyone
remembering this. The existing
act:eccn-<code>prose-form rows are unchanged.They live in
earrather than in the domain pack because ownership is decidedby
to_keyalone, andeccn:is a shape prefix that no pack declares — sothese are not cross-pack rows.
The diff is purely additive; the
cclprefix's existing aliases are untouched.Verification
Run from the registry root, not from the build workspace:
And the split gate in the build workspace:
🤖 Generated with Claude Code