Skip to content

refactor(core): remove dead exports and relocate test-only machinery #3089

Closed

Description

@Astro-Han

Problem

packages/core ships dead contracts and test machinery in the published package:

  • bot-platform-hints.ts (146 lines) — zero consumers anywhere.
  • settings/result.ts (1 line) — dead re-export; real consumers import @maka/core/result directly.
  • provider-contract-matrix.ts (475 lines) — exists only to drive the provider-conformance test suite; not dead code, but should not be a public contract.
  • test-helpers.ts (46 lines) — test-only helper compiled into the built package.

Desired outcome

Delete the dead contracts and relocate test-only machinery so the contracts package stops shipping glue.

Alternatives or workarounds

Keep shipping test machinery in the package; it is un-exported but still compiled into dist.

Acceptance

  • bot-platform-hints.ts and settings/result.ts deleted
  • provider-contract-matrix.ts moved under __tests__/ (or un-exported from the package exports map) — the conformance suite still passes
  • test-helpers.ts moved under __tests__/ so it is not emitted into dist
  • packages/core build, focused tests, and Biome pass

Related

  • S5 (dead barrel exports in runtime-host)

Activity

  1. added
    enhancement
    help wanted
    good first issue
    on Aug 15, 2026
  2. CxHsin commented on Aug 15, 2026

    @CxHsin
    Contributor

    我想认领这个 issue。计划删除无引用的 contracts,将仅供测试使用的文件迁移到测试目录,确认 conformance suite 仍然通过,并运行 packages/core 的构建、定向测试和 Biome 检查。

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

Metadata

Metadata

Assignees

Labels

enhancementgood first issuehelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions