Repository navigation
fix(cli): import extractor schema version scope - #1870
Merged
Merged
Conversation
…sion Signed-off-by: András Jáky <[email protected]>
Signed-off-by: András Jáky <[email protected]>
akijakya
force-pushed
the
fix/import-extractor-schema-version-scope
branch
from
July 23, 2026 09:23
63aec2d to
a138f0e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
akijakya
enabled auto-merge (squash)
July 23, 2026 13:39
paralta
approved these changes
Jul 27, 2026
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
Fixes the extractor-enricher import path after the OASF 1.1.0 release and moves the import stack onto 1.1.0.
The
16_extractor_enrichere2e test began failing once OASF 1.1.0 was published: the import reported success (exit 0) but wrote no CIDs, so the test failed readingimported.cids.Root cause
The extractor enricher classified records via
sdk.Latest(), which follows the newest provisioned OASF taxonomy. Once 1.1.0 was provisioned, it assigned 1.1.0-only classes (e.g. skill60701). But records were stampedschema_version: 1.0.0(the transformer default). The server validates each record against the schema of its ownschema_version({schema_url}/api/{version}/validate/...), so the 1.1.0 classes were rejected against the 1.0.0 schema asid_unknown→ 0 records imported. Becausedirctl importstill exits 0 when nothing imports,--output-cidssilently wrote no file.Changes
1. Scope the extractor to the record's declared schema version (
fix(import))extractor_adapter.go: replacesdk.Latest()withsdk.Versions(a.schemaVersion)so the extractor only assigns classes that exist in the version the record is stamped (and validated) with.config.go: pass the effective schema version (o.SchemaVersion, ortransformer.DefaultSchemaVersionwhen unset) into the adapter.o.SchemaVersionis reset at the top ofloadConfigbecause it is not flag-backed and the e2e suite runsdirctlin-process, reusing the command's package-level options — without the reset a prior invocation's value leaks into later runs.This keeps the extractor's taxonomy version and the record's
schema_versionaligned by construction, for any declared version, and won't drift again on the next OASF release.2. Bump dir-importer to OASF 1.1.0 (
chore(deps))DefaultSchemaVersionand the LLM enricher prompts to1.1.0. Records now default to 1.1.0, consistent with the extractor scoping and the referenceimport.config.yaml.10_exportstatic-enricher fixture to 1.1.0 taxonomy classes (software_engineering/code_quality/code_review,technology/artificial_intelligence/ai_agents), since the new default schema would otherwise reject its old 1.0.0 classes.Note
dir-importer has no 1.1.0 release tag yet, so this pins the merged
maincommit via a pseudo-version. Swap it for the tagged release once published.