Skip to content

DevEx: phpc doctor --selfhost — top CFG gaps from bootstrap-inventory-triage (#2254) #2285

Description

@PurHur

Problem

./phpc doctor --selfhost (#2053 ✅) prints gate defaults and copy-paste probes, but not which CFG gaps dominate the 611-file inventory (~1579 warnings in docs/bootstrap-inventory.md). Contributors still run a separate triage command (#2254) or grep the generated markdown.

Goal

Extend lib/Doctor.php::runSelfhost() (no new CLI flag name):

  1. When script/bootstrap-inventory-triage.php exists, run --top 3 (5s timeout) and print a compact table under an Inventory triage section.
  2. When the script is missing, print: pending #2254 — php script/bootstrap-inventory-triage.php.
  3. Link each row to Self-host: Unknown Stmt Type lowering batch tracker (post-#2254 triage) #2276 (stmt batches) or Language: unset() on variables, array elements, and object properties #2273 (unset) when message prefix matches.

Optional --json on doctor is out of scope (triage already has --json).

Implementation hints

Piece Path Notes
Doctor lib/Doctor.php proc_open triage subprocess; swallow stderr on timeout
Triage script/bootstrap-inventory-triage.php #2254 SSOT
Tests test/unit/PhpcDoctorTest.php Assert section header + skip line when script absent

Acceptance criteria

./phpc doctor --selfhost | grep -i 'Inventory triage'

Harness:

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && ./phpc doctor --selfhost'

Verification (local / Docker only)

No GitHub Actions (#394 ✅). Do not use raw docker run -v "$(pwd):/compiler" on Runforge — use docker-exec.sh / make test-harness.

Dependencies

Links

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions