Skip to content

fix: resolve CI failures introduced by PR #2 quality gates#13

Merged
bdevierno1 merged 1 commit into
add-data-quality-checksfrom
fix/ci-failures-pr2
Jul 14, 2026
Merged

fix: resolve CI failures introduced by PR #2 quality gates#13
bdevierno1 merged 1 commit into
add-data-quality-checksfrom
fix/ci-failures-pr2

Conversation

@bdevierno1

Copy link
Copy Markdown
Owner

Summary

PR #2 (add-data-quality-checks) introduced CI quality gates that immediately fail on their own codebase. This draft PR fixes the root causes so the gates go green.

Root causes & fixes

1. Backend — ruff check . (5 errors)

Four unused-import (F401) errors auto-fixed via ruff check --fix, one E402 suppressed with # noqa:

File Error Fix
backend/app/main.py:9 fastapi.Request imported but unused Removed from import list
backend/app/main.py:14 sqlalchemy.ext.asyncio.async_sessionmaker imported but unused Removed import line
backend/tests/test_errors.py:5 math imported but unused Removed import line
backend/tests/test_http_client.py:5 unittest.mock.MagicMock imported but unused Removed from import list
backend/agent/vecna_litellm.py:80 E402 module-level import not at top of file Added # noqa: E402 — the import litellm must follow litellm_main patching; the position is intentional

Verified locally: ruff check . now reports "All checks passed!"

2. Frontend — npm ci failure (lock file out of sync)

package-lock.json was missing entries for @emnapi/core@1.11.1 and @emnapi/runtime@1.11.1, and had a version mismatch for @emnapi/wasi-threads. Fixed by running npm install in frontend/ to regenerate a consistent lock file.

Verified locally:

  • npm ci
  • npm run build ✅ (tsc + vite build, 271 KB bundle)

3. CI gate (required check)

The required gate only failed as a downstream consequence of the above two. No separate change needed — it should go green once this PR is merged into add-data-quality-checks.

Test plan

Out of scope

  • npm audit vulnerabilities (5 flagged: 1 low, 3 moderate, 1 high) — not introduced by this PR, separate concern
  • Any functional/logic changes to the application

🤖 Generated with Claude Code

- backend: remove 4 unused imports (F401) via ruff --fix:
  * fastapi.Request in app/main.py
  * sqlalchemy.ext.asyncio.async_sessionmaker in app/main.py
  * math in tests/test_errors.py
  * unittest.mock.MagicMock in tests/test_http_client.py
- backend: suppress E402 on intentional late import in agent/vecna_litellm.py
  (import litellm must follow litellm_main patching)
- frontend: regenerate package-lock.json so npm ci succeeds
  (was missing @emnapi/core@1.11.1, @emnapi/runtime@1.11.1;
   had wrong @emnapi/wasi-threads version)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bdevierno1 bdevierno1 marked this pull request as ready for review July 14, 2026 01:08
@bdevierno1 bdevierno1 merged commit 1341b23 into add-data-quality-checks Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant