Skip to main content

OWNER_ROLLUP Auto-Confirm — Deploy + Prod Proof

Feature: Auto-confirm OWNER_ROLLUP on save (run-scoped). Business becomes Ready for Ingest immediately after save with no extra confirmation step. Tenant: creative_benefit_strategies
Period: 2025-12-01

0. Pre-deploy (completed)

ItemValue
Branchfeat/owner-rollup-auto-confirm
Commit8bb30da
PR linkhttps://github.com/abundy1/payroll-pipeline-cbs/pull/new/feat/owner-rollup-auto-confirm
Deploy workflow.github/workflows/deploy_cloudrun.yml (triggers on push to main)
Next: Merge PR to main → deploy auto-triggers. Or manually trigger via Actions → Deploy Backend to Cloud Run (WIF) → Run workflow (commit_sha optional).

1. Deploy Proof

ItemValue
Workflow run ID21974556831
Job ID63483190259
Workflow run linkhttps://github.com/abundy1/payroll-pipeline-cbs/actions/runs/21974556831
Cloud Run servicepayroll-pipeline-cbs-api (payroll-bi-gauntlet, us-central1)
Cloud Run revision(from “Creating Revision” step; run gcloud run revisions list --service=payroll-pipeline-cbs-api --region=us-central1 --limit=1 to get latest)
GIT_COMMIT_SHAd2ced18 (full: d2ced1892a8d6e3e694d4e7886ff0f04978425da)
Validation date/time(when prod validation was performed)
Actions: Verify /api/health returns matching git_commit_sha. Note: This deploy used commit d2ced18. If the auto-confirm patch (84357df on feat/owner-rollup-auto-confirm) has not yet been merged to main, a separate deploy will run after merge with the new SHA.

2. Prod Validation — Save → Ready immediately

Prerequisite: Active run exists for tenant + period (batch_id present). Steps:
  1. Save OWNER_ROLLUP for a business (e.g. via Business Onboarding save API or wizard).
  2. Call readiness for that batch_id.
Expected:
  • Business Onboarding row becomes Ready immediately (no separate confirm step).
  • is_ready == True, reasons == [] for that business.
Capture:
  • business_id: ___________
  • batch_id: ___________
  • readiness response snippet: ___________

3. Idempotency Proof — No duplicate confirmations

Steps:
  1. Save same OWNER_ROLLUP payload again for the same business.
  2. Verify still Ready; no duplicate confirmation artifacts.
BQ proof (run in BigQuery):
-- Org-scoped confirmations (cbs-main)
SELECT tenant_id, owning_org_id, business_id, COUNT(*) AS cnt
FROM `payroll-bi-gauntlet.payroll_analytics.owner_rollup_confirmations_current`
WHERE tenant_id = 'creative_benefit_strategies' AND business_id = '<business_id>'
GROUP BY tenant_id, owning_org_id, business_id;
-- Expected: cnt == 1

-- Batch-scoped decisions (non-cbs-main)
SELECT tenant_id, batch_id, business_id, decision_type, COUNT(*) AS cnt
FROM `payroll-bi-gauntlet.payroll_analytics.ingestion_wizard_decisions`
WHERE tenant_id = 'creative_benefit_strategies'
  AND business_id = '<business_id>'
  AND decision_type = 'OWNER_ROLLUP_CONFIRMATION'
GROUP BY tenant_id, batch_id, business_id, decision_type;
-- Expected: cnt == 1
Capture: (paste query results confirming single row per business)

4. Stop Conditions (report back if any occur)

  • Row still shows Not Ready after save; readiness reason mentions confirmation
  • Save returns 409/500 unexpectedly
  • Duplicate confirmation rows after re-save
  • Deployed SHA doesn’t match expected commit

5. Completion Checklist

CriterionStatus
Deployed via GitHub Actions
OWNER_ROLLUP save → Ready immediately
Idempotent save; no duplicate confirmations
BQ proof captured