Skip to content

Fix #27: address project_validator issues found during CI - #29

Merged
lefticus merged 5 commits into
cpp-best-practices:mainfrom
leftibot:fix/issue-27-address-project-validator-issues-found-d
Nov 23, 2026
Merged

lefticus merged 5 commits into
cpp-best-practices:mainfrom
leftibot:fix/issue-27-address-project-validator-issues-found-d

Conversation

@leftibot

@leftibot leftibot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Automated fix by @leftibot.

What changed

Fix #27: Address the project_validator --strict findings from CI
project_validator runs with --strict, so its two failures (no status badges, no
type checker) and five warnings (tag-pinned actions, no workflow lint, no
dependency audit, no secret scanning, no security policy) each failed the job.
CI now pins every action to a commit, runs mypy strictly (with the few type
errors it found fixed), zizmor, pip-audit and TruffleHog, and publishes an
OpenSSF Scorecard; the README shows CI and Scorecard badges and SECURITY.md says
how to report a vulnerability. tests/test_ci.py checks each of these.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

Files

 .github/dependabot.yml          |   4 +
 .github/workflows/ci.yml        | 120 ++++++++++++++---
 .github/workflows/scorecard.yml |  35 +++++
 README.md                       |   3 +
 SECURITY.md                     |  11 ++
 pyproject.toml                  |  10 ++
 requirements-ci.in              |   2 +
 requirements-ci.txt             | 278 +++++++++++++++++++++++++++++++++++++++-
 strain/dashboard.py             |  12 +-
 strain/mutators.py              |   7 +-
 strain/operator_sites.py        |  11 ++
 tests/test_build.py             |   2 +-
 tests/test_ci.py                |  50 +++++++-
 tests/test_cli.py               |   3 +-
 tests/test_dashboard.py         |  10 +-
 tests/test_end_to_end.py        |   1 +
 tests/test_engines.py           |   9 +-
 17 files changed, 536 insertions(+), 32 deletions(-)

Closes #27

Triggered by @lefticus.

@lefticus

Copy link
Copy Markdown
Member

@leftibot evaluate against the current main of project-evaluator and update this branch

@leftibot

leftibot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ leftibot finished addressing the review feedback.

@leftibot

Copy link
Copy Markdown
Contributor Author

Addressed review feedback from @lefticus. New commits:

127408b Address review: fuzz and mutation test strain as the current project_validator asks

leftibot added a commit to leftibot/mutant_strain that referenced this pull request Nov 22, 2026
…validator asks

Requested by @lefticus in PR cpp-best-practices#29 review.

project_validator main (28c0eea) --strict reported two new findings on this
branch: fuzz-testing failed (no fuzz targets) and mutation-testing warned (no
mutation testing in CI).

- fuzz/fuzz_mutators.py is an atheris target that feeds arbitrary text to the
  lexer engine and checks that every token sits at its offset and that every
  mutant rewrites only its own operator; a new CI job fuzzes it for two minutes.
- A new CI job runs mutmut ([tool.mutmut] in pyproject.toml) on the strain
  modules a pull request (or a push to main) changes, and reports the surviving
  mutants in the job summary. It only reports; it does not fail on survivors.
  Mutating all of strain takes hours, so it is never run whole.
- atheris and mutmut are locked in requirements-ci.txt; atheris only for Linux
  and Python 3.12 or later, where it publishes wheels.
- mypy, lizard and jscpd cover fuzz/ as they do strain/ and tests/.
- tests/test_ci.py checks both jobs.

Now: 40 checks, 26 passed, 14 skipped, no failures or warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lefticus

Copy link
Copy Markdown
Member

@leftibot fix merge conflicts

@leftibot

leftibot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ leftibot finished addressing the review feedback.

@leftibot

Copy link
Copy Markdown
Contributor Author

Addressed review feedback from @lefticus. New commits:

368f754 Address review: type check the code main brought in
ff8253b Address review: merge main and resolve its conflicts
1d70ffb Merge pull request #49 from cpp-best-practices/fix/issue-45-ci-recipe
51b2044 Merge branch 'main' into fix/issue-45-ci-recipe
195f5be Merge pull request #65 from leftibot/fix/issue-42-cheapest-mutants-first-with-an-eta

leftibot added a commit to leftibot/mutant_strain that referenced this pull request Nov 22, 2026
Kept the commit-pinned actions in ci.yml, combined both sides of
requirements-ci.in (main's coverage, ruff and textual with this branch's
atheris, mutmut, mypy and zizmor) and regenerated requirements-ci.txt from
main's lock, and dropped strain/dashboard.py and its test, which main replaced
with the Textual TUI.

Requested by @lefticus in PR cpp-best-practices#29 review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leftibot added a commit to leftibot/mutant_strain that referenced this pull request Nov 22, 2026
The mypy --strict job this branch adds now covers main's TUI, runner, naming
and packaging code. TuiConsole kept its LiveState in Console's bool `live`, so
it is now `live_state`; the rest are missing annotations and stale ignores.
Also applies ruff format to a blank line main's test_end_to_end.py lacked.

Requested by @lefticus in PR cpp-best-practices#29 review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lefticus

Copy link
Copy Markdown
Member

@leftibot fix merge conflicts

@leftibot

leftibot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ leftibot finished addressing the review feedback.

@leftibot

Copy link
Copy Markdown
Contributor Author

Addressed review feedback from @lefticus. New commits:

24aeeaf Address review: type check the tests main brought in
5b0e5d8 Address review: merge main and resolve its conflicts
36ef18f Merge pull request #69 from leftibot/fix/issue-5-make-parallel-builds-possible
7803ca6 Fix #5: run the covering tests of a mutant in parallel with --jobs
1ba2667 Merge pull request #68 from leftibot/fix/issue-43-code-evaluated-only-at-compile-time-is-n

leftibot added a commit to leftibot/mutant_strain that referenced this pull request Nov 23, 2026
Keeps main's normalized() helper in tests/test_name.py alongside this
branch's typed pyproject() signature.

Requested by @lefticus in PR cpp-best-practices#29 review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leftibot added a commit to leftibot/mutant_strain that referenced this pull request Nov 23, 2026
mypy --strict flagged the parallel-tests stub of Runner.mutated, an
unused ignore, and a read of Console.out as a StringIO; the live-console
test now reads RecordingConsole.transcript instead.

Requested by @lefticus in PR cpp-best-practices#29 review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leftibot and others added 5 commits November 22, 2026 19:14
…dings from CI

project_validator runs with --strict, so its two failures (no status badges, no
type checker) and five warnings (tag-pinned actions, no workflow lint, no
dependency audit, no secret scanning, no security policy) each failed the job.
CI now pins every action to a commit, runs mypy strictly (with the few type
errors it found fixed), zizmor, pip-audit and TruffleHog, and publishes an
OpenSSF Scorecard; the README shows CI and Scorecard badges and SECURITY.md says
how to report a vulnerability. tests/test_ci.py checks each of these.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…validator asks

Requested by @lefticus in PR cpp-best-practices#29 review.

project_validator main (28c0eea) --strict reported two new findings on this
branch: fuzz-testing failed (no fuzz targets) and mutation-testing warned (no
mutation testing in CI).

- fuzz/fuzz_mutators.py is an atheris target that feeds arbitrary text to the
  lexer engine and checks that every token sits at its offset and that every
  mutant rewrites only its own operator; a new CI job fuzzes it for two minutes.
- A new CI job runs mutmut ([tool.mutmut] in pyproject.toml) on the strain
  modules a pull request (or a push to main) changes, and reports the surviving
  mutants in the job summary. It only reports; it does not fail on survivors.
  Mutating all of strain takes hours, so it is never run whole.
- atheris and mutmut are locked in requirements-ci.txt; atheris only for Linux
  and Python 3.12 or later, where it publishes wheels.
- mypy, lizard and jscpd cover fuzz/ as they do strain/ and tests/.
- tests/test_ci.py checks both jobs.

Now: 40 checks, 26 passed, 14 skipped, no failures or warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mypy --strict job this branch adds now covers main's TUI, runner, naming,
packaging and parallel-test code. TuiConsole kept its LiveState in Console's
bool `live`, so it is now `live_state`; the rest are missing annotations and
stale ignores. RecordingConsole keeps its transcript as a StringIO, so the
tests read it from there rather than from Console's TextIO `out`.

Requested by @lefticus in PR cpp-best-practices#29 review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt
--jobs made _add_scheduling_arguments 35 lines, which fails the
function-limits job. --compile-time and --no-build-cache, which choose and
remember mutants rather than schedule them, move to _add_mutant_arguments;
the options and their order in --help are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt
main's packaging test builds a wheel from pyproject.toml, README.md,
LICENSE.txt and strain/, so the mutation-testing job's clean test run, which
runs in mutmut's copy of the project, failed for want of LICENSE.txt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt
@leftibot
leftibot force-pushed the fix/issue-27-address-project-validator-issues-found-d branch from 24aeeaf to a635a5f Compare November 23, 2026 02:31
@lefticus
lefticus merged commit 7e701af into cpp-best-practices:main Nov 23, 2026
17 of 18 checks passed
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.

address project_validator issues found during CI

2 participants