jdecool/scaleway-runtimepublic Fork
⑂ b326a41
Commits
⬇ Clone ▾
git clone https://git.rickub.com/jdecool/scaleway-runtime.git
git clone ssh://git@rickub.com/jdecool/scaleway-runtime.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

docs(adr): record the InvocationRunner contract and the ignored runtime classUnverified

Jérémy DECOOL committed 2026-11-13T22:06:42+01:00 Browse files
b326a41 parent: 755512e
modified docs/adr/0001-handler-drives-runtime-lifecycle.md +5 -1
@@ -1,9 +1,13 @@
11 # The Handler drives the Runtime lifecycle instead of autoload_runtime.php
22
33 Scaleway owns the PHP process and calls a global `handle($event, $context)` for each Invocation, while the generated `vendor/autoload_runtime.php` re-includes `$_SERVER['SCRIPT_FILENAME']` and ends with `exit()`.
4-We therefore ship a Handler that instantiates our `RuntimeInterface` itself, resolves the unchanged Front Controller, and delegates each Invocation to the runner, keeping the `RuntimeInterface`/`RunnerInterface` contract and the `extra.runtime` options.
4+We therefore ship a Handler that instantiates our `RuntimeInterface` itself, resolves the unchanged Front Controller through its resolver, and delegates each Invocation to a runner, keeping the `RuntimeInterface` contract and the `extra.runtime` options.
5+
6+`RunnerInterface::run(): int` has no room for an Event nor a Function Response, so our runners implement an own `InvocationRunner::invoke($event, $context): array` instead.
7+`extra.runtime.class` and `APP_RUNTIME` are ignored: the Handler always uses `ScalewayRuntime`, as those name the runtime the same app uses elsewhere (FPM, FrankenPHP).
58
69 ## Considered Options
710
811 - Custom `autoload_template` without `exit`: rejected, still coupled to `SCRIPT_FILENAME`, which Scaleway controls.
912 - Booting the Kernel by hand without the Runtime component: rejected, loses Front Controller portability and runtime options.
13+- A `RunnerInterface` built per Invocation around the Event: rejected, `getRunner()` only receives the Application, so the Event would travel through hidden mutable state on the runtime.
@@ -1,9 +1,13 @@
1 # The Handler drives the Runtime lifecycle instead of autoload_runtime.php1 # The Handler drives the Runtime lifecycle instead of autoload_runtime.php
2 2
3 Scaleway owns the PHP process and calls a global `handle($event, $context)` for each Invocation, while the generated `vendor/autoload_runtime.php` re-includes `$_SERVER['SCRIPT_FILENAME']` and ends with `exit()`.3 Scaleway owns the PHP process and calls a global `handle($event, $context)` for each Invocation, while the generated `vendor/autoload_runtime.php` re-includes `$_SERVER['SCRIPT_FILENAME']` and ends with `exit()`.
4-We therefore ship a Handler that instantiates our `RuntimeInterface` itself, resolves the unchanged Front Controller, and delegates each Invocation to the runner, keeping the `RuntimeInterface`/`RunnerInterface` contract and the `extra.runtime` options.4+We therefore ship a Handler that instantiates our `RuntimeInterface` itself, resolves the unchanged Front Controller through its resolver, and delegates each Invocation to a runner, keeping the `RuntimeInterface` contract and the `extra.runtime` options.
5+
6+`RunnerInterface::run(): int` has no room for an Event nor a Function Response, so our runners implement an own `InvocationRunner::invoke($event, $context): array` instead.
7+`extra.runtime.class` and `APP_RUNTIME` are ignored: the Handler always uses `ScalewayRuntime`, as those name the runtime the same app uses elsewhere (FPM, FrankenPHP).
5 8
6 ## Considered Options9 ## Considered Options
7 10
8 - Custom `autoload_template` without `exit`: rejected, still coupled to `SCRIPT_FILENAME`, which Scaleway controls.11 - Custom `autoload_template` without `exit`: rejected, still coupled to `SCRIPT_FILENAME`, which Scaleway controls.
9 - Booting the Kernel by hand without the Runtime component: rejected, loses Front Controller portability and runtime options.12 - Booting the Kernel by hand without the Runtime component: rejected, loses Front Controller portability and runtime options.
13+- A `RunnerInterface` built per Invocation around the Event: rejected, `getRunner()` only receives the Application, so the Event would travel through hidden mutable state on the runtime.