Skip to content

Fix flaky parallel CI: isolate published files per test process - #2

Merged
pushpak1300 merged 1 commit into
mainfrom
claude/keen-fermat-qrpcpp
Oct 1, 2026
Merged

pushpak1300 merged 1 commit into
mainfrom
claude/keen-fermat-qrpcpp

Conversation

@pushpak1300

Copy link
Copy Markdown
Member

What does this PR do?

This PR fixes an intermittent failure in the Tests workflow, first seen on run 36550334572 (P8.3 - L12.* - prefer-stable - ubuntu-latest):

Failed opening required '.../vendor/orchestra/testbench-core/laravel/config/grant.php'
  at vendor/orchestra/testbench-core/src/Bootstrap/LoadConfiguration.php:89

Root cause: the grant:install test publishes config/grant.php into the shared Testbench skeleton and deletes it in its finally block. composer test:unit runs pest --parallel. If another worker boots its app while the file exists, LoadConfiguration lists it, and the worker then fails to require it once the install test has removed it. Whether a run hits this depends on test order, so identical code can pass in one run and fail in the next.

Fix: TestCase::defineEnvironment() runs before providers boot. It now points the app, config and database paths at a per-process temp directory, so publishing never writes to the shared skeleton. The install test also asserts that the skeleton's config directory is left untouched.

Type of change

  • Bug fix
  • New feature
  • Refactor / code cleanup
  • Documentation

Checklist

  • Tests added or updated
  • composer lint passes (Pint and Rector are clean under composer test:lint)
  • composer test passes, and 8 consecutive pest --parallel runs passed locally with no grant.php left in the skeleton

🤖 Generated with Claude Code

https://claude.ai/code/session_01Li5c15yQmNGe1f2jZpMv5W


Generated by Claude Code

The grant:install test published config/grant.php into the shared
Testbench skeleton and deleted it afterwards. Under pest --parallel,
another worker could list the skeleton's config directory while the file
existed and then fail to require it once it was removed.

Point app, config, and database paths at a per-process temp directory
so publishing never touches the shared skeleton.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Li5c15yQmNGe1f2jZpMv5W
@pushpak1300
pushpak1300 merged commit 507ff15 into main Oct 1, 2026
39 checks passed
@pushpak1300
pushpak1300 deleted the claude/keen-fermat-qrpcpp branch October 13, 2026 16:29
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.

2 participants