Forward-port the #2052 policy-gate transport-fault fix onto dev-factory main #2053

Closed
opened 2026-10-20 22:41:37 +00:00 by matou-build-agent · 1 comment

Forward-port the #2052 policy-lib.sh / preflight-lib.sh fix (a dead Forgejo read in the #12 policy gate reported as invalid-policy) from the dev-factory cheap-backport branch onto dev-factory main.

What landed where

#2052 landed the fix as the #2048 route — a dev-factory cheap-backport branch authored off the idss pin, re-vendored into idss, with the forward-port to main owed:

  • dev-factory branch backport/idss-2052 @ d5be6884b60fd3fe36dd0dc12f72061a073c66e8, authored off the pin 7d40af3.
  • idss re-vendored: FACTORY_REF 7d40af3 → d5be688 (idss main commit 3b30cda3).
  • The diff touches the dev-factory root canon policy-lib.sh, preflight-lib.sh, tests/policy-lib-test.sh, tests/preflight-lib-test.sh (NOT dev-factory's own .sandcastle/ self-vendored copies).

The owed work

Cherry-pick / re-apply d5be688's diff onto dev-factory main (now LANDING=push since df #276, 2026-10-17 — no longer the LANDING=pr that routed sibling #2049 to a human) so a future main-HEAD adoption carries the fix instead of silently dropping it.

  • dev-factory main is ~457 commits ahead of 7d40af3; its root policy-lib.sh / preflight-lib.sh may have diverged, so the forward-port may conflict — run dev-factory's own tests/policy-lib-test.sh, tests/preflight-lib-test.sh, tests/run-swarm-stages-test.sh and onboarding/tests/onboard-lib-test.sh after applying (all four were green on the backport branch).
  • Do NOT bump idss FACTORY_REF to a df-main HEAD as part of this — that drags 457 commits of unrelated factory churn into idss and is out of scope. This ticket closes when the fix is on df main; idss adopts df-main-HEAD on its own cadence (the drift NOTE's "behind main" advisory).

Proof it's the same defect class as #2049

#2049 is the still-open forward-port of the sibling #2048 forgejo-lib/heal fix. This is the policy-gate twin, a disjoint file set, so the two forward-ports do not conflict each other.

Filed as a follow-up of #2052 under ADR 0174. Advances #2052's OWED tail.

Forward-port the #2052 `policy-lib.sh` / `preflight-lib.sh` fix (a dead Forgejo read in the #12 policy gate reported as `invalid-policy`) from the dev-factory cheap-backport branch onto dev-factory `main`. ## What landed where #2052 landed the fix as the **#2048 route** — a dev-factory cheap-backport branch authored off the idss pin, re-vendored into idss, with the forward-port to `main` owed: - dev-factory branch `backport/idss-2052` @ `d5be6884b60fd3fe36dd0dc12f72061a073c66e8`, authored off the pin `7d40af3`. - idss re-vendored: `FACTORY_REF 7d40af3 → d5be688` (idss `main` commit `3b30cda3`). - The diff touches the dev-factory **root** canon `policy-lib.sh`, `preflight-lib.sh`, `tests/policy-lib-test.sh`, `tests/preflight-lib-test.sh` (NOT dev-factory's own `.sandcastle/` self-vendored copies). ## The owed work Cherry-pick / re-apply `d5be688`'s diff onto dev-factory `main` (now **LANDING=push** since df #276, 2026-10-17 — no longer the LANDING=pr that routed sibling #2049 to a human) so a future main-HEAD adoption carries the fix instead of silently dropping it. - dev-factory `main` is ~457 commits ahead of `7d40af3`; its root `policy-lib.sh` / `preflight-lib.sh` may have diverged, so the forward-port **may conflict** — run dev-factory's own `tests/policy-lib-test.sh`, `tests/preflight-lib-test.sh`, `tests/run-swarm-stages-test.sh` and `onboarding/tests/onboard-lib-test.sh` after applying (all four were green on the backport branch). - Do NOT bump idss `FACTORY_REF` to a df-main HEAD as part of this — that drags 457 commits of unrelated factory churn into idss and is out of scope. This ticket closes when the fix is on df `main`; idss adopts df-main-HEAD on its own cadence (the drift NOTE's "behind main" advisory). ## Proof it's the same defect class as #2049 #2049 is the still-open forward-port of the sibling #2048 forgejo-lib/heal fix. This is the policy-gate twin, a disjoint file set, so the two forward-ports do not conflict each other. Filed as a follow-up of #2052 under ADR 0174. Advances #2052's OWED tail.
Author
Member

Close report — forward-port landed on dev-factory main (ADR 0174, two-way door)

The #2052 policy-gate transport-fault fix is now on dev-factory main, so a future main-HEAD adoption carries it instead of silently dropping it.

What landed

  • cherry-pick -x d5be688 onto dev-factory main → b786895 (5b614ec..b786895, pushed; LANDING=push).
  • Net diff = exactly the backport's four root-canon files, byte-equivalent intent: policy-lib.sh (+37/-8… the rc-3 TRANSPORT split), preflight-lib.sh (+32/-6, verdict_error on every refusal + policy-tracker-unreachable), tests/policy-lib-test.sh (+30), tests/preflight-lib-test.sh (+31). 115 insertions / 15 deletions.
  • No idss change: FACTORY_REF is not bumped (out of scope — that would drag df-main churn into idss; idss adopts df-main-HEAD on its own cadence).

The merge

  • main was 69 commits ahead of the pin 7d40af3 (the ticket's ~457 estimate was stale — immaterial). preflight-lib.sh and tests/preflight-lib-test.sh were byte-unchanged from the pin (clean apply); policy-lib.sh (+111/-34) and tests/policy-lib-test.sh (+39/-2) had diverged but the 3-way auto-merge produced a coherent result — no conflicts, verified by eye and by test.

Proof (dev-factory's own suites, run on the rebased tip)

  • tests/policy-lib-test.sh → 74 checks passed (incl. the TRANSPORT rc-3 path: shims a 5xx on the labels GET, asserts rc 3, asserts stderr names TRANSPORT and never "not minted").
  • tests/preflight-lib-test.sh → 10 groups passed.
  • tests/run-swarm-stages-test.sh → 12 groups passed.
  • onboarding/tests/onboard-lib-test.sh → 274 passed, 0 failed.

Honest residue (not a defect, no human door)

  • main's forgejo-lib.sh is still the pre-#2048 forgejo_get (single-attempt, no retry loop), so the FORGEJO_GET_RETRIES/FORGEJO_GET_BACKOFF that policy_validate now sets are harmless no-ops on main until #2049 lands the sibling forgejo-lib retry forward-port. The actual #2052 defect fix — the rc 2 (invalid-policy) vs rc 3 (TRANSPORT / policy-tracker-unreachable) distinction and the non-empty verdict_error — is fully effective now, independent of the retry loop. When #2049 lands, the extended ride-out budget activates automatically. The two forward-ports touch disjoint files and do not conflict, as the ticket states.

Landing authority: dev-factory main is LANDING=push per df #276 (a3c9f50, "retire the #220 interim rail: dev-factory LANDING back to push", 2026-10-17) — no human merge gate, unlike the LANDING=pr that routed sibling #2049.

Ruled by agent under ADR 0174 — veto anytime. Advances #2052's OWED tail.

**Close report — forward-port landed on dev-factory `main` (ADR 0174, two-way door)** The #2052 policy-gate transport-fault fix is now on dev-factory `main`, so a future main-HEAD adoption carries it instead of silently dropping it. **What landed** - `cherry-pick -x d5be688` onto dev-factory `main` → **`b786895`** (`5b614ec..b786895`, pushed; LANDING=push). - Net diff = exactly the backport's four root-canon files, byte-equivalent intent: `policy-lib.sh` (+37/-8… the rc-3 TRANSPORT split), `preflight-lib.sh` (+32/-6, `verdict_error` on every refusal + `policy-tracker-unreachable`), `tests/policy-lib-test.sh` (+30), `tests/preflight-lib-test.sh` (+31). 115 insertions / 15 deletions. - No idss change: `FACTORY_REF` is **not** bumped (out of scope — that would drag df-main churn into idss; idss adopts df-main-HEAD on its own cadence). **The merge** - `main` was **69** commits ahead of the pin `7d40af3` (the ticket's ~457 estimate was stale — immaterial). `preflight-lib.sh` and `tests/preflight-lib-test.sh` were byte-unchanged from the pin (clean apply); `policy-lib.sh` (+111/-34) and `tests/policy-lib-test.sh` (+39/-2) had diverged but the 3-way auto-merge produced a coherent result — **no conflicts**, verified by eye and by test. **Proof (dev-factory's own suites, run on the rebased tip)** - `tests/policy-lib-test.sh` → 74 checks passed (incl. the TRANSPORT rc-3 path: shims a 5xx on the labels GET, asserts rc 3, asserts stderr names TRANSPORT and never "not minted"). - `tests/preflight-lib-test.sh` → 10 groups passed. - `tests/run-swarm-stages-test.sh` → 12 groups passed. - `onboarding/tests/onboard-lib-test.sh` → 274 passed, 0 failed. **Honest residue (not a defect, no human door)** - main's `forgejo-lib.sh` is still the **pre-#2048** `forgejo_get` (single-attempt, no retry loop), so the `FORGEJO_GET_RETRIES`/`FORGEJO_GET_BACKOFF` that `policy_validate` now sets are **harmless no-ops on main until #2049 lands the sibling forgejo-lib retry forward-port**. The actual #2052 defect fix — the rc 2 (invalid-policy) vs rc 3 (TRANSPORT / `policy-tracker-unreachable`) distinction and the non-empty `verdict_error` — is **fully effective now**, independent of the retry loop. When #2049 lands, the extended ride-out budget activates automatically. The two forward-ports touch disjoint files and do not conflict, as the ticket states. **Landing authority**: dev-factory `main` is LANDING=push per df #276 (`a3c9f50`, "retire the #220 interim rail: dev-factory LANDING back to push", 2026-10-17) — no human merge gate, unlike the LANDING=pr that routed sibling #2049. Ruled by agent under ADR 0174 — veto anytime. Advances #2052's OWED tail.
Sign in to join this conversation.
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/idss#2053
No description provided.