Skip to content

Share one import-specifier extractor between the sdk and streamdeck boundary guards #1389

Description

@amrmelsayed

Context

From the pr-gate integration review of PR #1387 (claude lane). The repo now has two independently implemented import-boundary guards with divergent mechanics:

The divergence cuts both ways:

  1. The sdk's node-adapter rule has the same gap codex caught in streamdeck's guard: a side-effect or dynamic import of ./node/ slips past a from-clause-only regex.
  2. The streamdeck guard can false-positive: a block comment containing a line shaped like import … from '…' trips it — apps/streamdeck/src/plugin.ts already discusses the dissolved client package in prose, one reformat away from a spurious failure.

Scope

Extract one shared, fixture-tested specifier extractor (all five import forms + comment stripping) into a common test helper and use it from both guards. Policy stays per-package (sdk keeps its denylist, streamdeck its allowlist); only the extraction mechanics are shared.

Notes

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

    Labels

    area/cross-cuttingTouches multiple areas — needs coordinated handling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions