Skip to content

[R3][MED] Five export type * star seams expose ~50 internal protocol types; interface snapshot blind to seam drift #488

Description

@SisyphusZheng

Source: third full-project audit (2026-07-25). Severity: MEDIUM. Category: new finding.

Evidence

  • packages/element/src/index.ts:34-38 — five whole-module export type * seams (framework / manifest / render / style-sheet / vnode).
  • deno doc proves the root surface therefore carries ~50 types: FrameworkOptions, RouteEntry, ValidationResult, RegistryIndex, OpenElementMiddleware, HydrateEventDescriptor, AppShellConfig, IsrManifestEntry, DsdOptions, DsdBuildReport, ManifestDecision, SsrAdmissionDecision, WebComponentContract, OpenElementBlogOptions, OpenElementI18nContextOptions, etc. Several docstrings reference retired packages (framework.ts:32 "@openelement/content", :50 "@openelement/i18n") — the same speculative-type class alpha.18 deleted elsewhere.
  • The seams are intentional ("Additive type-only seam consumed by build adapters", index.ts:33) but contradict the direction of moving build types into build-utils, and PACKAGE_SURFACE.md does not mention them.
  • Gate blind spot: tools/check-public-interface-snapshot.ts:15-19 records only entry-file declaration lines + file hash; adding/removing types inside internal/protocol/*.ts does not change the snapshot.

Impact

Internal protocol types are de-facto public with no compatibility promise and no drift detection; any protocol edit silently changes the public type surface.

Suggested fix (decision needed)

Replace the five star seams with explicit type export lists (export what adapters actually consume), or extend the snapshot tool to resolve export type * targets and record the carried symbol names.

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

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions