Repository navigation
fix(runs): import InputError from dokimi.files, not dokimi.utils - #1609
Merged
vlad-perevezentsev merged 2 commits intoDec 4, 2026
Merged
Conversation
upstream/main fails test_package_uses_the_new_modules: dokimi.runs.resolve imports InputError through the legacy dokimi.utils re-export. intel#1190 split utils into its defining modules and added the test; intel#1523 added the import. Each PR was green against its own base, so the failure appeared only after both merged. Import InputError from dokimi.files, where it is defined. It is the same class object, so nothing changes at runtime. Refs intel#1190, intel#1523 Signed-off-by: Vladislav Perevezentsev <vladislav.perevezentsev@intel.com>
intel#1523 added the legacy dokimi.utils import in the test too. intel#1190 moved the tests to the defining modules, so point this one at dokimi.files as well. test_package_uses_the_new_modules scans only the package, so it did not catch this one. Refs intel#1190, intel#1523 Signed-off-by: Vladislav Perevezentsev <vladislav.perevezentsev@intel.com>
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 2 selected item(s). CI at Review details
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1609 +/- ##
=======================================
Coverage 96.46% 96.46%
=======================================
Files 561 561
Lines 74345 74345
Branches 12840 12840
=======================================
+ Hits 71716 71719 +3
+ Misses 1609 1604 -5
- Partials 1020 1022 +2
🚀 New features to boost your workflow:
|
antonwolfy
approved these changes
Dec 4, 2026
This was referenced Dec 4, 2026
Merged
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
Makes
maingreen again. Since 01ff2d6tests/test_import_architecture.py::test_package_uses_the_new_modulesfails onmain:A semantic race between two PRs that were each green against their own base:
dokimi/utils.pyintofrontmatter,files,digestandmodel_names, keptdokimi.utilsas a re-export, and added the test that no package module imports it any more.dokimi/runs/resolve.pywithfrom dokimi.utils import InputError; its base did not have the test yet.The fix imports
InputErrorfromdokimi.files, where it is defined:dokimi.utils.InputErroris the same class object (test_legacy_utils_exports_still_resolvechecks the identity), so nothing changes at runtime. The same import that #1523 added intests/test_runs_resolve.pymoves todokimi.filestoo, following #1190, which moved the tests as well. After this, nothing outsidetest_import_architecture.pyimportsdokimi.utils(grep ofdokimi/).Every open PR rebased on
maininherits the failure until this lands.Fixes #1608
Refs #1190, #1523
Evidence
tests/test_import_architecture.pyonmain: 1 failed (test_package_uses_the_new_modules), 55 passed; on the branch: 56 passed.tests/test_runs_resolve.pywith the moved import: 38 passed.make ci-local --offline(quick: static, typecheck, whole pytest suite), 0 failed tests on both commits (35299 passed, 132 skipped on the first). The one FAIL is the changelog fragment check: no fragment, since the change has no user-visible effect (refactor(utils): split dokimi/utils.py into frontmatter, files, digest, model_names #1190 had none either), henceskip-changelog.Not in this PR
:class:`~dokimi.utils.InputError`(gate/score_gate.pylines 9 and 37,gate/regression.pyline 74). They are not imports, the test does not see them, and the re-export keeps them resolving.Checklist
pytestpasses: no new test; the failingtest_package_uses_the_new_modulesis the regression test, the whole suite passes (35299 passed)ruff,mypy, and schema checks pass (make ci-local --offline, static and typecheck jobs)AGENTS.md: grep ofdokimi/for otherdokimi.utilsimports (none left)raise/exit and test names the doc, contract or issue it traces to: N/A, none added