Add static quality gates (architecture, complexity, coverage)#88
Open
henokteixeira wants to merge 5 commits into
Open
Add static quality gates (architecture, complexity, coverage)#88henokteixeira wants to merge 5 commits into
henokteixeira wants to merge 5 commits into
Conversation
…ge and mutation 🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
…m main 🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
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
Adds static quality gates enforced on every PR and runnable locally via
make quality. This is config/CI only — no business logic (app/**) changed. Thresholds are calibrated to the current baseline (Phase 0, green now) and ratchet over time (seeobt/.claude/quality-gates-plan.md). Policy is documented inCLAUDE.mdsection 10.import-linter): layersapi > services > models > db > core; routers must not import ORM (app.db) directly; services must not importfastapiorapp.inngest. Cross-layer cycles are caught by the layers contract. Current violations are baselined viaignore_imports(43 api→db, 6 layer, 1 fastapi, 3 inngest); new violations fail the PR.ruff):C901max-complexity = 22,PLR0915max-statements = 54.scripts/check_module_size.py): 470 lines, exempting*_default_prompts.pyso prompt text lives in dedicated files but embedding large prompts in code files still trips the gate.pytest-cov):fail_under = 66(current 68%), reports toreports/quality/.cosmic-ray, scopeapp/utils): nightly, non-blocking.Test plan
make qualitypasses locally (static + coverage 67.76% ≥ 66%, 655 tests).app.api → app.dbimport, acore → apilayer inversion, a >470-line non-prompt file, and coverage below the threshold.