Skip to content

[Bug]: check-core-boundaries misses require, import.meta.resolve and non-literal dynamic imports #554

Closed

Description

@jimhoyd

Runtime revision and environment

main at 645239b (static source review plus local synthetic checks). Node 22/26, macOS. Deployment: not applicable.

Minimal reproduction

scripts/check-core-boundaries.ts reads only .ts files (line 20) and recognises static imports and import('literal') (lines 39-54). It does not catch require()/createRequire, import.meta.resolve, template/variable import() or type-only typeof import('…') (already used at policies/agents.ts:218, harmlessly). Nothing slips through today; the check just would not notice.

Relevant output

node scripts/check-core-boundaries.ts passes; manual review of its matcher.

Suggested fix

Extend the matcher to those forms and add one fixture per form to test/core-boundaries.test.ts.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions