diff --git a/.github/workflows/php-package.yml b/.github/workflows/php-package.yml index 6dc3744..a51f1fd 100644 --- a/.github/workflows/php-package.yml +++ b/.github/workflows/php-package.yml @@ -6,7 +6,7 @@ # # jobs: # harness: -# uses: Pollora/harness/.github/workflows/php-package.yml@main +# uses: Pollora/harness/.github/workflows/php-package.yml@v0.1.40 # permissions: # contents: read # diff --git a/.github/workflows/template.yml b/.github/workflows/template.yml index ee6f32d..d335a8b 100644 --- a/.github/workflows/template.yml +++ b/.github/workflows/template.yml @@ -13,7 +13,7 @@ # # jobs: # harness: -# uses: Pollora/harness/.github/workflows/template.yml@v0.1.10 +# uses: Pollora/harness/.github/workflows/template.yml@v0.1.40 # with: # mode: enforce # permissions: diff --git a/CHANGELOG.md b/CHANGELOG.md index 47fa5d3..76f5d8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Documentation + +- The README gives the security patterns a template runs (SEC-01 to SEC-07 and CONV-10) and says `mutation.min` has no default for `changed-relative`; the headers of the reusable workflows call a current tag. + ## [0.1.40] - 2026-11-27 ### Documentation diff --git a/README.md b/README.md index 07b4828..106d8d0 100644 --- a/README.md +++ b/README.md @@ -266,7 +266,7 @@ A whole mutation run grows with the size of the repository: the framework's did "mutation": { "scope": "changed-relative", "min": 80, "tolerance": 2, "min_mutants": 5, "max_files": 3, "max_minutes": 15 } ``` -Only `scope` is needed; the other keys are shown with their defaults. `check --mutation` lists the source files the change touches (the same list as `changed`), measures **each file on the change and on the base**, and the *Mutation testing (changed files, relative)* gate refuses a file whose score fell. It blocks in `enforce` mode. In the reusable workflow it runs on pull requests only, release pull requests excluded (see below). The base is `--mutation-base` (`HEAD^1`, the target branch on a pull request's merge commit: the `fetch-depth: 2` of the workflow already provides it); `pollora-qa check --mutation --mutation-scope=changed-relative --mutation-base=origin/develop` runs it by hand. +Only `scope` is needed; the other keys are optional and shown with their defaults, except `min`, which has none: without it, a new file or a file whose base cannot be measured is only reported. `check --mutation` lists the source files the change touches (the same list as `changed`), measures **each file on the change and on the base**, and the *Mutation testing (changed files, relative)* gate refuses a file whose score fell. It blocks in `enforce` mode. In the reusable workflow it runs on pull requests only, release pull requests excluded (see below). The base is `--mutation-base` (`HEAD^1`, the target branch on a pull request's merge commit: the `fetch-depth: 2` of the workflow already provides it); `pollora-qa check --mutation --mutation-scope=changed-relative --mutation-base=origin/develop` runs it by hand. - **In CI, on pull requests only, and not on a release pull request.** The question is about a change, and after a merge or at night the change is `HEAD^1..HEAD` of the branch: a whole release, past `max_files`, for a red `main` that no commit can fix. So on every event other than `pull_request` (push, tag, schedule, manual run, `merge_group`) the *Quality gates* job of `php-package.yml` does not run the gate, and says so in a notice and in the job summary. The gate is then absent from the report: it is not a pass. What runs instead depends on `ratchet.msi`: - **No `ratchet.msi`:** no mutation runs. @@ -364,7 +364,7 @@ jobs: contents: read ``` -It runs the gates that need nothing but the source: the secrets in the history (SEC-08), the code style (Pint, the template's own `pint.json` or the Laravel preset), the security patterns (SEC-01, SEC-03, SEC-04, SEC-05, CONV-10, with the rules of the version the workflow is pinned at) and the dependency audit of a committed `composer.lock` (SEC-09). PHPStan, Rector, the dependency analysis, the tests matrix, the API contract and the downstream run need a package: a template keeps its own tests in its own workflow. +It runs the gates that need nothing but the source: the secrets in the history (SEC-08), the code style (Pint, the template's own `pint.json` or the Laravel preset), the security patterns (SEC-01 to SEC-07 and CONV-10, with the rules of the version the workflow is pinned at) and the dependency audit of a committed `composer.lock` (SEC-09). PHPStan, Rector, the dependency analysis, the tests matrix, the API contract and the downstream run need a package: a template keeps its own tests in its own workflow. A template holds placeholders the scaffolder fills in (`%theme_namespace%`, `%plugin_name%`). They are not PHP, so Pint would fail to parse the file: it runs on a copy where each one is an identifier. `observed` lists the gates a template reports without blocking, the way `.harness.json` does for a package: a theme with hundreds of `{!! !!}` it has not yet been through is `observed: security` until it has.