Skip to content

test(api): launch proof on a tenant's own dataset; activate provisioned datasets, scope job reads (#1013) - #1273

Merged
athvin merged 1 commit into
mainfrom
feat/1013-launch-proof
Nov 26, 2026
Merged

athvin merged 1 commit into
mainfrom
feat/1013-launch-proof

Conversation

@athvin

@athvin athvin commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Closes #1013

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

pg_launch_proof now runs the whole customer workflow on a dataset the tenant creates itself (validate → publish → idempotent JSON push, resumable upload, CSV import → duplicates/golden/lineage → golden + lineage exports agreeing with the live read → a failed run visible with error_class/error_detail → cross-dataset 404s). Two bugs it found are fixed. api-contract/references/launch-readiness.md records coverage, limits and what is owed before an external production key; the docs distinguish acceptance, completion and writeback.

Why

#1013's remaining acceptance: an executable non-Salesforce workflow on the public contract with failure-case coverage, and a recorded readiness checklist.

Proof

  • pg_launch_proof with DEDUPE_E2E_DUCKLAKE=1 against local Postgres: passes (143 s); it failed first on each bug below.
  • Full cargo test -p er-server against Postgres: 282 + 153 pass. make check: exit 0.

Risk & rollback

Job routes now 404 a job of another dataset in the same org — intended; org-level jobs are unaffected. git revert <merge-sha>.

Post-merge ledger

Closed by: agent · session Claude Code:24d16c2e-fec6-49d8-9797-060338df4848 on brians-MacBook-Pro · 2026-11-26T20:40:08Z

Specific to this change

  • any dataset created before this deploy is stuck provisioning: list them and activate (dev/prod) — blocked — needs the operator token or database access; the AWS SSO session on this machine expired (interactive aws sso login). Query: SELECT o.name, d.name FROM datasets d JOIN orgs o ON o.id=d.org_id WHERE d.state='provisioning' AND d.name<>'default'; fix: UPDATE datasets SET state='active' WHERE … once confirmed
  • usage policy and enforcement — deferred — E3 — API usage, entitlements and commercial metering #518 (the readiness record lists it as owed)
Context — plan, discoveries, measurements, files

Plan

Discoveries

  • Activate (the last task of provision and dataset_provision) moved default only; a dataset_provision job's own dataset never left provisioning. Reproduced by the proof's publish 409.
  • get_job/cancel_job/resume_job/list_job_tasks/clear_job_task resolved the dataset for a 404 but then looked the job up by org: the proof's default/jobs/{contacts job} returned 200. New dataset_job helper filters by dataset_id.
  • base_10 delivers 23 source records (9 + 7 + 7); the lineage export equals that, derived from the fixtures rather than a literal.

Measurements

Files

🤖 Generated with Claude Code

… activate provisioned datasets, scope job reads (#1013)

The executable launch proof now creates a dataset with the tenant's admin
key, validates and publishes its config, delivers by idempotent JSON push,
resumable upload and CSV import, reads duplicates, golden records and
lineage, exports golden + lineage and checks them against the live read,
and watches an unreadable delivery fail as a run with an error class.

Doing so found two bugs:
- Activate flipped only the org and its DEFAULT dataset, so every dataset
  created through POST …/datasets stayed `provisioning` forever and refused
  publish and every delivery. It now activates the job's own dataset.
- Job routes looked a job up by org alone, so …/datasets/a/jobs/{id}
  served dataset b's job (and its tasks, cancel, resume, clear). They now
  404 for another dataset's job; org-level jobs stay visible.

The api-contract skill records what the proof covers, the supported
limits, and what is owed before an external production key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

The marketing preview was removed because this PR is closed or merged.

@athvin
athvin merged commit 53bc8fb into main Nov 26, 2026
44 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 26, 2026 20:29 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — 03fe2f28 Deployed Nov 26, 2026 by athvin via remove closed PR previews #71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API launch proof: configure, ingest, dedupe and retrieve results without Salesforce

2 participants