heal_rails: forward-port the #2177 vendored-path rail onto main (idss #2180) #343

Open
matou-build-agent wants to merge 1 commit from fp/idss-2180 into main

Forward-ports the #2177 heal_rails vendored-path rail from the idss-pin
backport branch (backport/idss-2177 @ 291c9bf, off pin 4eae572b) onto
dev-factory main, so the fix survives the next pin advance.

  • Commit: cherry-pick -x of 291c9bf76e1cf08b79da6264fd02e1627d404788
    (itself a -x of the discarded original 0daf0d1); the message carries the
    full provenance chain. Single commit, no squash.
  • Resolution: applied cleanly onto main despite the heal rework since
    the pin — the _heal_touches_product_surface / _heal_weakens_check context
    anchors were byte-identical, so the new _heal_touches_vendored_path helper and
    its rail landed with no conflict. Resulting rail order:
    self-mod → vendored-path → assertion → product-surface → 3-file cap → line cap.
  • What it does: heal_rails now resets + refuses (HEAL_RAIL_REASON
    "vendored-path edit", not swarmable) any heal commit that touches a
    FACTORY_MANIFEST path, UNLESS it is a genuine re-vendor (FACTORY_REF bumped
    in the same commit and check-harness-drift.sh returns a clean exit 0).
    A no-bump vendored edit refuses offline via a cheap pre-check; a non-clean bump
    (CONFIRMED drift / TRANSPORT exit 3 / any non-zero) also refuses (GOTCHAS #30,
    ADR 0287's fail-closed posture). The heal clone wires no core.hooksPath, so
    ADR 0287's pre-push drift gate never fires there — this rail is the only guard.
  • Tests: tests/rehearsal-heal-lib-test.sh gains V1–V4 (no-bump refuses /
    clean re-vendor passes / non-clean exit-3 bump refuses / ordinary heal
    untouched). Full suite green locally: OK: 38 cases, exit 0. bash -n clean
    on both files.

Tracks idss #2180 (standing-session forward-port of #2177; ADR 0180, ADR 0287).
dev-factory is LANDING=push, but this follow-up inherits landing-pr (ADR 0267)
from its app-report root — landing it as this reviewed PR for a human merge rather
than a direct push.

Forward-ports the #2177 `heal_rails` vendored-path rail from the idss-pin backport branch (`backport/idss-2177` @ `291c9bf`, off pin `4eae572b`) onto dev-factory `main`, so the fix survives the next pin advance. - **Commit:** `cherry-pick -x` of `291c9bf76e1cf08b79da6264fd02e1627d404788` (itself a `-x` of the discarded original `0daf0d1`); the message carries the full provenance chain. Single commit, no squash. - **Resolution:** applied **cleanly** onto `main` despite the heal rework since the pin — the `_heal_touches_product_surface` / `_heal_weakens_check` context anchors were byte-identical, so the new `_heal_touches_vendored_path` helper and its rail landed with no conflict. Resulting rail order: self-mod → **vendored-path** → assertion → product-surface → 3-file cap → line cap. - **What it does:** `heal_rails` now resets + refuses (`HEAL_RAIL_REASON` "vendored-path edit", not swarmable) any heal commit that touches a `FACTORY_MANIFEST` path, UNLESS it is a genuine re-vendor (`FACTORY_REF` bumped in the same commit **and** `check-harness-drift.sh` returns a clean exit 0). A no-bump vendored edit refuses offline via a cheap pre-check; a non-clean bump (CONFIRMED drift / TRANSPORT exit 3 / any non-zero) also refuses (GOTCHAS #30, ADR 0287's fail-closed posture). The heal clone wires no `core.hooksPath`, so ADR 0287's pre-push drift gate never fires there — this rail is the only guard. - **Tests:** `tests/rehearsal-heal-lib-test.sh` gains V1–V4 (no-bump refuses / clean re-vendor passes / non-clean exit-3 bump refuses / ordinary heal untouched). Full suite green locally: **OK: 38 cases**, exit 0. `bash -n` clean on both files. Tracks idss **#2180** (standing-session forward-port of #2177; ADR 0180, ADR 0287). dev-factory is `LANDING=push`, but this follow-up inherits `landing-pr` (ADR 0267) from its app-report root — landing it as this reviewed PR for a human merge rather than a direct push.
heal_rails: refuse a drifted factory-vendored edit (ADR 0180) — the heal clone wires no hooksPath so ADR 0287's pre-push drift gate never runs (idss #2177)
All checks were successful
ci / test (pull_request) Successful in 8m13s
ci / static (pull_request) Successful in 3m28s
f67abdba1e
A healer repair clone (heal.sh's HEAL_CLONE) does not wire
core.hooksPath .sandcastle/git-hooks, so ADR 0287's pre-push factory-drift
gate — the one that fails CLOSED on an unverified vendored edit — never fires
on the healer's push, and heal_rails had no FACTORY_MANIFEST rail. So a heal
could land a hand-edited vendored file straight onto main (the heal twin of the
worker-side #1963/#1964); idss #2177 witnessed it (baa7f598, reverted by the
re-land-owed heal run).

Add a vendored-path rail to heal_rails: a commit touching a FACTORY_MANIFEST
path (as .sandcastle/<p>) is reset + refused with HEAL_RAIL_REASON
"vendored-path edit" (not swarmable) UNLESS it is a genuine re-vendor —
.sandcastle/FACTORY_REF bumped in the same commit AND check-harness-drift.sh
returns a CLEAN verdict (exit 0). A bump whose drift check is non-clean
(CONFIRMED drift, a TRANSPORT exit 3, or any other non-zero) blocks too: a guard
that could not reach the code it guards is not a clean result (GOTCHAS #30, ADR
0287's posture). The common case — a vendored edit with no bump — refuses
offline via a cheap pre-check, so an ordinary heal pays nothing and never runs
the network drift check.

tests/rehearsal-heal-lib-test.sh gains V1-V4: a no-bump vendored edit refuses
(the pin #2177 asks for), a clean re-vendor passes, a non-clean (exit 3) bump
refuses, and an ordinary non-vendored heal is untouched.

(cherry picked from commit 0daf0d1e0e)
(cherry picked from commit 291c9bf76e)
All checks were successful
ci / test (pull_request) Successful in 8m13s
ci / static (pull_request) Successful in 3m28s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fp/idss-2180:fp/idss-2180
git switch fp/idss-2180

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff fp/idss-2180
git switch fp/idss-2180
git rebase main
git switch main
git merge --ff-only fp/idss-2180
git switch fp/idss-2180
git rebase main
git switch main
git merge --no-ff fp/idss-2180
git switch main
git merge --squash fp/idss-2180
git switch main
git merge --ff-only fp/idss-2180
git switch main
git merge fp/idss-2180
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory!343
No description provided.