← back to Nationalrealestate

verification/e2e-proof.json

37 lines

{
  "ticket": "TK-10155-listing-lifecycle-tracking-withdrawal-sn",
  "intent": "Activate listing lifecycle and withdrawal snapshots on the Kamatera production USRE database and restore the public lifecycle APIs.",
  "risk_tier": "R4",
  "environment": "production: usrealestate.agentabrams.com; Kamatera app /root/public-projects/nationalrealestate",
  "build_identity": "local HEAD f8df3cd; production package nationalrealestate@0.18.0",
  "timestamp": "2026-08-31T18:29:00Z",
  "approval": "Steve explicitly resumed .claude/yolo-queue/pending-approval/TK-10155-usre-lifecycle-prod-activation.md; GATE 1 only.",
  "baseline": {
    "authenticated_listings": "HTTP 500",
    "authenticated_withdrawn": "HTTP 500",
    "cause": "Production lifecycle schema incomplete; migration 023 absent from production checkout."
  },
  "actions": [
    "Discovered PM2 exec cwd as /root/public-projects/nationalrealestate.",
    "Transferred only db/migrations/023_lifecycle_fk_on_delete.sql; SHA-256 5c4be7b0083fb07bfdeb136b7c73ddafc1ad6d1e46f6d795bcb2e091fa76b4e0 matched production.",
    "Ran npm run migrate; 014-016 were already ledgered and 023 applied successfully.",
    "Ran npm run lifecycle:backfill; production retained 72 events and 72 snapshots with zero duplicate inserts.",
    "Repeated migrate and backfill to prove idempotency; every migration skipped and inserts remained zero."
  ],
  "assertions": [
    {"boundary": "public API authenticated listings", "result": "PASS", "evidence": "GET /api/listings?limit=1 returned HTTP 200 with count=1 and a lifecycle-enriched listing."},
    {"boundary": "public API authenticated withdrawn", "result": "PASS", "evidence": "GET /api/withdrawn returned HTTP 200 with {count:0,rows:[]}."},
    {"boundary": "authentication negative path", "result": "PASS", "evidence": "Both endpoints returned HTTP 401 without Basic Auth."},
    {"boundary": "database persistence", "result": "PASS", "evidence": "Direct production query returned events=72 and snapshots=72."},
    {"boundary": "migration ledger", "result": "PASS", "evidence": "023_lifecycle_fk_on_delete.sql appears exactly once in schema_migrations."},
    {"boundary": "delete durability constraints", "result": "PASS", "evidence": "Both lifecycle foreign keys have pg_constraint.confdeltype='n' (ON DELETE SET NULL)."},
    {"boundary": "idempotent retry", "result": "PASS", "evidence": "Second migrate skipped all files; second backfill inserted zero events and zero snapshots."}
  ],
  "side_effects": {
    "retained": "Production lifecycle schema, migration ledger entry, and 72 baseline event/snapshot records.",
    "not_performed": "No application deploy, PM2 restart, cron/launchd change, DNS change, remote git push, spend, or send-to-list."
  },
  "rollback": "Approval memo documents dropping the additive lifecycle view/tables and restoring the two foreign keys to NO ACTION. Rollback was not needed.",
  "verdict": "PASS"
}