Skip to content

Testing: THROWSWEB_AOT_LINK_GATE + THROWSWEB_AOT_SMOKE_GATE (007-ThrowsWeb) #2101

@PurHur

Description

@PurHur

Problem

007-ThrowsWeb (#2076) will land VM + phpc serve smoke (#2093) but has no AOT gate ladder yet. 006-FileUploadWeb established the pattern:

Gate Issue Default in ci-defaults.env
VM multipart #2009 FILE_UPLOAD_WEB_SMOKE_GATE=1
AOT link #2011 FILE_UPLOAD_WEB_AOT_LINK_GATE=1
AOT execute #2012 FILE_UPLOAD_WEB_AOT_SMOKE_GATE=1

Without 007 AOT gates, throw/catch regressions only surface in manual phpc build runs after #195 / #57 land.

Goal

When #2076 tree is green and #195 enables throw + #57 enables catch in AOT:

  1. THROWSWEB_AOT_LINK_GATE=1phpc build --project examples/007-ThrowsWeb in ci-local.sh (llvm group)
  2. THROWSWEB_AOT_SMOKE_GATE=1 — native binary returns HTTP 500 body on invalid POST (CGI env overlay)
  3. Document env vars in docs/local-ci-matrix.md and phpc doctor --gates

Implementation hints

Piece File Notes
PHPUnit test/unit/ThrowsWebAotLinkTest.php, ThrowsWebAotExecuteTest.php Mirror FileUploadWebAotExecuteTest
Shell script/examples-aot-smoke.sh EXAMPLES_AOT_SMOKE_ONLY=007 slice (follow-up #2104)
Defaults script/ci-defaults.env Start 0 opt-in; flip default-on follow-up issue after green
CI wire script/ci-local.sh After link green, before full examples-aot-smoke
Blockers #195, #57, #2084 PHPTs VM compliance first

CGI overlay (sketch)

Invalid POST → caught Exceptionhttp_response_code(500) + HTML error page (same needles as VM smoke #2093).

Acceptance criteria

# After gates default-on:
THROWSWEB_AOT_LINK_GATE=1 THROWSWEB_AOT_SMOKE_GATE=1 ./script/ci-local.sh \
  --filter 'ThrowsWebAot'

Docker:

docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
  env THROWSWEB_AOT_LINK_GATE=1 THROWSWEB_AOT_SMOKE_GATE=1 \
  vendor/bin/phpunit --filter ThrowsWebAot

Dependencies

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions