Skip to content

Testing: 005-SessionsWeb AOT link + two-request CGI execute smoke #1891

@PurHur

Description

@PurHur

Problem

#1881 adds VM phpc serve + flash/session flows; #1887 wires VM web-smoke curls. Neither covers AOT:

  • phpc build --project examples/005-SessionsWeb link
  • Two phpc cgi (or deploy wrapper) invocations with the same PHPSESSID cookie showing persisted $_SESSION

test/unit/SessionBuiltinTest.php exercises VM two-request persistence; make examples-aot-smoke stops at 000–004. Deploy docs (#445) need an honest session row.

session_start is JIT/AOT yes on master (docs/capabilities.md, #1882); session_destroy / session_regenerate_id remain VM-only (#1892).

Goal

When #1881 tree exists and AOT link is green:

  1. test/aot/SessionsWebAotExecuteTest.php (or extend ExamplesCompileTest) — @group llvm + @group aot-link
  2. script/examples-aot-smoke.sh — build 005, run binary twice with cookie jar (POST flash → GET shows message)
  3. Opt-in gate SESSIONS_WEB_AOT_SMOKE_GATE in script/ci-defaults.env (default 01 when stable)

Implementation hints

Piece Path Notes
Cookie jar test/support/CgiCookieJar.php (new or reuse) Parse Set-Cookie from first phpc cgi stdout/headers
Env PHP_COMPILER_SESSION_DIR / temp Isolate session files per test run
Link phpc build --project Same manifest style as 004-ApiJson
Execute PHPC_DEPLOY_ROOT or direct binary Mirror 003 MiniWebAppAotExecuteTest CGI overlay
Skip LlvmToolchain::isReady() Same as other @group llvm tests

Acceptance criteria

SESSIONS_WEB_AOT_SMOKE_GATE=1 ./script/ci-local.sh --filter SessionsWebAot
SESSIONS_WEB_AOT_SMOKE_GATE=1 make examples-aot-smoke   # includes 005 when green
  • Second CGI invocation sees $_SESSION from first without VM fallback
  • Gate documented in docs/local-ci-matrix.md and examples/README.md

Verification (local / Docker only)

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

No GitHub Actions.

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