Skip to content

[finding] the metadata TYPE registry moves the same metadataForms bundles and is still invisible to dispatch-gates path derivation #9144

Description

@os-project-manager

Filed unassigned from the #9116 implementation (PR #9143, session session_011RB4waLuNbdruCo6X9oobm). Duplicate-searched: no card names the type registry plus dispatch-gates. Grading and routing are triage's.

Measured

PR #9143 closes the .form.ts edge of #9116: a metadata form module edit now derives check:i18n through a convention entry whose population is walked at runtime and whose applicability is read from the extract configs' own documented flags.

While enumerating that trigger surface, a second producer of the same four bundles turned up that the new entry does not cover. walkMetadataForms (packages/cli/src/utils/i18n-extract.ts, ~line 920) emits the metadataForms surface from two sources, not one:

  1. METADATA_FORM_REGISTRY (packages/spec/src/system/metadata-form-registry.ts) — section, field, helpText and placeholder strings. Its members are the 17 *.form.ts modules, which is the population PR fix(pm): make check:i18n derivable from a metadata form module edit #9143 now derives.
  2. DEFAULT_METADATA_TYPE_REGISTRY (packages/spec/src/kernel/metadata-plugin.zod.ts, ~line 653) — the type-level metadataForms.TYPE.label / .description entries, emitted for every registry entry including form-less types.

Editing a label in (2), or adding/removing an entry in the registry module of (1), moves exactly the same platform-objects metadata-form bundles that PR #9113 had to regenerate — and derives nothing. Neither file carries a filename that distinguishes it from its ~925 neighbours under packages/spec/src, so the *.form.ts convention cannot reach them, and the ordinary path derivation cannot either (the gate's own path literals are its CLI and stale-dist prerequisites; packages/spec owns no extract config).

This is the same invariant #9116 states, on the adjacent edge:

a gate that a diff can move should be derivable from that diff — "undetermined" was designed as an honest unknown, not a standing blind spot on a known edge.

Why it was not fixed in PR #9143

Not scope creep avoidance for its own sake: the correct FORM is not pinned by existing evidence, so fixing it there would have been a guess.

The *.form.ts convention works because the producer states it about itself (metadata-form-registry.ts: "the FormView produced by defineForm({ schemaId }) in the corresponding *.form.ts") and because the convention and the population coincide exactly — 17 files, 17 registry entries, nothing left over. Neither registry module has an equivalent self-describing anchor. The candidate anchors each cost something and want a decision rather than an implementer's preference:

Refs

#9116 (the .form.ts half) · PR #9143 (states this gap in scripts/i18n-bundle-surface.mjs's header, so the omission is visible at the source rather than only here) · scripts/pm/dispatch-gates.mjs (CHANGE_KIND_GATES) · PR #9113 (the paid instance on the sibling edge)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions