Skip to content

Dead code: trigger type registration in anchors.ts — type was retired in ADR-0088 #2327

Description

@akarma-synetal

Summary

A registerMetadataResource({ type: 'trigger', ... }) call exists but trigger was retired from the MetadataType enum in ADR-0088. This is unreachable dead code.

Root cause

In packages/app-shell/src/views/metadata-admin/anchors.ts, lines 271-284:

registerMetadataResource({
  type: 'trigger',
  anchors: [{ ... }],
  createFields: ['label', 'name', 'object'],
  createDerive: [ ... ],
});

But spec/src/kernel/metadata-plugin.zod.ts (lines 76-78) states: "ADR-0088: there is no trigger metadata type." The DEFAULT_METADATA_TYPE_REGISTRY (lines 589-702) does not include trigger. This registration will never appear in any UI and the type cannot be created via API.

Expected behavior

Dead code should be removed. The registration misleads developers into thinking trigger is supported.

Fix

Remove lines 271-284 from anchors.ts.

Impact

Code quality — no functional impact but misleading for maintainers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions