Cocoindex Source Kind
Cocoindex Source Kind
Section titled “Cocoindex Source Kind”Definition
Section titled “Definition”RE-HOMED onto source_documents.origin_type — RESOLVED (ID-133 BI-4a; S451 investigation, {133.14}). This CV’s original plan targeted content_items.cocoindex_source_kind, a column that never landed before content_items itself was DROPPED at ID-131 M6 (S450 GO). The prior FLAGGED note (owner-coordination pending) was found to be STALE: it searched old table/column names and never checked ID-138. ID-138 {138.5} M1 (supabase/migrations/20260703160050_id138_sd_source_binding_cols.sql:32-55) added source_documents.origin_type — LIVE and populated on both envs since S445 — as the source-binding register’s origin classification. It is wired end-to-end: scripts/cocoindex_pipeline/flow.py plumbs origin_type through the source_documents INSERT/UPDATE (_resolve_source_identity/_upsert_source_document/callers, ~:2884-3474), and lib/upload/folder-drop.ts:366 writes the literal value 'upload' on document-upload admission via the resolve_or_mint_source_identity RPC. This register now targets that live column; the cv_name/title/file identity are UNCHANGED (avoids breaking the register numbering and any cv_name-keyed cross-references), mirroring 13-ingest-source.md’s posture on its own column-rename ({107.1}).
origin_type is SOFT today (no DB CHECK) and carries a COARSE binding-class value set per the column’s own comment: uploaded document / id-45 onboarding Q&A / connected external system (DR-020 light tier) — only upload has a confirmed live writer as of this pass. The 8 pre-existing connector-adapter values (localfs, sharepoint, notion, google_drive, dropbox, box, manual_upload, remote_url) are RETAINED as the SEED vocabulary for the finer-grained external-adapter taxonomy the ID-138 theme-15 connector work is expected to formalise (with a CHECK) once those connectors land — see §Notes for the non-blocking granularity flag. Pipeline-side, platform-internal. CORE per §6.2.
Synonyms / Acronyms
Section titled “Synonyms / Acronyms”None.
Baseline values
Section titled “Baseline values”| key | label | provenance | status |
|---|---|---|---|
| upload | Upload | core | LIVE — lib/upload/folder-drop.ts:366 |
| localfs | Local Filesystem | core | seed (ID-138 theme-15 connector taxonomy) |
| sharepoint | SharePoint | core | seed (ID-138 theme-15 connector taxonomy) |
| notion | Notion | core | seed (ID-138 theme-15 connector taxonomy) |
| google_drive | Google Drive | core | seed (ID-138 theme-15 connector taxonomy) |
| dropbox | Dropbox | core | seed (ID-138 theme-15 connector taxonomy) |
| box | Box | core | seed (ID-138 theme-15 connector taxonomy) |
| manual_upload | Manual Upload | core | seed (ID-138 theme-15 connector taxonomy) — distinct from live upload |
| remote_url | Remote URL | core | seed (ID-138 theme-15 connector taxonomy; ID-75 OQ-75-5(1)) |
Relationships
Section titled “Relationships”source_documents.origin_type— LIVE column (ID-138 {138.5} M1,supabase/migrations/20260703160050_id138_sd_source_binding_cols.sql:32-55, applied both envs S445). Soft (no CHECK); coarse binding-class value set in flight per the column comment (uploaded document / id-45 onboarding Q&A / connected external system, DR-020). Historic:content_items.cocoindex_source_kindwas a planned column on a table that no longer exists —content_itemswas DROPPED at ID-131 M6; see §Definition.source_documents.retention_class— the sibling LIFECYCLE axis on the same source-binding register (ID-138 {138.5} M1, same migration):origin_typeclassifies WHAT/WHERE the source is,retention_classclassifies HOW it is retained (keep_and_watch/ingest_once/live_connected/external_referenced).- Adjacent to
ingest_source(CV 13,13-ingest-source.md— now DEPRECATED, itscontent_itemsforward register DROPPED at ID-131 M6 and is historic-only): CV 13’s register told you the internal pipeline route (how); this CV/column now carries the external-surface (where) role CV 13’s Definition previously pointed at. - Adjacent to CV 22
origin_kind(22-origin-kind.md, plannedq_a_pairs.origin_kind— RECORD-level provenance) and CV 23extractor_kind(23-extractor-kind.md, plannedq_a_extractions.extractor_kind) — together with this CV (SOURCE-level, live) they form the cocoindex/source-binding provenance family. - Layer 2: administrative provenance metadata.
Consumers
Section titled “Consumers”scripts/cocoindex_pipeline/flow.py— plumbsorigin_typethrough thesource_documentsINSERT/UPDATE (_resolve_source_identity~:2884-2919,_upsert_source_document~:2922-3134, callers ~:3409-3474). DELIBERATELY excluded from the conflict UPDATE set — preserved, not clobbered, on a re-walk (R(d)/DR-026).lib/upload/folder-drop.ts:366— LIVE writer; stampsp_origin_type: 'upload'on theresolve_or_mint_source_identityRPC call at document-upload admission.- Provenance UI surfaces (where did this source originate?) — planned.
- Source-binding configuration (per source §3.7 — cocoindex source-binding maps to Layer 1 + 2 substrate).
lib/mcp/tools/content.ts— future MCP filter parameter once the seed connector taxonomy / CHECK lands.
- RESOLVED (ID-133 BI-4a; S451 investigation, {133.14}). Was FLAGGED pending owner coordination ({133.5}); resolved by re-homing onto the now-live
source_documents.origin_type(ID-138 {138.5} M1) — the {133.5} flag was stale (it searched old names and never checked ID-138). See §Definition + §Relationships. - Status: active —
source_documents.origin_typeis a live, populated column (both envs since S445). - Granularity / CHECK timing — non-blocking owner flag.
origin_typeis currently SOFT (no CHECK) with a 3-way COARSE value set in flight (uploaded / id-45 onboarding / connected-external) per the column comment; onlyuploadis confirmed live. The 8 pre-existing connector values are retained as SEED vocabulary for the ID-138 theme-15 connector work, expected to formalise a CHECK once those adapters land. Whether the eventual CHECK enforces the coarse 3-way set, the fine 9-way connector set, or a two-tier scheme is an OPEN, NON-BLOCKING decision left to the owner at CHECK-authoring time — recorded here as a flag, not resolved by this pass. remote_urlbaseline value added (ID-75, OQ-75-5(1) ratified, S318 06/06/2026). Records the remote-URL external surface for URL/feed-acquired items (the cocoindex URL source, ID-75 WP-C — see33-reference-item.md). The 7 values that preceded it were all file-surface adapters;remote_urlwas the first non-file surface. The register now carries 9 baseline values in total (the original 8 plus the liveuploadvalue added by this pass).- Closed CORE per §6.2; schema migration/CHECK adds new values when new cocoindex adapters land.
- Source §3.7 confirms cocoindex source-binding (postgres_source + localfs.walk_dir + content-hash) maps to Layer 1 + 2 substrate.
- Per CLAUDE.md gotcha:
localfs.walk_dirdefaultsrecursive=False— explicitrecursive=Trueneeded for nested corpora.