fix: remediate CI failures on PR #10 (Badge TS2322 + pytest pythonpath)#12
Merged
Merged
Conversation
…pytest pythonpath - DoraDashboard.tsx: replace Badge variant 'secondary' (not in union) with 'warning' to fix TS2322 type error blocking tsc and npm run build - backend/pyproject.toml: add [tool.pytest.ini_options] with pythonpath=["."] so pytest running from backend/ can resolve 'app.*' imports (matches PR #3 config) Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
Remediation PR for CI failures blocking PR #10 — feat: instrument DORA delivery metrics + dashboard tab.
This branch is based on
dora-metrics-dashboardand contains only the CI fixes — no logic changes.Fix 1 — Frontend TS2322:
Badgevariant'secondary'not in unionFile:
frontend/src/components/DoraDashboard.tsx(lines 47–51)Root cause: The
healthBadgemap declared its type asRecord<Health, 'default' | 'secondary' | 'destructive'>and assignedyellow: 'secondary'. TheBadgecomponent's variant union is:'secondary'is absent, causing TS2322 intsc -b, which blockednpm run build.Fix: Change the type annotation to
'default' | 'warning' | 'destructive'and theyellowvalue to'warning'. Semantically correct — amber/warning matches the "at risk" health state.Verified:
npx tsc --noEmit→ clean.npm run build→ ✅built in 493ms.Fix 2 — Backend:
ModuleNotFoundError: No module named 'app'Files:
backend/tests/test_api.py:5,backend/tests/test_billing.py:3(and alltests/*.py)Root cause: The CI backend job runs
pytest tests/withworking-directory: backend, but withoutbackend/pyproject.toml, Python'ssys.pathdoesn't includebackend/, sofrom app.main import appfails at collection.Fix: Add
backend/pyproject.tomlwith:This is identical to the config introduced in PR #3 (
add-ci-quality-gates) which passes the backend CI job green. PR #10 branched off an earlier commit before that fix landed.Fix 3 — PR size gate (> 400 lines):⚠️ out of scope / operator action needed
The original PR #10 diff is ~707 lines (681 additions + 26 deletions), exceeding the 400-line gate. This remediation PR itself is 11 lines and will pass the gate.
The size gate failure belongs to PR #10 directly. Options for the operator:
backend/app/routers/dora.pyendpoint, (b)DoraDashboard.tsx+App.tsx— each under 400 lines.dora-metrics-dashboardvia squash, then re-evaluate splitting.No automated label/exception override exists in the current CI workflow (
ci.ymlline 29: hard exit 1). Operator decision required before PR #10 can pass the size gate.Checklist
npm run buildpasses (TS2322 resolved)npx tsc --noEmitcleanbackend/pyproject.tomlmatches PR Add CI quality gates and release-readiness checklist template #3's proven config🤖 Generated with Vecna
Co-Authored-By: Vecna noreply@vecna.ai