Skip to content

notices: fail when a known bundling dependency yields no bundled packages #657

Closed

Description

@nc9

scripts/generate-third-party-notices.ts (since #654) finds packages a runtime dependency bundles into its own files, for example ajv 8 inside @modelcontextprotocol/server, by scanning for the bundler's node_modules/.pnpm/<name>@<version> source markers. If a future release of such a dependency changes or strips those markers, the scan quietly finds nothing. The bundled packages would then drop out of THIRD_PARTY_NOTICES.md with no error, and notices:check would still pass.

Found in the review of #654.

Acceptance Criteria

  • notices:generate and notices:check fail with a clear message when @modelcontextprotocol/server (the one runtime dependency known to bundle packages today) yields no bundled packages from the marker scan
  • The message names the dependency and says to check its dist for the bundled packages by hand and update the scan or scripts/third-party-embedded/
  • A test or a --check run shows the guard fails when the markers are absent and passes on the current install

Activity

  1. added
    P3
    size: XS
    on Oct 11, 2026
  2. nc9 commented on Oct 11, 2026

    @nc9
    ContributorAuthor

    Checked against current main (ad95fb2): STILL TRUE, with one nuance about how it fails.

    scripts/generate-third-party-notices.ts has no guard for an empty marker scan. bundledPackages() (line 130) returning nothing for @modelcontextprotocol/server is silent. The only errors at lines 264 to 292 are a missing committed licence, a lockfile mismatch and stale output.

    The nuance: on the dependency bump PR itself, notices:check would not pass. It would fail with "Third-party notices are out of date", because the committed file still lists ajv and friends. But its advice is "Run bun run notices:generate and commit the result", and doing that silently drops the bundled packages. So the failure points the author toward the wrong fix. The guard asked for here would turn that into a clear error naming the dependency.

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

    P3choresize: XS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions