Skip to content

Cocoindex Source Kind

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_typeLIVE 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.

None.

keylabelprovenancestatus
uploadUploadcoreLIVElib/upload/folder-drop.ts:366
localfsLocal Filesystemcoreseed (ID-138 theme-15 connector taxonomy)
sharepointSharePointcoreseed (ID-138 theme-15 connector taxonomy)
notionNotioncoreseed (ID-138 theme-15 connector taxonomy)
google_driveGoogle Drivecoreseed (ID-138 theme-15 connector taxonomy)
dropboxDropboxcoreseed (ID-138 theme-15 connector taxonomy)
boxBoxcoreseed (ID-138 theme-15 connector taxonomy)
manual_uploadManual Uploadcoreseed (ID-138 theme-15 connector taxonomy) — distinct from live upload
remote_urlRemote URLcoreseed (ID-138 theme-15 connector taxonomy; ID-75 OQ-75-5(1))
  • source_documents.origin_typeLIVE 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_kind was a planned column on a table that no longer exists — content_items was 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_type classifies WHAT/WHERE the source is, retention_class classifies 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, its content_items forward 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, planned q_a_pairs.origin_kind — RECORD-level provenance) and CV 23 extractor_kind (23-extractor-kind.md, planned q_a_extractions.extractor_kind) — together with this CV (SOURCE-level, live) they form the cocoindex/source-binding provenance family.
  • Layer 2: administrative provenance metadata.
  • scripts/cocoindex_pipeline/flow.py — plumbs origin_type through the source_documents INSERT/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; stamps p_origin_type: 'upload' on the resolve_or_mint_source_identity RPC 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: activesource_documents.origin_type is a live, populated column (both envs since S445).
  • Granularity / CHECK timing — non-blocking owner flag. origin_type is currently SOFT (no CHECK) with a 3-way COARSE value set in flight (uploaded / id-45 onboarding / connected-external) per the column comment; only upload is 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_url baseline 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 — see 33-reference-item.md). The 7 values that preceded it were all file-surface adapters; remote_url was the first non-file surface. The register now carries 9 baseline values in total (the original 8 plus the live upload value 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_dir defaults recursive=False — explicit recursive=True needed for nested corpora.