Skip to content

docs: sync CONTRIBUTING.md's pre-PR checklist with what CI actually runs - #125

Open
shrdgn wants to merge 1 commit into
mainfrom
claude/contributing-docs-fix
Open

docs: sync CONTRIBUTING.md's pre-PR checklist with what CI actually runs#125
shrdgn wants to merge 1 commit into
mainfrom
claude/contributing-docs-fix

Conversation

@shrdgn

@shrdgn shrdgn commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

CONTRIBUTING.md's "Before you open a PR" section had drifted from what CI (.github/workflows/ci.yml) actually runs:

  • It told contributors to run bare mypy openfusion/, but that fails locally with Library stubs not installed for "yaml" — CI only passes because it appends --ignore-missing-imports --disable-error-code import-untyped --exclude openfusion/cli.py on the command line, none of which was documented. mypy wasn't mentioned in the checklist at all.
  • It said pytest -q # 280+ tests, a number that's already stale (473 tests today) and will keep drifting every time the suite grows.
  • It told contributors to run npm test for the UI job, but CI actually runs npm run test:coverage (which also enforces the coverage thresholds in vite.config.ts) — npm test silently skips that gate, plus npm run typecheck wasn't mentioned even though it's a required CI step.

Why it matters

A contributor following this doc exactly would see local mypy/npm test pass, push a PR, and only then discover from CI that the real gates are different (or, for mypy, that it never actually worked locally at all). Fixed to mirror ci.yml's two jobs command-for-command, and replaced the hardcoded test count with a reference to the coverage percentages CI enforces (pyproject.toml's fail_under = 80, vite.config.ts's thresholds), which don't need updating every time a test is added.

Test plan

  • Ran the exact mypy command now documented — Success: no issues found in 23 source files
  • Ran the exact pytest -q --cov=openfusion --cov-report=term-missing command — 473 passed, 99.61% coverage
  • Docs-only change, no source touched

Found via an automated repo-quality review.


Generated by Claude Code

- Documents the exact mypy flags CI uses (previously undocumented; bare
  `mypy openfusion/` fails locally on the PyYAML stub error CI's flags
  suppress).
- Adds coverage-report flags to the pytest example and points at the
  coverage gates CI enforces (80% backend, 90/70/85/90 frontend) instead
  of a "280+ tests" count that was already stale (473 tests today) and
  will keep drifting.
- Swaps `npm test` for `npm run test:coverage` + `npm run typecheck` --
  the checks the UI CI job actually runs; plain `npm test` catches
  neither a coverage-threshold regression nor a type error.
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.

2 participants