Skip to content

Bootstrap: apply-patches.sh must tolerate already-applied php-types-yield-from.patch (idempotent vendor) #3042

@PurHur

Description

@PurHur

Milestone

M0/M5 prerequisite — parent #1492. Blocks local harness runs when vendor/ is in a mixed patch state (distinct from fresh-clone anchor drift in #3033, fixed on master via #3034).

Problem

On a tree where php-types-yield-from.patch content is already present in vendor/ircmaxell/php-types/lib/PHPTypes/TypeReconstructor.php, script/apply-patches.sh aborts:

ERROR: failed to apply php-types-yield-from.patch
  Hint: git apply --check -p0 patches/php-types-yield-from.patch

Subsequent overlays never run; make north-star5-verify and all bootstrap probes fail before compile.

2026-05-29 probe: host apply-patches.sh exit 1; Docker tar-copy fresh tree applies cleanly (overlays skip).

Scope

Path Work
script/apply-patches.sh Treat git apply “already applied” / hunk-ignored as success for yield-from (and similar)
patches/php-types-yield-from.patch Optional: fuzzier context or apply_php_types_yield_from_overlay idempotent check

Repro

# After a successful patch run, re-run:
./script/apply-patches.sh
# Observed: ERROR failed to apply php-types-yield-from.patch (exit 1)

Done when

  • ./script/apply-patches.sh exits 0 on repeated runs (all patches Skip or apply once)
  • make north-star5-verify reaches vendor steps without patch abort on host bind-mount / tar-copy
  • #3033 remains closed/duplicate for fresh-clone-only anchor fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions