Problem
007-ThrowsWeb VM smoke (#2093 ✅, #2125 ✅) covers the caught invalid POST path (email=bad → HTML “invalid”). The README documents uncaught exceptions mapping to HTTP 500 via phpc serve (#152 ✅), but there is no automated curl asserting status 500 on an uncaught throw route.
Presenters can regress #152 mapping while caught-path curls stay green.
Goal
Add an opt-in gate (default-off first; flip after green):
THROWSWEB_UNCAUGHT_500_GATE=1 runs a serve + curl expecting HTTP 500
- Wire into
script/examples-web-smoke.sh (--throws-uncaught-only or extend --throws-only)
- Document in
examples/007-ThrowsWeb/README.md and docs/GETTING-STARTED.md §5b
Suggested fixture
Add examples/007-ThrowsWeb/uncaught.php or a query flag on example.php that throws outside try/catch (minimal, presenter-safe).
Implementation hints
| Piece |
Path |
Notes |
| Smoke |
script/examples-web-smoke.sh |
curl -sf -o /dev/null -w '%{http_code}' expects 500 |
| Env |
script/ci-defaults.env |
THROWSWEB_UNCAUGHT_500_GATE="${...:-0}" |
| CI |
script/ci-fast.sh via ci-common.sh |
After caught smoke stable |
| Serve |
lib/Web/DevServer.php |
#152 mapping — assert no regression |
Acceptance criteria
THROWSWEB_UNCAUGHT_500_GATE=1 ./script/examples-web-smoke.sh --throws-only
./script/ci-fast.sh --filter ThrowsWebUncaught
Harness:
./script/docker-exec.sh -- bash -lc 'THROWSWEB_UNCAUGHT_500_GATE=1 ./script/examples-web-smoke.sh --throws-only'
Dependencies
Links
Problem
007-ThrowsWeb VM smoke (#2093 ✅, #2125 ✅) covers the caught invalid POST path (
email=bad→ HTML “invalid”). The README documents uncaught exceptions mapping to HTTP 500 viaphpc serve(#152 ✅), but there is no automated curl asserting status500on an uncaught throw route.Presenters can regress #152 mapping while caught-path curls stay green.
Goal
Add an opt-in gate (default-off first; flip after green):
THROWSWEB_UNCAUGHT_500_GATE=1runs a serve + curl expecting HTTP 500script/examples-web-smoke.sh(--throws-uncaught-onlyor extend--throws-only)examples/007-ThrowsWeb/README.mdanddocs/GETTING-STARTED.md§5bSuggested fixture
Add
examples/007-ThrowsWeb/uncaught.phpor a query flag onexample.phpthat throws outside try/catch (minimal, presenter-safe).Implementation hints
script/examples-web-smoke.shcurl -sf -o /dev/null -w '%{http_code}'expects500script/ci-defaults.envTHROWSWEB_UNCAUGHT_500_GATE="${...:-0}"script/ci-fast.shviaci-common.shlib/Web/DevServer.phpAcceptance criteria
Harness:
./script/docker-exec.sh -- bash -lc 'THROWSWEB_UNCAUGHT_500_GATE=1 ./script/examples-web-smoke.sh --throws-only'Dependencies
Links
examples/007-ThrowsWeb/README.mdnorth-star2-verifytail (out of scope here)