fix(test): align testRestartPolicy with the runtime's exit() contract - #249
Merged
Conversation
openruntimes/php:v5-8.1 was rebuilt on 2026-08-19 and picked up a newer Swoole, where a function calling exit() raises Swoole\ExitException instead of tearing the worker down mid-response. The runtime now catches it and reports a failed execution, so the executor call succeeds with HTTP 200 and carries statusCode 500, where it previously dropped the connection and surfaced an executor-level 500. The server process still exits afterwards, so the restart policy itself is unaffected and the "3 server starts" assertion still holds. Only the two HTTP status expectations were stale. main has been red since that image was pushed, independently of any change in this repo. Note that .env pins mutable runtime tags, so CI inherits upstream rebuilds like this one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Greptile SummaryUpdates
Confidence Score: 5/5The PR appears safe to merge, with the test now matching the established failed-execution response contract. The execution endpoint returns HTTP 200 while carrying function failures in Important Files Changed
Reviews (1): Last reviewed commit: "fix(test): align testRestartPolicy with ..." | Re-trigger Greptile |
ChiragAgg5k
approved these changes
Aug 19, 2026
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.
Problem
mainis currently red.testRestartPolicyfails deterministically:Nothing in this repo changed.
openruntimes/php:v5-8.1was re-pushed to Docker Hub on 2026-08-19 at 08:47 UTC, and.envpins mutable runtime tags, so CI picked up the rebuild.Cause
The php runtime source in
open-runtimes/runtimesis untouched — the rebuild pulled in a newer Swoole, where a function callingexit()raisesSwoole\ExitExceptioninstead of tearing down the worker mid-response. The runtime now catches it and reports a failed execution. Probing the executor directly:So
exit(1)is now a clean failed execution — executor HTTP 200 withbody.statusCode500 — where it previously dropped the connection and surfaced an executor-level 500.RestartCount=1confirms the server process still dies afterwards, so the restart policy itself is unaffected and theassertSame(3, $occurances)assertion still holds. Only the two HTTP status expectations were stale.Verification
origin/main, so it is independent of any open PR.testRestartPolicygreen, including everything past test 16 that CI never reached (stopOnFailurewas aborting earlier).format:check,analyze,refactor:checkall pass.Note for reviewers
Two things worth a maintainer's judgment, both out of scope here:
exit()semantics are intended before we codify them in a test. Graceful 500-with-error reads like an improvement over a dropped connection, but it arrived via a base-image rebuild rather than a deliberate change upstream..envpins mutable tags (openruntimes/php:v5-8.1), so CI inherits upstream rebuilds like this one. Pinning digests would stop this class of surprise.Also related: #248 was failing on
testBuildKeysFlutterfor a separate reason (the maintenance sweep reaping in-flight builds). That is fixed on that branch; this test was simply the next failurestopOnFailurehad been hiding.🤖 Generated with Claude Code