Diff Mode
Diff Mode
Section titled “Diff Mode”Definition
Section titled “Definition”Closed enumeration on source_document_diffs.diff_mode capturing the granularity at which two source-document versions were diffed. qa mode diffs at the question-answer boundary; full_text mode diffs the document body verbatim. Relevant to Theme C edit_intent and Theme D cocoindex ops-DB ledger replacing diffs (per source §2.1 S235 WP1 addition).
Synonyms / Acronyms
Section titled “Synonyms / Acronyms”None.
Baseline values
Section titled “Baseline values”| key | label | provenance |
|---|---|---|
| qa | Q&A Diff | core |
| full_text | Full Text Diff | core |
Relationships
Section titled “Relationships”source_document_diffs.diff_mode— CHECK constraintsource_document_diffs_diff_mode_check(column declared asdiff_mode: stringinsupabase/types/database.types.ts:2063).- Bound to
source_documents(Layer 5). - Future: cocoindex ops-DB ledger replacing diff storage per Theme D.
Consumers
Section titled “Consumers”lib/source-documents/document-diff.ts— diff computation (writesdiff_mode).components/source-document/source-document-diff-review.tsx— diff review UI surface.- Source-document version comparison UI surfaces.
- Future cocoindex pipeline that may replace diff storage.
- Added to source §2.1 in S235 WP1 (commit
53659515). - Closed CHECK enum.
- May be retired if cocoindex ops-DB ledger pattern (Theme D) supersedes the diff table — defer that decision to cocoindex prereq sessions.