Skip to content

Commit f54ce5e

Browse files
committed
docs: move cardinality note after derived-unit rules
1 parent 912eca0 commit f54ce5e

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

docs/superpowers/specs/2026-07-06-conversation-unit-citations-design.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,6 @@ For an anchor message row `m` at ordinal `o` (for `tool_input` / `tool_result`
9090
locations the anchor is the tool call's message row, whose ordinal the match
9191
already carries):
9292

93-
Row cardinality must be preserved when locating the anchor row. The
94-
`tool_result_events` branches join only `sessions` today (on all three
95-
backends); reaching the owning message row must use a `LEFT JOIN` or a post-scan
96-
secondary lookup — never an inner join, which would drop existing matches whose
97-
anchor message is missing. A match with no locatable anchor row falls back to
98-
`[o, o]` with `is_sidechain` false (session lineage still applies).
99-
10093
1. `m` is an embeddable user row → `[o, o]` (user messages are their own units).
10194
1. `m` is an embeddable assistant row → the maximal stretch of embeddable
10295
assistant rows containing `o`, bounded exclusively by: the nearest
@@ -109,6 +102,13 @@ anchor message is missing. A match with no locatable anchor row falls back to
109102
The row belongs to no conversation unit; the citation is the message
110103
itself.
111104

105+
Row cardinality must be preserved when locating the anchor row. The
106+
`tool_result_events` branches join only `sessions` today (on all three
107+
backends); reaching the owning message row must use a `LEFT JOIN` or a post-scan
108+
secondary lookup — never an inner join, which would drop existing matches whose
109+
anchor message is missing. A match with no locatable anchor row falls back to
110+
`[o, o]` with `is_sidechain` false (session lineage still applies).
111+
112112
Automation gating is deliberately ignored: derivation is structural, so matches
113113
inside automated sessions still get real ranges. The invariant is: **derivation
114114
at any member ordinal of any unit produced by

0 commit comments

Comments
 (0)