Skip to content

DevEx: miniwebapp-gates stage 4b2 — AOT CLI execute byte probe (#764) #773

@PurHur

Description

@PurHur

Problem

#472 documents gate stage 4b2 (native binary + CGI env → non-empty HTML), but script/miniwebapp-gates.sh jumps from 4a dry-run to 4c examples-aot-smoke without probing execute.

Contributors running make miniwebapp-gates or phpc doctor --gates see 4b link messaging tied to closed #568, not whether .phpc/bin/app prints bytes for QUERY_STRING=route=home.

Goal

Add stage 4b2 to miniwebapp-gates.sh and doctor output:

  1. When LLVM is ready and phpc build --project examples/003-MiniWebApp exits 0
  2. Run .phpc/bin/app with QUERY_STRING=route=home REQUEST_METHOD=GET
  3. Fail if stdout length is 0 (exit 1); print stderr tail + link AOT: MiniWebApp native binary CLI execute emits empty stdout (post-link) #764
  4. Skip when LLVM missing (same pattern as 4a)

Scope

Implementation hints

Piece File Notes
Probe script/miniwebapp-gates.sh Reuse env from #491 / MiniWebAppVmCliTest
Env script/ci-defaults.env Optional MINIWEBAPP_AOT_EXECUTE_GATE=0 until #747 lands (#774)
Docs #472, #753 Cross-link
# Expected manual probe (fails on master until #764):
composer install && ./script/apply-patches.sh
php bin/phpc.php build --project examples/003-MiniWebApp
cd examples/003-MiniWebApp
QUERY_STRING=route=home REQUEST_METHOD=GET ./.phpc/bin/app | wc -c

Acceptance criteria

./script/miniwebapp-gates.sh   # 4b2 fails with actionable #764 message when stdout empty
./phpc doctor --gates

Docker (tar copy if bind-mount empty):

./script/docker-ci-local.sh --filter MiniWebAppGates
# or:
tar -cf - --exclude='.git' --exclude='.llvm' . | docker run --rm -i -w /compiler php-compiler:22.04-dev \
  bash -c 'tar -xf - && composer install -q && ./script/apply-patches.sh && ./script/miniwebapp-gates.sh'

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