jcfischer / jcfischer/supertag-cli

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

Open
#102 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
49
Forks
7
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the indexer logic that populates field_values and handles the SYS_D05 type discriminator, then compare it with the documented SYS_D12 tuple shape. Confirm the selected sibling value is extracted for options fields and verify that indexing creates field_values rows so tana_related returns the expected connections.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.