Skip to main content

Deployment Proof Steps - Readiness Org Header Fix

Date

2026-02-07

Objective

Verify that /api/v1/intake/* endpoints (specifically readiness) include x-org-id header after deployment, and that readiness correctly reflects saved business configurations.

Prerequisites

  • Frontend deployed to Vercel (production URL: https://payroll-pipeline-cbs.vercel.app)
  • User logged in with org context (cbs-main)
  • Test business ID: a7ac092572c6fa5c
  • Test period: 2025-12-01

Verification Steps

Step 1: Open Browser DevTools

  1. Navigate to: https://payroll-pipeline-cbs.vercel.app/ingestion
  2. Open Chrome DevTools (F12)
  3. Go to Network tab
  4. Clear network log (trash icon)
  5. Filter by: readiness or save

Step 2: Navigate to Preflight Step

  1. Set period to: 2025-12-01
  2. Click through wizard steps until you reach Preflight step
  3. Note the batch_id from the URL or network requests

Step 3: Save Business Configuration

  1. Find business a7ac092572c6fa5c in the preflight list
  2. Click Configure (or equivalent button)
  3. Set configuration:
    • Mode: AGENT_PEPM
    • PEPM Rate: 12.00
    • Effective Start Date: 2025-12-01
  4. Click Save

Step 4: Verify Save Request Headers

In Network tab, find the PUT request to:
PUT /api/v1/admin/onboarding/businesses/a7ac092572c6fa5c/save
Required assertions:
  • ✅ Status: 200 OK
  • ✅ Request Headers include: x-org-id: cbs-main
  • ✅ Response includes assignment_ids and pepm_assignment_ids
Screenshot: Capture request headers showing x-org-id: cbs-main

Step 5: Verify Readiness Request Headers

In Network tab, find the GET request(s) to:
GET /api/v1/intake/ingestion-wizard/readiness?batch_id=...&period_label=2025-12-01
Required assertions:
  • ✅ Status: 200 OK
  • ✅ Request Headers include: x-org-id: cbs-main ⚠️ CRITICAL - This was missing before fix
  • ✅ Response includes readiness object with business IDs
Screenshot: Capture request headers showing x-org-id: cbs-main on readiness endpoint

Step 6: Verify Readiness Response

Inspect the readiness response JSON: Required assertions:
  • ✅ Business a7ac092572c6fa5c exists in readiness object
  • readiness[a7ac092572c6fa5c].is_ready === true ⚠️ CRITICAL - Was false before fix
  • readiness[a7ac092572c6fa5c].reasons does NOT include “Business not onboarded”
  • ✅ Summary shows ready_count > 0 (not 0/113)
Screenshot: Capture response JSON showing is_ready: true for the saved business

Step 7: Verify UI State

  1. Check the preflight UI:
    • ✅ Readiness count updates (e.g., 1/113 ready instead of 0/113)
    • ✅ Business a7ac092572c6fa5c shows as “Ready” or green indicator
  2. Close and reopen the drawer for the same business:
    • ✅ Saved PEPM rate (12.00) is visible
    • ✅ Configuration persists
Screenshot: Capture UI showing readiness count > 0 and business marked as ready

Step 8: Hard Refresh Test

  1. Hard refresh the page (Ctrl+Shift+R or Cmd+Shift+R)
  2. Navigate back to Preflight step
  3. Open drawer for business a7ac092572c6fa5c
Required assertions:
  • ✅ Configuration still persists (PEPM rate 12.00 visible)
  • ✅ Readiness still shows is_ready: true

Expected Network Flow

1. PUT /api/v1/admin/onboarding/businesses/{id}/save
   Headers: x-org-id: cbs-main ✅
   Response: 200 OK

2. GET /api/v1/intake/ingestion-wizard/readiness?batch_id=...&period_label=2025-12-01
   Headers: x-org-id: cbs-main ✅ (NEW - was missing before)
   Response: 200 OK
   Body: {
     readiness: {
       "a7ac092572c6fa5c": {
         is_ready: true, ✅ (was false before)
         reasons: [] ✅ (was ["Business not onboarded"] before)
       }
     },
     ready_count: 1 ✅ (was 0 before)
   }

Failure Indicators

If any of these occur, the fix did not work:
  • ❌ Readiness GET request does NOT include x-org-id header
  • ❌ Readiness response shows is_ready: false for saved business
  • ❌ Readiness response shows reasons: ["Business not onboarded"] for saved business
  • ❌ Readiness count remains 0/113 after save
  • ❌ UI does not update to show business as ready

Success Criteria

All assertions pass → Fix is working correctly

Post-Verification

After successful verification:
  1. Update docs/READINESS_ORG_HEADER_FIX_SUMMARY.md:
    • Change status to: ✅ VERIFIED IN PRODUCTION
    • Add verification date and tester name
    • Attach screenshots
  2. Commit verification evidence:
    git add docs/DEPLOYMENT_PROOF_READINESS_ORG_HEADER.md
    git commit -m "docs: add deployment proof for readiness org header fix"
    

Rollback Plan

If verification fails:
  1. Check Vercel deployment logs for build errors
  2. Verify frontend SHA matches expected commit
  3. Check browser console for JavaScript errors
  4. Verify x-org-id header is being injected by checking apiClient.ts code
  5. If needed, rollback to previous deployment