Repository navigation
test: cover the shutdown-report drop and the worker wrapper's false result - #109
Merged
Merged
Conversation
…esult A session handler registered without a shutdown function makes the session module, which shuts down after this extension, call user code after the automatic report: with a fault in that report's basedir check, write() and close() must still run. The unit build also registers its contracts with observers Off, so the worker modes check the wrapper's false result while the fatal error is still pending. The worker test helper releases its strings when a bailout passes.
… function Renaming profiler_register_closure_identity() in the unit build dropped a mutant from the test inventory. The sampling unit's registration, which startup runs in both modes, now registers the bridge unit's contracts when observers are Off. The Off worker checks accept the sampling interrupt hook's raise where the platform has one.
phcorp
force-pushed
the
test/shutdown-drop-and-worker-result
branch
from
November 29, 2026 15:58
95a50cf to
b5bc51e
Compare
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 remaining test gaps from the last reviews. No runtime source changes.
session_set_save_handler()registers a shutdown function by default, so earlier attempts saw the session flush before any module shutdown and passed with or without the fix. Withregister_shutdown: false, the session module, which shuts down after this extension (Zend runs RSHUTDOWN in reverse registration order), calls the user handler after the automatic report. A newallowed-shutdownfault fails only shutdown-phase basedir checks. The test requireswriteandcloseboth to run; without theprofiler_reset_clocks()in request shutdown,closeis lost.false(fix: type the worker wrapper's early returns and raise deferred fatals first #106), now tested. With observers the end observer raises before anyone reads the result, but without them nothing does at the call's end. The unit build now also registers its contracts with the closure-identity slot, soworker-materializeandworker-endrun withobserver=0and requireIS_FALSEwith the fatal still pending. RevertingRETURN_FALSEtoreturnfails them.automatic_worker_serve_with()releases its strings when a bailout passes.Checked and closed without code: under
observer=Offon platforms without the sampling interrupt hook, no path defers a fatal error that nothing raises. No session can start, the worker wrapper is not registered, request startup raises its own, and shutdown drops its own on purpose.