diff --git a/local/AGENTS.md b/local/AGENTS.md index 8b9a998078..3189298164 100644 --- a/local/AGENTS.md +++ b/local/AGENTS.md @@ -613,6 +613,29 @@ If we can fetch fresh upstream sources tomorrow, provision sources from `sources If a change exists only inside an upstream-owned `recipes/*/source/` tree, then it is **not yet preserved**, even if the current build happens to pass. +### Orphan-patch decision tree (added 2026-07-12, Phase 2.3) + +When `local/scripts/verify-patch-content.sh` reports a patch in +`local/patches//` is no longer present in the fork HEAD +(orphan), the default action is NOT to reapply. Apply this decision +tree per AGENTS.md ยง "Orphan-Patch Supersession Decision Tree": + + 1. Run 'git -C local/sources/ log --all --oneline -i --grep ' + where is extracted from the orphan's filename. + + 2. Classify the orphan: + (a) SUPERSEDED upstream โ†’ MOVE to legacy-superseded-/ + (b) INTEGRATED via other commit โ†’ MOVE to legacy-superseded-/ + (c) MISSING-UPSTREAM โ†’ try patch -p1 --fuzz=5, else mark Phase 2.4+ + and leave in local/patches// + + 3. Special cases (always SUPERSEDED): + - 'bump' patches: managed by sync-versions.sh + - 'ecosystem-pins': managed by Local Fork Supremacy + AGENTS.md rules + +See: `local/docs/PATCH-PRESERVATION-AUDIT-2026-07-12.md` and the +`SUPERSEDED.md` audit log in `local/patches/legacy-superseded-/`. + ### Local fork recipe directories must not carry patch files When a recipe's `[source]` uses `path = ".../local/sources//"`, the local fork