← back to Tk11438 Postgres Migration

GRACIE-BATCH.md

39 lines

Status: APPLIED AND VERIFIED locally — source9661303. Do not repeat. Steve approved with private/nothing-online constraint; localhost bind added. Evidence verification/gracie-rollout/e2e-proof.json. No emails or publishing.

Historical approved proposal follows:
# TK-11438 — Gracie socket migration approval

Status at proposal time: PENDING. Now applied; see completion above.
Owner: codex-run-11438. Scope: local Mac gracie-internal only.

Approve this exact next batch:
1. Apply the two reviewed patches to gracie-internal/server.js and
   gracie-internal/lib/vendor-requests.js. Server Mac fallback adds host=/tmp;
   shared pool honors PGHOST, defaults to /tmp on Darwin, preserves Linux TCP.
2. Add host=/tmp to the existing Gracie PG URI in its exact effective and saved
   PM2 fields, preserving database, role and every unrelated field. No global
   PM2 save or fleet restart. Verify that no explicit PGHOST overrides the socket.
3. Restart Gracie once. Existing startup CREATE TABLE/INDEX IF NOT EXISTS is
   included in this approval; no catalog DML, no POST /api/request, no email.
4. Verify stable process/auth, unchanged catalog count, socket identity, no
   Gracie TCP5432, saved/effective agreement and read-only request listing after
   successful startup. Missing socket must fail; no TCP fallback is added.
5. Before mutation refresh hashes/runtime baseline and privately back up both
   files and only Gracie PM2 configuration. Preserve original scopes for rollback;
   on regression restore original files and Gracie fields, restart Gracie only,
   and recheck original behavior. Commit only the two successful source changes.

Evidence: ~/Projects/tk11438-postgres-migration/verification/fleet-classification/
Review gracie-preflight.json, driver-proof.json, patches/gracie-server.patch,
patches/gracie-internal.patch, and patch-manifest.json for exact hashes.
Baseline: Gracie PID8186; health/auth6 checks PASS; both transport identities
match as dw_admin/dw_unified. JSONL catalog exists; request pool still uses PG.
Other 15 shared-module patches, Norma, ImportNewSkufromURL, schedulers and TCP
shutdown are outside this approval. All email sends remain excluded.

Gate basis: Steve's original ticket instruction gates customer-facing and
canonical database mutations. TK11478 authorized the previously described Ken
batch, already completed; this new Gracie batch requires its own approval.
Technical preconditions remain mandatory even after approval; if source/runtime
scope drifts, stop and report rather than overwrite another session's work.