Skip to content

Fix the unnamed cron task that intermittently crashed pages, and add a CI debug workflow - #43

Merged
bonelifer merged 2 commits into
masterfrom
functional-debug-workflow
Sep 28, 2026
Merged

bonelifer merged 2 commits into
masterfrom
functional-debug-workflow

Conversation

@bonelifer

@bonelifer bonelifer commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the intermittent functional test failures, and a crash that can hit live boards.

  • The bug: the restriction expiry cron task was registered without set_name, so its name was empty. On every page phpBB shuffles its cron tasks and triggers the first ready one from the page footer. Whenever it picked this one, building the cron URL threw
    InvalidParameterException: Parameter "cron_type" for route "phpbb_cron_run" must match "[^/]++" ("" given)
    and the page died with an empty HTTP 500. The shuffle is why it was intermittent, and why the failures moved between databases and test steps.
  • The fix: config/services.yml now calls set_name with cron.task.phpbbmodders.banhammer.restriction_expiry, the same way every phpBB core cron task is registered.
  • Adds .github/workflows/functional-debug.yml, which found the cause:
    • it mirrors the test framework's SQLite/MSSQL job, turns on PHP error logging in php-fpm (phpBB's CI setup leaves it off), runs the functional tests 10 times, and uploads the PHP, php-fpm and nginx logs
    • it runs only by hand (Actions → Functional test debug → Run workflow) or when the file changes in a pull request, so normal CI is unaffected

Test plan

  • Before the fix, the debug workflow reproduced the failure in 2 of 5 runs on MSSQL 2022. Its PHP error log showed the exception above for both.
  • Claude reproduced it on a phpBB 3.3.19 board: with the old services.yml the task has an empty name, building its cron URL throws the same exception, and phpBB can't find the task by name. With the fix, the task is named, its URL builds, and phpBB finds it.
  • This PR's CI runs the debug workflow 10 times on MSSQL 2022, plus the normal tests.

Investigated and written by Claude on behalf of William Jacoby (bonelifer).

bonelifer and others added 2 commits September 27, 2026 22:18
Mirrors the test framework's SQLite/MSSQL job, turns on PHP error
logging in php-fpm, runs the functional tests several times, and
uploads the PHP, php-fpm and nginx logs. Runs only by hand or when this
file changes in a pull request, so normal CI is unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cron service never called set_name, so the task's name was empty.
phpBB shuffles its cron tasks on each page and triggers the first ready
one from the page footer; whenever it picked this one, building its
cron URL threw InvalidParameterException ("cron_type" ... "" given) and
the whole page died with an empty HTTP 500. That is the intermittent
functional test failure, and it can happen on live boards too.

Also raise the debug workflow to 10 runs per pull request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bonelifer bonelifer changed the title Add a workflow to diagnose the intermittent functional test failures Fix the unnamed cron task that intermittently crashed pages, and add a CI debug workflow Sep 28, 2026
@bonelifer
bonelifer merged commit 422019e into master Sep 28, 2026
10 checks passed
@bonelifer
bonelifer deleted the functional-debug-workflow branch September 28, 2026 03:30
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