reliability: add CI quality gates (tests, lint, type-check, PR-size)#2
Open
bdevierno1 wants to merge 5 commits into
Open
reliability: add CI quality gates (tests, lint, type-check, PR-size)#2bdevierno1 wants to merge 5 commits into
bdevierno1 wants to merge 5 commits into
Conversation
- .github/workflows/ci.yml: PR-size gate (<400 lines), backend pytest with 60% coverage floor, ruff lint, mypy type-check, frontend eslint + tsc + vite build, and a ci-gate rollup job as the required check. - .github/PULL_REQUEST_TEMPLATE.md: full release-readiness checklist covering CI, correctness, security, migrations, feature flags, ops readiness, and stakeholder sign-off. - .github/ISSUE_TEMPLATE/release-readiness.yml: structured release tracking issue template mirroring the same checklist. Enforces code-review-standards.md and release-readiness-checklist.md. Co-Authored-By: Vecna <noreply@vecna.ai>
- 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>
3 tasks
fix: resolve CI failures introduced by PR #2 quality gates
Frontend (eslint): - App.tsx: call connectWs via a ref in the reconnect timer so it is no longer accessed before declaration (react-hooks TDZ); wrap the two effect data-loads (loadOps, openPastOperation) in async IIFEs to satisfy react-hooks/set-state-in-effect (matches the file's existing effect idiom). These two were previously masked by the compiler bailout on the connectWs error. - badge.tsx/button.tsx: stop exporting badgeVariants/buttonVariants (no external consumers) so each file only exports components (react-refresh/only-export-components). Backend (mypy): - operation_context.py: type the run_coroutine_threadsafe done-callback against concurrent.futures.Future (not asyncio.Future). - agent/tools.py: coerce getaddrinfo sockaddr[0] (str | int) to str for the list[dict[str, str]] entry. Backend (test import): - add pytest.ini pythonpath=. so `pytest tests/` (console script) can import the app package; without it CI's Backend test step errors with ModuleNotFoundError. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 task
Splits the two governance/template files (.github/ISSUE_TEMPLATE/ release-readiness.yml, .github/PULL_REQUEST_TEMPLATE.md) into follow-up PR #14 to free PR-size budget, and adds unit tests for the pure helpers (url_guard, lib/serialize, lib/report) to lift backend coverage above the --cov-fail-under=60 gate. Measured 61.3% on Python 3.11.15 (CI's version); no gate threshold was relaxed. Co-Authored-By: Claude Opus 4.7 <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
.github/workflows/ci.ymlwith four jobs: PR-size gate (<400 lines), backend pytest + 60% coverage floor + ruff lint + mypy type-check, frontend eslint + tsc + vite build, and aci-gaterollup job that acts as the single required status check..github/PULL_REQUEST_TEMPLATE.md: full release-readiness checklist (CI, correctness, security, migrations, feature flags, ops, sign-off)..github/ISSUE_TEMPLATE/release-readiness.yml: structured tracking issue mirroring the same checklist.Motivation
Reliability sweep finding (2026-06-19): The repo has no CI pipeline. Zero automated checks run on PRs, meaning regressions and lint violations can merge silently. This is the primary reliability gap identified today — the app is classified Yellow on the internal SLO bands because the absence of enforcement elevates regression risk and makes DORA Change Failure Rate untrackable.
The backend test suite already has 89 passing tests; this PR wires the CI infrastructure that makes those tests blocking on every PR.
Feature-freeze recommendation
Per error-budget policy: the app is classified Yellow (no production telemetry → conservative default; CI gap raises regression risk). Until this PR merges and CI is confirmed green, prefer low-risk reliability work. No large migrations or new API surfaces should be merged without a rollback plan. The outstanding SSRF security fix (PR #1) is explicitly exempted — it is a reliability/security patch that should proceed independent of this PR.
Test plan
cd backend && pip install -r requirements.txt && pytest tests/ -v→ 89 passed locally (main), 118 passed onsecurity/asi02-ssrf-tool-url-validationcd frontend && npm ci && npx tsc --noEmit && npm run lintOut of scope
backend/data_quality/anddocs/runbooks/partial work from a prior session — separate PR once complete.🤖 Generated with Vecna
Co-Authored-By: Vecna noreply@vecna.ai