Skip to content

Add ./harness quality contract + CI coverage gate#92

Open
juangaitanv wants to merge 3 commits into
mainfrom
chunk1/harness
Open

Add ./harness quality contract + CI coverage gate#92
juangaitanv wants to merge 3 commits into
mainfrom
chunk1/harness

Conversation

@juangaitanv
Copy link
Copy Markdown

@juangaitanv juangaitanv commented May 27, 2026

Summary

First slice of the large dependency-freshness branch. Lands the project's quality tooling so chunks 2 (deps offline) and 3 (deps online/CVE) inherit a working gate.

  • ./harness script (check/fix/lint/test/audit/coverage/pre-commit/ci/post-edit/setup-hooks/suppressions/install) — zero-dep bash wrapper over cargo + git.
  • ./harness ci strict gate: clippy -D warnings, fmt check, cargo audit, tests + cargo-llvm-cov line-coverage gate.
  • GitHub Actions test.yml routed through ./harness ci so cloud CI and local CI run the same gate.
  • AGENTS.md documents the commands. CLAUDE.md and .claude/ are gitignored — agent-specific configs stay local.
  • utils/api.rs unit tests (is_jwt, auth_headers, check_for_warnings) — additions to existing code so the coverage floor isn't sitting on 0%.
  • cargo fmt + clippy auto-fix sweep across existing src/ so the strict clippy gate holds.

Coverage floor

The original branch calibrated 41% against a much larger codebase (deps + CVE). On main + harness alone the baseline is 13.83% lines, so the floor is set to 13%. It will ratchet up as chunks 2/3 land with their tests.

Out of scope (in later chunks)

  • corgea deps subcommand (inventory + freshness + precheck) → chunk 2
  • corgea deps verify --check-cve + vuln-api client + dogfood workflow → chunk 3

Test plan

  • CI: Test workflow green on the PR (clippy strict, fmt, audit, tests + 13% coverage)
  • Local: ./harness ci passes on a fresh clone
  • Local: ./harness coverage reports HTML under target/llvm-cov/html/
  • No claude references in tracked files (git grep -i claude returns only .gitignore entries)

@juangaitanv juangaitanv requested review from asadeddin and yhoztak May 27, 2026 12:56
cursor[bot]
cursor Bot previously requested changes May 27, 2026
Comment thread harness
Comment thread harness
Comment thread harness Outdated
Comment thread src/utils/api.rs Outdated
Zero-dep bash runner (check/fix/lint/test/audit/coverage/pre-commit/ci/
post-edit/setup-hooks/suppressions/install) wrapping cargo + git.

./harness ci is the single source of truth for the strict gate: clippy
-D warnings, fmt check, cargo audit, and cargo-llvm-cov tests with a
--fail-under-lines floor (13% baseline, will ratchet up as more code
ships with tests).

GitHub Actions test.yml runs the same gate so cloud CI matches local.

AGENTS.md documents the commands. CLAUDE.md and .claude/ are gitignored
so personal agent configs stay local.
Reformats per rustfmt and applies clippy lints (needless_return,
collapsible_if, eq_ignore_ascii_case, double_ended_iterator_last,
print_with_newline, contains_key, needless_late_init,
useless_format/vec, borrowed_box, etc.) so ./harness ci's strict
clippy gate passes.

Adds unit tests for utils::api::{is_jwt, auth_headers,
check_for_warnings} so the coverage gate isn't sitting on 0%.

Pure refactor + tests: no behavior change.
…able

Pre-commit now mirrors CI (strict clippy + fmt --check + tests) instead
of running autofix, which could rewrite the working tree behind the
commit. Drops the unimplemented `install` from harness docs.

Extracts `should_warn_deprecated` from `check_for_warnings` so the 299
deprecation contract is covered by tests; deleting the branch now
fails the suite.
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