Skip to content

Options-type fields (SYS_D12) never indexed into field_values — tana_related returns no connections for affected supertags #102

Description

@evielync

Description

Nodes whose fields use Tana's "options" field type have zero entries in field_values after indexing. This means tana_related returns no connections for any field-based relationship on these nodes, even when connections are clearly set in Tana.

Affected supertags in our workspace (all use options-type Connected To): #improvement (10 nodes), #issue (1 node), #insight (12 nodes), #thread (32 nodes) — all have 0 field_values indexed.

Root cause

Tana has two structurally distinct field types that look identical in the UI but differ in the export format:

Instance/reference field (SYS_D05) — e.g. #log → Connected To:

  • attrDef child 1: typeChoice tuple with SYS_T06 + SYS_D05
  • attrDef child 2: SYS_A06 "Selected source supertag" (constrains to a supertag type)
  • Selected value appears as sibling of attrDef in the parent tuple
  • Indexed correctly

Options field (SYS_D12) — e.g. #improvement → Connected To:

  • attrDef child 1: typeChoice tuple with SYS_T06 + SYS_D12
  • attrDef child 2: SYS_T51 "Values" tuple — an embedded pool of all selectable nodes
  • Selected value appears as sibling of attrDef in the parent tuple (same position)
  • Never indexed

The selected value is in the same structural position for both types. The indexer appears to bail out on options fields rather than extracting the sibling value node.

Export structure comparison

# WORKS — log tuple (instance field, SYS_D05):
tuple (-2xvOy_mmIY3)
  ├── attrDef "Connected To" (Do_-4PsG2nBc)
  │   ├── typeChoice [SYS_T06, SYS_D05]
  │   └── SYS_A06 "Selected source supertag"
  └── k_Z7Q9NE4A "initiative"  ← value, gets indexed ✅

# BROKEN — improvement tuple (options field, SYS_D12):
tuple (aMcXMr7n2fkN)
  ├── attrDef "Connected To" (vvG8mLR8SebH)
  │   ├── typeChoice [SYS_T06, SYS_D12]
  │   └── SYS_T51 "Values" (pool of 18+ selectable nodes)
  └── Fz2fmxLLVobh "Chad System Simplification"  ← value, never indexed ❌

Expected behaviour

Both field types should produce a field_values row. The selected value node is the sibling of the attrDef in both cases — the extraction logic should work identically regardless of whether SYS_D05 or SYS_D12 is the type discriminator.

Impact

Any supertag whose reference-type fields use the options field type (SYS_D12) gets zero field_values indexed. tana_related returns empty for all such nodes. In our case this includes the primary operational node types used for knowledge management workflows.

Version

2.5.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions