# E2E remediation recovery

Status: COMPLETE — LANDED-CANDIDATE VERIFIED ON CURRENT MASTER

## Purpose

Recover and finish the stale `2026-08-15-e2e-failure-remediation.md` work now that direct SSH to `debian1`, `debian2`, and `debian3` is healthy again. Do not re-audit the whole plugin or duplicate the active Worker E2E lane.

Canonical planning baseline: `origin/master` @ `28e66fe65794cacf7208c45a7c7ef6dca57e7ece`.

## Initial infrastructure truth — 2026-08-19

The old plan's statement “outbound SSH is killed from the owning session” is stale:

- `ssh -o BatchMode=yes debian1 'printf ok'` -> `ok`
- `ssh -o BatchMode=yes debian2 'printf ok'` -> `ok`
- `ssh -o BatchMode=yes debian3 'printf ok'` -> `ok`

However the gate dispatcher is not fully healthy yet:

- `local-gate --remote-only -- /bin/true` currently refuses with `reason=unavailable`.
- `local-gate --remote-doctor` proves SSH/tool/runtime parity on all three hosts but reports the fleet runtime source unusable because `/home/user/.local/share/overdeck/deploy` has an unrelated/owner WIP modification to `modules/workstation/claude/bin/pnpm-entrypoint`.
- That dirty file currently bypasses `cpu-guard.sh`; NEVER discard or overwrite it. Preserve it before any infrastructure repair.
- Recent `~/.claude/local-gate.log` also proves ordinary remote jobs have successfully run on debian1/debian2 during the same morning, so the problem is dispatcher/runtime-source state rather than dead hosts.

## Completion truth — 2026-08-20

The recovery lane is complete on `origin/master` @ `0fc9a76297eb9bae2d878affd1bbf5ff0d33e536` plus this lane's commits `bf5bddf33`, `9d74fa32d`, and `ec12a885f` (merged into the recovery branch by `3b31a1b00`). The old SSH/dispatcher blocker is no longer current.

Final evidence:

- sanctioned execution: `e2e-remote` admitted and ran on `debian2`; workstation/fleet pnpm parity is `11.5.2`; Playwright `1.62.0` Chromium/Firefox binaries were provisioned on the buildbox rather than the workstation;
- owned browser remediation: `settings.spec.js`, `translation-settings.spec.js`, `journeys/UJ-006-save-settings.spec.js`, `journeys/UJ-007-reset-settings.spec.js`, and `admin-snappy-visual-contract.spec.js` passed as one Chromium+Firefox matrix: **58/58 passed**;
- PG-27 WordPress integration gate: `AutoPublishStatusTest.php` passed all 4 status/capability scenarios, `SettingsIdempotencyTest.php` passed all assertions, and `ContentManagerTest.php` passed **10/10 tests, 95 assertions** through `tests/run-wordpress-integration-tests.sh` on the live remote WordPress fixture;
- `BlockSegmentCodecTest.php` is self-contained under the repository standalone runner and passed **23/23 tests, 66 assertions** with the exact `--no-configuration` execution mode;
- `tests/known-failing.txt` contains **zero active entries**. The three real WordPress integration tests are no longer accepted as standalone skips; `tools/factory-gate.sh` routes them through the dedicated WordPress-capable gate;
- broad zero-baseline probing exposed unrelated current-master translation/Site-Content test debt outside this lane. Those tests were not weakened or claimed as PG-27 evidence;
- Worker-E2E-owned runtime/spec files were not modified by this lane.

The only remaining work after this receipt is repository-controller landing and cleanup of the temporary recovery worktrees.

## Ownership boundary

This lane owns only the stale settings/account E2E remediation set:

- `admin/src/components/FormField.js`
- `admin/src/pages/settings.js`
- `admin/src/pages/account.js`
- `tests/e2e/settings.spec.js`
- `tests/e2e/translation-settings.spec.js`
- `tests/e2e/journeys/UJ-006-save-settings.spec.js`
- `tests/e2e/journeys/UJ-007-reset-settings.spec.js`
- matching UJ-006/UJ-007 docs
- deletion of `tests/e2e/ui-parity-comments-settings.spec.js`
- only directly-required verification documentation

Reference branches, not merge targets:

- `wt/ipz-settings-validation-fix`
- `wt/ipz-account-skeleton`
- `wt/ipz-test-journeys`
- `wt/ipz-test-remove-parity`
- `wt/ipz-test-translation-settings`
- `wt/ipz-test-settings-tabs`

Each is ~154 commits behind current master. Harvest intent/tests; reimplement or selectively port onto fresh current master.

### Explicitly forbidden overlap

The active `wt/plugin-worker-e2e` lane currently owns:

- `tests/e2e/remote-stack.sh`
- `tests/e2e/real-translate.spec.js`
- `tests/e2e/connect-credential-fixture.spec.js`
- its generated `admin/dist` evidence

Do NOT edit those files. Do not take ownership of Connect credential provisioning, real Worker translation, async lifecycle, or Worker failure-path E2E.

Do not implement page fidelity, manual-translation protection, ACF/Yoast reconciliation, language-root switching, or Site Content.

## Tasks

### ER-01 — Recover sanctioned E2E execution

1. Work from a fresh worktree based on current `origin/master`.
2. Run `local-gate --remote-doctor` and retain the current evidence.
3. Determine the smallest safe way to restore `e2e-remote` dispatch without deleting another session's dirty `pnpm-entrypoint` work.
4. Prefer fixing the canonical runtime-source/dispatcher path rather than bypassing repository safety controls.
5. If infrastructure source must change, preserve the dirty state in Git/WIP first and make the infrastructure fix in its proper source repo, not by silently editing the deployed clone.
6. Prove `e2e-remote` can execute a harmless/list-only job through a sanctioned host before product verification.

Exit: sanctioned remote E2E can run; direct raw SSH is not used as a substitute for browser acceptance.

### ER-02 — Reconcile real bug 1: settings validation

Recover the intended behavior from `wt/ipz-settings-validation-fix` onto current master:

- invalid values must not be persisted;
- rejected controls restore the last accepted value;
- numeric parsing must not silently truncate invalid decimals;
- FormField ownership must not bypass the caller's validation path.

First confirm current master has not already solved the behavior semantically. Add/retain correctness tests, not element-existence tests.

### ER-03 — Reconcile real bug 2: account loading skeleton

Recover the account loading-state fix from `wt/ipz-account-skeleton` if current master still renders the prohibited spinner. Preserve the current design-system/lifecycle architecture.

### ER-04 — Reconcile stale settings/journey tests

From the old reference branches:

- replace removed Translation-tab/element-id assertions with behavior/correctness tests;
- remove phantom `timeout` assertions;
- keep real `batch_size` boundary coverage;
- make `updated_fields` order-independent where order is not contractual;
- fix UJ-007 navigation/reset semantics;
- delete the cross-plugin Comments settings parity test;
- complete the settings-tab count/Exceptions correction.

Do not weaken a current product regression to make a stale test green.

### ER-05 — Browser verification

Run the owned focused specs in Chromium and Firefox through `e2e-remote`. Then run the broad suite required by the remediation plan, excluding only tests explicitly owned by the concurrent Worker E2E lane if simultaneous execution would collide on shared fixtures.

Record exact host/browser/spec/result receipts.

### ER-06 — Known-failing cleanup / PG-27

Re-evaluate `tests/known-failing.txt` on current master. Remove stale entries only when the underlying test actually passes. Move integration tests to the correct sanctioned WordPress-capable execution path rather than accepting permanent skips.

This lane owns PG-27 unless another already-running agent has a newer current-master commit for it. Detect that before editing.

### ER-07 — Land and update truth

- run applicable focused/full gates;
- land through repository controller conventions;
- update the old remediation plan and `docs/plans/INDEX.md` with real current receipts;
- update PG-27 in `GOLIVE.md` only if its acceptance is actually proven;
- do not modify final-RC criteria owned by the certification lane.

## Definition of done

The old SSH blocker is no longer recorded as current; settings/account product bugs are fixed or proven already fixed; stale tests are correctness-oriented and green in Chromium+Firefox; the cross-plugin test is gone; PG-27 has truthful current evidence; no Worker-E2E-owned file was changed.
