Skip to content

fix: a new app passes its own static analysis, and CI keeps it so - #168

Merged
rodrigoteamx merged 2 commits into
mainfrom
hp/greenhouse/t-0106-the-skeleton-passes-its-own-analysis
Oct 10, 2026
Merged

rodrigoteamx merged 2 commits into
mainfrom
hp/greenhouse/t-0106-the-skeleton-passes-its-own-analysis

Conversation

@rodrigoteamx

Copy link
Copy Markdown
Contributor

A new app did not pass its own static analysis. With the skeleton's own phpstan.neon (level 6 over src, public and config):

public/worker.php:121  Call to function method_exists() with Milpa\AppRuntime\Support\KernelDefinition and 'nextBootFails' will always evaluate to true.

The guard was for a runtime older than 0.197; the skeleton's floor is >=0.198 <1.0. It was dead.

Why nobody saw it: the skeleton ships phpstan/phpstan and a config, and no workflow ran it.

What changes

  1. CI analyses the house the way its owner would — its own config, no flags — in the two create-project houses CI already bears: the fresh one, and the one that enabled its capabilities (which writes config/operations.php and config/plugins.php, read by the same config).
  2. The dead guard is removed.

The control, by execution

The first commit of this pull request adds only the CI step: it is red, on the line above. The second removes the guard: green. Measured on fresh cattle too, with no model (greenhouse evidence/1187): both houses exit 1 with one error before, 0 after.

No published contract changes: public/worker.php asks the same question of the same method.

…rpose

The skeleton ships PHPStan and a config (level 6 over src, public and config) and no workflow ran it. Both create-project houses CI already bears — the fresh one and the one that enabled its capabilities — are now analysed with the house's own config.

This commit adds only the guard. It is red today: public/worker.php carries a guard for a runtime below the skeleton's own floor, and PHPStan says so. The next commit removes it.
… below the floor is gone

public/worker.php guarded its question to the kernel definition with method_exists(), for a runtime older than 0.197. The skeleton's floor is >=0.198: the guard could never be false, and PHPStan said so on every new app.

It asks directly now. No definition at all — the include failed — is still the one case that cannot be asked, and the worker still leaves then.
@rodrigoteamx
rodrigoteamx merged commit 15b13ed into main Oct 10, 2026
2 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.

1 participant