Repository navigation
chore(ci): configure ruff, mypy, pytest coverage and import-linter - #46
Merged
Merged
Conversation
Encode the quality rules from spec section 9 and the dependency rules from ADR-0001. - ruff targets py311 with a line length of 100 and the rule sets E, F, W, I, B, UP, SIM, RUF and D (Google docstrings). Docstring rules are relaxed under tests. - mypy runs in strict mode on packages/. - pytest measures coverage for both packages, with an 80% floor. - import-linter enforces three contracts: - types and ports never import adapters; - the engine never imports agentic_rag_code; - the engine follows the layer order from the spec. - Skeleton engine subpackages exist so that the contracts resolve. The middle layer lists ingest, retrieval, generation, agent and eval as non-independent siblings (`:`), because the agent runtime and the eval runner have to call retrieval. Refs #3
This was referenced Oct 16, 2026
Collaborator
Author
|
Merged without an approving review by maintainer decision, to unblock contributors: this is the foundation chain everything else depends on. Verified locally on the combined chain (#1, #45, #46, #47, #49, #50 merged together, no conflicts): |
This was referenced Oct 22, 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.
What
Tool configuration in the root
pyproject.toml:py311, line length 100, rule setsE,F,W,I,B,UP,SIM,RUF,Dwith Google docstrings.Dis ignored undertests/.strict = trueonpackages/.agentic_ragandagentic_rag_code,--cov-fail-under=80.agentic_rag.typesandagentic_rag.portsnever importagentic_rag.adapters.agentic_ragnever importsagentic_rag_code.It also adds skeleton engine subpackages, each with a one-line docstring, so that the contracts resolve.
Why
M0-2 of the backlog, following spec section 9 and ADR-0001.
One deviation from the backlog text: the middle layer uses non-independent siblings (
:) instead of independent ones (|). The agent runtime (E4) and the eval runner (M2-3) must be able to import retrieval.Closes #3
How verified
Results:
Negative check: I added
import agentic_rag.adapterstotypes/__init__.pylocally. The result wasContracts: 1 kept, 2 broken. The change was then reverted.Reviewer notes
This PR is stacked on #45. Its base becomes
mainautomatically once #45 is merged.