Kernel behavior
Verification
Scope
Execution state across cells, stream order and completeness, output written to the engine's own descriptors, interrupts, completion offsets, and process cleanup after shutdown, kill, and engine failure.
References
- Versions
- PHP 8.5.10, Python 3.14.7, ipykernel 7.4.0, jupyter_client 8.10.0
Method
Protocol tests start a kernel registered from the tested commit and drive it through jupyter_client. Stream tests drive the PHP engine through the transport's Engine class with a slowed pipe reader.
- Check
- Expected values and invariants of the package
- Recorded
- 2026-11-01, PHP 8.5.10, macOS 27.0.1 (arm64), commit 46349a3
Tolerances
exact equality
Applies to: Asserted behavior
x: package value; r: reference value.
Results
17 comparisons: 17 pass, 0 fail, 0 skipped.
| Case | Quantity | Status |
|---|---|---|
| a cell ends only after its descriptor output has been read | Behavior | pass |
| the marker is found across a read boundary and never shown | Behavior | pass |
| a nul the cell writes itself is passed through | Behavior | pass |
| a cell that closes stdout still ends | Behavior | pass |
| the kernelspec starts the wrapper as a module | Behavior | pass |
| state carries from one cell to the next | Behavior | pass |
| a silent cell shows nothing but still reports an error | Behavior | pass |
| an engine killed mid cell is reported rather than hanging | Behavior | pass |
| an interrupt stops a running cell | Behavior | pass |
| stdout and stderr arrive in the order they were written | Behavior | pass |
| a cell that prints megabytes does not deadlock | Behavior | pass |
| what the engine writes to its own descriptors is streamed | Behavior | pass |
| the cursor is converted across a multibyte character | Behavior | pass |
| a kernel killed outright leaves no engine running | Behavior | pass |
| an orphaned engine in a runaway cell stops itself | Behavior | pass |
| the watchdog leaves a long cell and its sleep alone | Behavior | pass |
| a shutdown leaves no engine and no temporary directory | Behavior | pass |
Reproduction
From the repository root
python -m pip install -r tests/Protocol/requirements.txt
composer install
python -m pytest tests/Protocol -v
- Raw record
- site/verifications/kernel-behavior.json
- Full results
- tests/Protocol/test_kernel.py