P2: reconcile diverged production→main (prepare REVIEWED PR only — human merges; do NOT deploy) #1

Closed
opened 2026-07-10 10:31:34 +00:00 by kavi · 0 comments
Owner

Crown-jewel deploy engine. Handoff: ~/audits/HANDOFF-kua-security-fixes-20260710.md; report: ~/audits/kua-deploy-security-audit-20260710.md. SOL-planned, Terra-reviewed.

Context: production @ ed47680 = HARDENED, deployed. main @ d550824 = security-REGRESSED (it reintroduces the removed registry bind-mount + loses hardened behavior). Divergence: main ahead 2, production ahead 3. main's functional commit 6a583a8 is already represented in production. The repo was archived while main was left regressed — until this lands, main must NEVER be deployed. (Just unarchived to do this work; do NOT re-archive after — see task 5.)

Deliverable: ONE reviewed PR into main. Do NOT merge, push to main/production, deploy, or roll out — a human merges + a human deploys.

Procedure (SOL + Terra corrected — follow precisely)

  1. Merge origin/production into a branch off main with a merge commit.
  2. Resolve server.js and docker-compose.yml conflicts to the PRODUCTION versions (production wins — main reintroduces the registry bind-mount, which is wrong).
  3. Verify (Terra's exact method): the non-test tree must equal ed47680. Run git diff --exit-code ed47680 -- . ':(exclude)test/*' (or list the app files explicitly: server.js, docker-compose.yml, package*.json, source) — it must be empty. Do NOT claim an "identical git tree" while the test files differ. Paste the diff proof in the PR.
  4. The ONLY allowed delta is REWRITTEN tests: test/registry-loader.test.js assumes the removed bind-mounted /app/deploy-registry.json (rewrite for the engine-owned registry at /app/data/registry.json); test/sha-comparison.test.js duplicates prod logic instead of importing it (rewrite to import). Do NOT carry them unchanged.
  5. In the PR body, note that main must be BRANCH-PROTECTED before it's deployable again (operator action) — this + the reconcile is what prevents a regressed deploy recurring. Recommend protect-not-re-archive.

Guardrails

  • NEVER force-push main/production; NEVER deploy/rollout/touch sol-prod (it deploys itself — extremely dangerous).
  • If the conflict is anything beyond server.js + docker-compose.yml, or the non-test tree cannot be made == ed47680, STOP and report — do not guess on the control plane.
  • Fetch --all; verify against ed47680 out-of-band. Conventional commits; Closes #<this>; forgejo-pr into main.
Crown-jewel deploy engine. Handoff: `~/audits/HANDOFF-kua-security-fixes-20260710.md`; report: `~/audits/kua-deploy-security-audit-20260710.md`. SOL-planned, Terra-reviewed. **Context:** `production` @ `ed47680` = HARDENED, deployed. `main` @ `d550824` = security-REGRESSED (it reintroduces the removed registry bind-mount + loses hardened behavior). Divergence: main ahead 2, production ahead 3. main's functional commit `6a583a8` is already represented in production. **The repo was archived while main was left regressed — until this lands, main must NEVER be deployed.** (Just unarchived to do this work; do NOT re-archive after — see task 5.) **Deliverable: ONE reviewed PR into `main`. Do NOT merge, push to main/production, deploy, or roll out — a human merges + a human deploys.** ## Procedure (SOL + Terra corrected — follow precisely) 1. Merge `origin/production` into a branch off `main` with a **merge commit**. 2. Resolve `server.js` **and** `docker-compose.yml` conflicts to the **PRODUCTION** versions (production wins — main reintroduces the registry bind-mount, which is wrong). 3. **Verify (Terra's exact method):** the non-test tree must equal `ed47680`. Run `git diff --exit-code ed47680 -- . ':(exclude)test/*'` (or list the app files explicitly: server.js, docker-compose.yml, package*.json, source) — it must be **empty**. Do NOT claim an "identical git tree" while the test files differ. Paste the diff proof in the PR. 4. The ONLY allowed delta is **REWRITTEN** tests: `test/registry-loader.test.js` assumes the removed bind-mounted `/app/deploy-registry.json` (rewrite for the engine-owned registry at `/app/data/registry.json`); `test/sha-comparison.test.js` duplicates prod logic instead of importing it (rewrite to import). Do NOT carry them unchanged. 5. In the PR body, note that **`main` must be BRANCH-PROTECTED** before it's deployable again (operator action) — this + the reconcile is what prevents a regressed deploy recurring. Recommend protect-not-re-archive. ## Guardrails - **NEVER** force-push main/production; **NEVER** deploy/rollout/touch sol-prod (it deploys itself — extremely dangerous). - If the conflict is anything beyond server.js + docker-compose.yml, or the non-test tree cannot be made == `ed47680`, **STOP and report** — do not guess on the control plane. - Fetch `--all`; verify against `ed47680` out-of-band. Conventional commits; `Closes #<this>`; `forgejo-pr` into `main`.
kavi closed this issue 2026-07-12 07:20:37 +00:00
Sign in to join this conversation.
No labels
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
kavi/kua-deploy#1
No description provided.