Skip to content

feat(api): online resolve for account datasets, an ambiguous decision and a typed status map (#529) - #1377

Merged
athvin merged 1 commit into
mainfrom
feat/529-resolve-api
Nov 29, 2026
Merged

athvin merged 1 commit into
mainfrom
feat/529-resolve-api

Conversation

@athvin

@athvin athvin commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Closes #529

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

What

Online resolve (POST …/datasets/{ds}/resolve) for account datasets: the corpus and the standardizer now follow entity_type. decision gains ambiguous for when candidates in two or more entities each clear auto_merge. Errors are no longer all 409: 409 when not yet resolvable (no model / no published config), 422 for an undeclared source (naming the declared ones) or a non-object record, 500 for a model or lake that will not load. The handler doc (the operation description) states the decision values, the status map, and that a resolve during a run reads the last committed snapshot.

Why

#529's missing list: no HTTP test, every failure a 409, person-only corpus, no ambiguous outcome, undefined behaviour during a run. Its other items, latency, payload limit and metering, need a measurement or a contract choice and are now #1365. Decision: resolve calls don't count toward the record allowance, because they write nothing. Decision: online resolve is launch scope; it already sits in the public contract.

Proof

make check exit 0 on the branch rebased over #1363 and #1373. pg_launch_proof (real Postgres) resolves over HTTP: a re-keyed copy finds its original, a stranger is reject, an undeclared source and a non-object record are 422. acct_e2e resolves an account copy into Acme's entity and a stranger to reject. Mutation: pointing the account corpus back at int_std_records fails it. A unit test pins the ambiguous rule.

Risk & rollback

decision can now be ambiguous, which callers that branch on three values must handle; no external caller exists. Status changes (409→422/500) are the documented contract. Rollback: git revert <merge-sha>.

Post-merge ledger

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

Specific to this change

Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

Conflicts with #1363 (the shared dictionary reader in resolve_blocking) were resolved by keeping both: the reader's errors now map to 500. #871 (typed evidence keys) still owns the untyped evidence schema.

🤖 Generated with Claude Code

… and a typed status map (#529)

POST …/datasets/{ds}/resolve read only int_std_records and standardized
the probe as a person, so an account dataset resolved against nothing.
It now picks the corpus and the standardizer by entity_type.

decision gains `ambiguous`: candidates in two or more entities each
clearing auto_merge, so no single entity is the answer.

Every failure was a 409. Now: 409 when the dataset is not yet
resolvable (no model, no published config), 422 for an undeclared
source (naming the declared ones) or a non-object record, 500 for a
model or lake that will not load. The handler's doc, which is the
operation description, states the decision values, the status map and
that a resolve during a run reads the last committed snapshot.

Tests: pg_launch_proof resolves over HTTP (a re-keyed copy finds its
original, a stranger is reject, 422 twice); acct_e2e resolves an
account copy into its entity and a stranger to reject; a unit test pins
the ambiguous rule. Latency, payload limit and metering are #1365.

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

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

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

@athvin
athvin merged commit 0945e6d into main Nov 29, 2026
48 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 29, 2026 02:02 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — b7838628 Deployed Nov 29, 2026 by athvin via remove closed PR previews #133
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.

E20 — Public duplicate-check and record-resolution API

2 participants