Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/php-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.

Expand Down
Loading