Skip to content

docs(data-modeling): the field-type decision-tree flowchart routes "Secret value" to password, contradicting the same page's table, ADR-0100 and the shipped skill rule #16366

Description

@claude

Found while deleting the duplicated ASCII decision tree from skills/objectstack-data/rules/field-types.md (#16324): before citing the docs page as the surviving carrier of that tree, its mermaid flowchart was read, and it routes credentials to the wrong field type.

The defect

content/docs/data-modeling/field-type-decision-tree.mdx line 36:

    TEXT -->|Secret value| T8[password]

That edge is the page's own answer to "what type holds a secret value", and it names password. Three sources in this repo say the answer is secret:

  • The same page, 100 lines further down. Its quick-reference table, lines 138-139, reads password as "Masked on read; stored plaintext at rest (not hashed) - prefer secret for real credentials" and secret as "Reversible encrypted-at-rest value, masked on read", with api_key / db_password as the secret examples. Line 78 of the same flowchart even carries a second, correct edge: STRUCT -->|Sensitive secret value| S5[secret]. So the page contradicts itself inside one file, twice over.
  • ADR-0100 (Accepted, 2026-07-18), docs/adr/0100-credential-field-channels.md - "Credential Field Channels - secret (encrypted) and password (masked)".
  • The published skill rule. skills/objectstack-data/rules/field-types.md marks the password row with a warning: on a generic object the value is stored PLAINTEXT at rest, one-way hashing applies only inside the auth subsystem's identity tables, and secret is "The recommended type for credentials".

The runtime agrees with the three, not with line 36: packages/spec/src/data/object.test.ts:2367 pins warns once when a password field is declared on a generic object.

Why this is a card and not a note

It is an authoring trap with a data-at-rest consequence, and the flowchart is the first thing on the page - it is the surface a reader (human or agent) consults before reaching the table that corrects it. Following it yields a field that stores an API key or a DB password in plaintext, and the build then emits the warning the author was just steered into earning. The two nearby closed findings on this same docs tree, #14901 and #14940, are the same shape.

Repro

  1. Open /docs/data-modeling/field-type-decision-tree.
  2. Follow the flowchart from START through the Text? branch for a secret value. It lands on password.
  3. Read the quick-reference table on the same page. It says to prefer secret.

Acceptance

  • Line 36's edge names secret, or the Text? branch drops the credential edge entirely and leaves it to the already-correct STRUCT edge at line 78 - whichever keeps the flowchart readable.
  • If the password type stays reachable from the flowchart at all, its label says what it is (masked-only, plaintext at rest) rather than "Secret value".
  • Whatever lands is consistent with ADR-0100 and with the password / secret rows of the skill's own table.

Docs-only, no package publishes from it. Filed unassigned for triage.

Generated by Claude Code


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationdomain:devxpriority:p2Medium: important, M3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions