Skip to content

fix(miner): check-miner-package.mjs rejects lib/ subdirectory modules, breaking main CI #3777

Description

@JSONbored

Summary

scripts/check-miner-package.mjs's file-list validation only ever accepted flat lib/<name>.(js|d.ts) files. PR #3704 (merged) added packages/gittensory-miner/lib/calibration/{index,types}.{js,d.ts} — a one-level subdirectory — which the ALLOWED regex and the "missing lib/*.js artifacts" check both reject/miss, since neither pattern accounts for a / inside lib/.

Confirmed: as of this writing, origin/main's latest push-triggered CI run (validate-code > "Test with coverage") is failing on test/unit/check-miner-package.test.ts > passes on the real miner workspace package, meaning every PR rebased onto current main inherits this failure regardless of its own changes.

Fix

Widen both regexes in scripts/check-miner-package.mjs to accept an optional one level of subdirectory under lib/, matching the existing flat-file convention otherwise. Added regression tests: one confirming a subdirectory-only module passes, one confirming a file nested two levels deep is still rejected (keeping the check meaningfully strict, not just permissive).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions