Make CI trustworthy (PROC-01..05)#23
Open
enesemini wants to merge 6 commits into
Open
Conversation
- run-tests.yml: add a parallel job mirroring `composer test` and a fresh-install matrix job (PHP 8.2/8.3 x Laravel 11/12) that proves composer.json resolves from scratch; trigger on develop too. - Parallel flakiness root fix: give every ParaTest worker its own throwaway copy of the testbench skeleton (TestCase::applicationBasePath). Workers previously shared one skeleton, racing on generated migrations (FileNotFoundException), the app/Aura resource scan (DirectoryNotFoundException), published assets, and compiled views. - Aura::reset() clears mutable static state ($userModel) in the Pest afterEach alongside the existing singleton rebind. - PHPStan: commit a baseline of the current errors so CI fails only on new ones; run the workflow on PHP 8.2 (8.1 cannot resolve deps) and on pull requests. - dependabot-auto-merge: consolidate to one gated step; merge is held by the new required status check on main (set via branch protection). Validation: 8 consecutive `pest --parallel` full-suite runs with only the 3 known deterministic failures owned by PR-5/PR-6. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
enesemini
added a commit
that referenced
this pull request
Jun 12, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Recent Composer refuses to resolve framework versions with open security advisories. EOL Laravel lines never get fixes, so the block permanently excludes versions this package claims to support and every CI job fails at install. Package-level config only applies when aura-cms is the root package (development/CI); consumers' own advisory policy is unaffected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pest-plugin-livewire ^4.0 requires PHP ^8.3, contradicting the package's php ^8.2 floor — caught by the new fresh-install CI job. v3 pairs with the already-allowed Pest 3 on PHP 8.2. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The workflow had been manually disabled in repo settings (the actual PROC-05 'not failing CI'); re-enabled via gh. Add workflow_dispatch and trigger on changes to the workflow file itself. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
On PHP 8.2 the resolver falls back to pest-plugin-livewire v3 and thus Livewire 3, and both the suite (Modals.php uses Livewire\Finder\Finder) and PHPStan fail on LW-01..04 version mismatches that PR-5 owns. 8.3 yields the stack local development runs. Branch protection context updated to the new check name. Also fix the fresh-install version report step (composer show takes a single package). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The class file is Datetime.php; the hardcoded 'Fields\DateTime' only autoloads on case-insensitive filesystems (macOS), so the command and its tests failed on Linux — caught by the new parallel CI job. Serial CI job also gets --no-coverage: phpunit.xml.dist configures coverage reports and pest aborts without a driver. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the PR-1 workstream from
audit/REMEDIATION_PLAN.md(PR #22). Fixes PROC-01, PROC-02, PROC-03, PROC-04, PROC-05.What changed
CI (
run-tests.yml)test-paralleljob mirroring how developers run the suite (composer test, i.e.pest --parallel). Serial-only CI hid every parallel-specific failure (PROC-01).fresh-installmatrix job (PHP 8.2/8.3 × Laravel 11/12) doing a clean dependency resolve — the class of check that would have caught the months-long unsatisfiablecomposer.jsononmain(PROC-02). The plan said Laravel 10/11/12, butlaravel/sanctum ^4.0inrequiremakes Laravel 10 unsatisfiable — the^10.0in require-dev is dead. Decide in PR-10: drop the claim or fix constraints.pest-plugin-livewirev4 (PHP ^8.3), which is what pulls in Livewire 4 — the stack local dev runs and PR-5 commits to. On 8.2 the resolver falls back to Livewire 3 and the suite/analysis fail on LW-01..04 mismatches.develop(previously CI did not run on PRs targeting it at all).pest --no-coverage:phpunit.xml.distconfigures coverage reports and Pest 4 aborts (exit 1, zero tests) when they're requested without a coverage driver.Parallel flakiness root fix (PROC-03)
Every ParaTest worker now boots from its own throwaway copy of the testbench skeleton (
TestCase::applicationBasePath(), keyed byUNIQUE_TEST_TOKEN). Workers previously shared one skeleton and raced on:RefreshDatabase→ randomFileNotFoundExceptionapp/Aura/Resources(generator-test cleanup vs. every boot'sAura::getAppResources()Finder scan) → randomDirectoryNotFoundException, cross-worker resource registrationpublic/vendor, compiled Blade views,routes/,plugins/, skeletoncomposer.jsonNarrower fixes don't work:
useAppPath()breaksApplication::getNamespace()(psr-4 lookup againstcomposer.json). Serial runs keep the shared skeleton. The local skeleton had accumulated 79MB of test junk — cleaned; isolation prevents re-pollution.Also:
Aura::reset()clears mutable static state ($userModel) in the PestafterEach.Fixes the new CI immediately caught
composer.jsonconfig:policy.advisories.block: false— current Composer refuses to resolve framework versions with open advisories; EOL Laravel lines never get fixes, so every install failed. Root-package-only config; consumers' own policy is unaffected.pest-plugin-livewire: ^3.0|^4.0—^4.0alone requires PHP ^8.3, contradicting the package'sphp: ^8.2floor.Fields\Datetimeclass-name case inCreateResourceMigration—'Fields\DateTime'only autoloads on case-insensitive filesystems (macOS); the command and 4 tests failed on Linux.PHPStan (PROC-05)
Dependabot auto-merge (PROC-04)
mainnow has branch protection requiring theP8.3 - prefer-stable - ubuntu-latestcheck (set via API — previously no protection existed, so--automerged immediately).main: addparallel - P8.3 - prefer-stableto the required checks.CI state on this PR
Validation
pest --parallelfull-suite runs with only the 3 known failures.composer analyseclean against the baseline.phpunit-without-teams.xmlfailures (createSuperAdmin()creates a Team unconditionally) are pre-existing ondevelop— verified in a clean worktree; PR-6 scope.🤖 Generated with Claude Code