Skip to content

meta types reports 1 of 10 registered view.* subtypes, so the mandated vocabulary search says view.text does not exist #357

Closed

Description

@dmealing

Summary

meta types — the vocabulary search the generated AGENTS.md mandates as step 1 of the authoring procedure — reports 1 of the 10 registered view.* subtypes. An agent following the documented procedure correctly concludes that view.text does not exist.

Repro (CLI 0.24.5)

$ meta types --type view --kind subtype --limit 0
view.base       Abstract view base — …
view.currency   Currency display formatting (locale-aware via @locale).
2 matches.

$ meta types view.text
No vocabulary matches "view.text". Try --all to search descriptions, or drop --kind/--type filters.

But the loader accepts view.text and rejects a genuine unknown, so it is registered:

$ # metadata declaring { "view.bogusxyz": { "name": "cell" } }
meta: failed to load metadata: Unknown type "view.bogusxyz" — not registered

Measured by substituting each subtype into one real field and running meta gen:

declared loads? meta types finds it?
view.text, view.number, view.dropdown, view.date, view.checkbox, view.image, view.textarea, view.radio, view.password yes no
view.currency yes yes
view.bogusxyz rejected no

So the loader's registry has all ten; the manifest meta types reads carries descriptions for two.

Why this one matters more than a missing docstring

.metaobjects/AGENTS.md and the metaobjects-authoring skill both make meta types <term> the first step, on the reasoning that you must "search the vocabulary before concluding something cannot be expressed." That is good advice, and this makes it actively misleading for view.* — the tool's answer for nine of ten subtypes is indistinguishable from "not registered".

This is not hypothetical for us: skipping meta types is exactly what turned #353 into a request to register @label when @title already existed. The tool that would have prevented it under-reports the very type involved.

view.base is also reported as a plain subtype with no indication it is abstract, so the one listable result set gives no hint that the concrete vocabulary is missing.

Related

Activity

  1. dmealing commented on Sep 1, 2026

    @dmealing
    MemberAuthor

    Fixed on main in cd81349. The diagnosis in the report is right but it is the smaller half
    of the problem — there were two independent causes.

    1. It read the cross-port manifest. buildRegistryManifest answers "what must all five
    ports byte-match?"
    and deliberately carves out the 13 TS-web-presentation view.* controls
    (B-2), which stay registered in TypeScript. Asked "what can I author here?", it reported 2 of
    15.

    2. It composed a partial registry — registerCoreTypes alone, which core-types.ts itself
    documents as a legacy wrapper to be preferred against. Every attr the db, ui-web and
    documentation providers register was invisible:

    asked for reported actually registered
    view.* subtypes 2 15
    field.string attrs 6 16 (no @column, @filterable, @sortable, @dbColumnType)
    view.textarea attrs 0 1 (@rows)
    common attrs 0 8

    So meta types title found nothing — for the very attr an author is meant to find instead
    of asking for a new one. That is not incidental to the #353 story in the report: the tool that
    would have prevented that request under-reported the attribute involved.

    The fix. The command composes the same provider set the loader does, and reads a new
    buildVocabularyCatalog — the authoring-facing twin of the manifest, built from the same row
    rules — which enumerates every registered (type, subType) and marks the carve-outs
    [ts-only] rather than dropping them. That is the honest way to surface what the exclusion
    means: not "missing", but "TypeScript-only". Common attrs are searchable and no --type scope
    hides them, since they are accepted on every node.

    On view.base. It is marked [base] — a type's shared root, whose @attrs apply to every
    subtype — deliberately not "abstract". Nothing in the registry records abstractness (view.web
    carries it in prose only, and both load fine), and some base rows, like attr.base, are the
    authorable polymorphic form. Marking them abstract would have been an invention.

    Reserved structural keys (isArray, extends) stay unlisted: @-prefixing one is
    ERR_RESERVED_ATTR. An unregistered subtype still reports as missing — the fix must not make
    the tool answer "yes" to everything.

    Scope. TypeScript-only, deliberately. The B-2 exclusion is correct and documented; adding
    those rows to expected-registry.json would break the C#/Python deregistration and force a
    cross-port change for a bug whose cause was a CLI command asking the wrong source.
    expected-registry.json and metamodelVersion are untouched, and registry-conformance is
    unchanged. Both halves proven by reverting each in turn (6 of 10 new tests fail on the carve-out,
    4 on the partial composition).

    One more found by running the command's own documented example (49bc425): meta types --help advertised --json twice, and the CLI refuses a bare --json before a command sees its
    args, so the branch behind it was unreachable and the help documented a usage error. Removed
    rather than rewired — resolveFormat defaults to TOON off a TTY, so adding types to
    FORMAT_AWARE_COMMANDS would silently change what every non-interactive invocation prints. That
    is a design call worth making separately. A test now asserts every flag the help lists is one the
    command accepts.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions