docs(adr): ADR-041 Amendment A3 - SearchExecuted polymorphic result_kind#985
Merged
Conversation
…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
approved these changes
Jul 14, 2026
oceanwaves630
left a comment
Collaborator
There was a problem hiding this comment.
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
marked this pull request as ready for review
July 14, 2026 13:58
ohdearquant
enabled auto-merge (squash)
July 14, 2026 13:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
SearchExecutedpayloads gain a closedresult_kindkey ("entity"|"note"); the decoder stamps Candidate/Selected rows with the matchingReferentKind. Other values are a surfaced decode error.result_kindremain the documented historical note shape — projected as note rows, never rejected, no migration.RecallExecuted/RerankExecutedunchanged.Sequencing
Docs-only. Lands before/with #973 so its telemetry implementation is gated against the amended contract.
🤖 Generated with Claude Code