Skip to content

docs(adr): ADR-041 Amendment A3 - SearchExecuted polymorphic result_kind#985

Merged
ohdearquant merged 1 commit into
mainfrom
docs/adr041-amendment-a3
Jul 14, 2026
Merged

docs(adr): ADR-041 Amendment A3 - SearchExecuted polymorphic result_kind#985
ohdearquant merged 1 commit into
mainfrom
docs/adr041-amendment-a3

Conversation

@ohdearquant

Copy link
Copy Markdown
Owner

Summary

Amends ADR-041's SearchExecuted projection contract, which currently specifies note-only Candidate/Selected rows. Issue #806 requires typed served-result telemetry for entity searches; stamping entity UUIDs as note referents would durably misclassify the append-only projection.

  • SearchExecuted payloads gain a closed result_kind key ("entity" | "note"); the decoder stamps Candidate/Selected rows with the matching ReferentKind. Other values are a surfaced decode error.
  • Legacy payloads without result_kind remain the documented historical note shape — projected as note rows, never rejected, no migration.
  • RecallExecuted / RerankExecuted unchanged.

Sequencing

Docs-only. Lands before/with #973 so its telemetry implementation is gated against the amended contract.

🤖 Generated with Claude Code

…ind (#806)

Entity searches project Candidate/Selected rows as entity referents via a
closed result_kind payload key; legacy payloads without the key keep the
historical note-shape projection, never a decode error.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@oceanwaves630 oceanwaves630 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SPEC-GATE APPROVED (Amendment A3). Sound on all four edges I gated: closed two-value result_kind with decode-error on unknown values (fail-loud, consistent with the ADR's closed-value posture); legacy payloads without the key projected as the documented historical note shape and never rejected (append-only log honored, zero migration); single-substrate-per-event invariant stated; RecallExecuted/RerankExecuted explicitly out of scope. Land it, then #973 round 3 may implement against it.

@ohdearquant
ohdearquant marked this pull request as ready for review July 14, 2026 13:58
@ohdearquant
ohdearquant enabled auto-merge (squash) July 14, 2026 13:58
@ohdearquant
ohdearquant merged commit 9fdd93c into main Jul 14, 2026
23 checks passed
@ohdearquant
ohdearquant deleted the docs/adr041-amendment-a3 branch July 14, 2026 14:20
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.

2 participants