Skip to content

test(api): launch proof — a tenant resolves its data with its own key alone (#1187) - #1185

Merged
athvin merged 2 commits into
mainfrom
issue/1013-launch-proof
Nov 23, 2026
Merged

athvin merged 2 commits into
mainfrom
issue/1013-launch-proof

Conversation

@athvin

@athvin athvin commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Closes #1187

🚧 Claimed by an agent session — 2026-11-23T18:26:09Z, session Claude Code:d1e3b2dc-3174-4091-9c30-c08fc4820306 on Mac.
The claim is this open draft PR: closing it releases the claim.

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.rs is the first executable slice of #1013. It drives a new tenant through tenant-public HTTP and the real executor (one pod per task). After the single onboarding call (POST /v1/orgs, which returns the one-time admin key), every request uses that key: no SQL, operator token, drop directory or CLI.

Step Proven
Configure Create and publish a config version; the rebuild succeeds.
Ingest A push with an undeclared column is refused 422. JSON (crm) and CSV uploads (billing, webforms) are accepted, and every delivery job succeeds.
Receipts /imports lists all three sources, and no job is left queued.
Results /duplicates returns groups of at least 2. limit=1 cursor paging visits each group exactly once. /golden-records (Arrow) holds base_10's 10 entities. /golden-records/{id} lineage contains the members.
Redelivery Identical CSV: accepted, and still 10 entities.
Tenant isolation Another org's key gets 404.

Why

#1187, part 1 of #1013. It also settled the open question of whether an API-only tenant can bootstrap at all (publish before any ingest). It can: the rebuild and every later delivery succeed.

Proof

  • pg_launch_proof: 1 passed, in 71 s against real Postgres + DuckLake.
  • make check: exit 0, 1134 passed / 0 failed.

Found: #1186. The first publish's train fails on a never-ingested dataset (int_std_records missing). It is asserted explicitly, so the fix must change a visible line.

Risk & rollback

  • One new test; no product code changes.
  • Rollback: git revert <merge-sha>.

Post-merge ledger

Closed by: agent · session Claude Code:d1e3b2dc-3174-4091-9c30-c08fc4820306 on Mac · 2026-11-23T19:20:09Z

  • main is green with this change on it — the merge SHA, and the run
    that proves it. A later head SHA with this commit as an ancestor counts;
    a cancelled run with zero jobs does not: ad38be23. rust 45242431663, frontend 45242431639, infra 45242431720 and devcontainer 45242431590 are all success.
  • images built, or correctly never ran because nothing that goes into
    an image changed: images 45242431747 success.
  • deploy converged — proved by a line the running process emitted, not
    by the image digest and not by the workflow conclusion: verified 2026-11-23 after SSO refresh: dev ci/web-api-green-55b8644b5d-kh675 and prod app/web-api-blue-84f48dd5cb-g7jv9 both run er-api@sha256:b6ed9097…, ECR-tagged 802127db, and their er-server container emitted "message":"er-server listening","addr":"0.0.0.0:8000" (dev 21:50:56Z, prod 19:36:00Z). The dispatcher in both runs the same digest. 802127db contains this merge (git merge-base --is-ancestor). Earlier evidence: deploy 45242793160 carries DEPLOY_SHA ad38be23, and the new colour answered /readyz -> 200 with traffic verified in dev and prod. A pod log line could not be read: local SSO expired. The change is test-only, so the running process is unchanged.
  • the push-only surface no pull request can pre-test (deploy, drift,
    kind's nightly leg) is green, or knowingly red for a reason that is not
    this change: deploy is green. drift and kind have been red since before this change (the known kind-probe red). The new test ran in CI's DuckLake e2e shard (pg_launch_proof ... ok).
  • the board card reached Done through the automation rather than by
    hand, and the issue closed: API launch proof: executable tenant-key workflow test (#1013, part 1) #1187 CLOSED by the merge, and the card is Done.
  • follow-ups are open for everything deferred here — numbers: First config publish on a never-ingested dataset enqueues a train job that fails #1186 (the publish-time train fails on an empty dataset) is fixed in fix(train): settle as a no-op on a dataset with nothing ingested yet (#1186) #1188. API launch proof: configure, ingest, dedupe and retrieve results without Salesforce #1013's remaining acceptance stays on API launch proof: configure, ingest, dedupe and retrieve results without Salesforce #1013.
  • what was learned is written down where the next session will find it
    (a skill, a reference, memory) — or nothing new was learned: The test's module doc records the onboarding boundary. First config publish on a never-ingested dataset enqueues a train job that fails #1186 records the empty-lake train failure.

Specific to this change

Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

…alone

#1187 (part 1 of #1013). One #[tokio::test] that drives the customer
workflow through tenant-public HTTP and the real executor, one pod per
task. After the single onboarding call (POST /v1/orgs returns the
one-time admin key; #866 makes minting self-serve), every request
carries that key. There is no SQL, operator token, drop directory or
er CLI.

1. Configure: create and publish a config version. The rebuild
   succeeds.
2. Ingest: JSON for crm (an undeclared column is first refused 422,
   naming it), then CSV uploads for billing and webforms. Every delivery
   job succeeds.
3. Receipts: imports list all three sources, and no job is left queued.
4. Results:
   - duplicate groups, each with at least two members;
   - limit=1 cursor paging visits every group exactly once;
   - golden records as an Arrow stream: base_10's ten entities;
   - per-entity lineage containing the group's members.
5. An identical redelivery succeeds and the ten entities are unchanged.
6. Another tenant's key gets 404 on this dataset.

Jobs are settled by the ids the API returns (publish's jobs_enqueued,
each delivery's job). Watching the queue misses jobs the harness claims
while pumping.

The first publish's `train` fails on a never-ingested dataset (no
int_std_records yet). That is #1186, and the test asserts it explicitly
so the fix has to change a visible line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@athvin athvin changed the title test(api): launch proof — configure, ingest, resolve and retrieve with a scoped key (#1013) test(api): launch proof — a tenant resolves its data with its own key alone (#1187) Nov 23, 2026
@athvin
athvin marked this pull request as ready for review November 23, 2026 18:41
@athvin
athvin merged commit ad38be2 into main Nov 23, 2026
41 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 23, 2026 18:49 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — 8dede24e Deployed Nov 23, 2026 by athvin via remove closed PR previews #17
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: executable tenant-key workflow test (#1013, part 1)

2 participants