Skip to content

feat(api): document the public result reads' payloads (#1234) - #1235

Merged
athvin merged 5 commits into
mainfrom
issue/1234-result-payload-docs
Nov 25, 2026
Merged

athvin merged 5 commits into
mainfrom
issue/1234-result-payload-docs

Conversation

@athvin

@athvin athvin commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Closes #1234

🚧 Claimed by an agent session — 2026-11-25T10:36:38Z, session Claude Code:d1e3b2dc-3174-4091-9c30-c08fc4820306 on brians-MacBook-Pro.
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

E11's first child. The public result reads now document what they return:

Read Before After
GET …/golden-records string, format: binary Arrow rows named in x-er-arrow-rows (GoldenRecord / AcctGoldenRecord), plus the x-er-snapshot and x-er-next-cursor headers
GET …/duplicates {items: {}, snapshot: {}, next_cursor: {}} PersonDuplicatesPage | AccountDuplicatesPage, with fully typed groups
GET …/match-scores envelope MatchScoresPage of ScoredPair

Decision, recorded per the ticket: no JSON content negotiation for golden-records. The Arrow stream stays, and its rows are named by the entity's own JSON component, which a test holds equal to the streamed Arrow schema. One representation documented exactly beats two that can drift. If a customer needs JSON rows, the export (#1230) is where that goes.

Why

#1234, part of #521. A client generator could not tell what a result read returned.

Proof

make check: 1,177 passed, 0 failed. er-server --tests against Postgres: 408 passed (covers acct_read.rs, the account duplicates read over a real lake). make frontend: 964 passed. Tests added, each observed failing:

Test What it holds Mutation that failed it
every_arrow_operation_names_its_rows every Arrow-envelope operation has an ARROW_ROWS entry entry's path renamed: these Arrow reads document no row schema
every_arrow_row_component_matches_its_entitys_arrow_schema the named component's properties = the entity's Arrow fields GoldenLineage named instead: documented properties differ from the columns its Arrow read streams
every_public_result_read_documents_its_payload seven E11 result reads never use the envelope fallback an untyped read (segments) added to the list: flagged
duplicate_group_tests (2) typed groups equal the old hand-built map, scored person and unscored account (value equality against literal JSON)
scored_pair_tests ScoredPair equals rows_to_values + with_confidence (the #864 oracle)

The envelope ledger (envelopes.json) is unchanged. get_responses_agree_with_every_committed_envelope_class now checks each anyOf branch.

Risk & rollback

The wire bytes change key order only (struct order instead of sorted), and the values are equal. The BFF and UI parse JSON, so they are unaffected. Rollback: git revert <merge-sha>.

Post-merge ledger

Closed by: agent · session Claude Code:d1e3b2dc-3174-4091-9c30-c08fc4820306 on Mac · 2026-11-25T18:32:25Z

Specific to this change

Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

bmoore813 and others added 4 commits November 25, 2026 02:44
…1234)

The page was a json! map of hand-inserted keys; it is now
PersonDuplicatesPage | AccountDuplicatesPage, one struct per entity type
because the preview columns differ. Value-equal to the old map for a scored
and an unscored group (duplicate_group_tests); the envelope ledger is
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…payload schema (#1234)

ScoredPair is value-equal to the rows_to_values + with_confidence hop it
replaces (scored_pair_tests). every_public_result_read_documents_its_payload
fails if a result read regresses to the envelope-granularity fallback. The
envelope-agreement test now checks each anyOf branch.

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

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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

@athvin
athvin marked this pull request as ready for review November 25, 2026 11:11
@athvin
athvin merged commit 029c874 into main Nov 25, 2026
47 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 25, 2026 11:16 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — 9c78b037 Deployed Nov 25, 2026 by athvin via remove closed PR previews #53
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.

E11.1 — Document every public result read's payload (Arrow and JSON)

2 participants