[GH-ISSUE #169] Chess package is not rebuildable: chess.js dependency exists nowhere after turn-game extraction #85

Closed
opened 2026-10-20 17:24:13 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kolacheee on GitHub (Jul 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/169

Originally assigned to: @Romuromylus on GitHub.

Split out of PR #168 review feedback (CodeRabbit flagged it; the PR also notes it under "Build notes").

The problem

The chess package's server bundle imports the npm library chess.js (packages/shared/src/features/turn-games/chess/engine.ts in the captured sources: import { Chess, type Move } from "chess.js"). That library used to be a Marinara Engine dependency (chess.js@^1.4.0, added with the chess turn game), but the Engine dropped it when the turn games moved into this catalog — it is no longer declared anywhere in the Engine's dependency tree, and this repository has no dependency manifest of its own.

Result: the chess package cannot be rebuilt from a clean Engine + Marinara-Agents checkout. node scripts/build-feature-packages.mjs chess fails with:

X [ERROR] Could not resolve "chess.js"

Every other feature package resolves its bare imports (zod, react, …) from the Engine workspace node_modules; chess is the only one with a dependency that exists nowhere.

For PR #168 the bundle was built with a scratch-installed chess.js@1.4.0 (the version the Engine pinned before dropping it), which works but is not reproducible by anyone else following CONTRIBUTING.

See it yourself

node scripts/build-feature-packages.mjs chess
# → Could not resolve "chess.js"

Options (maintainer call)

  1. Root dependency manifest — add a minimal package.json here pinning chess.js@1.4.0 (plus a lockfile), and document npm install as a setup step in CONTRIBUTING. Node module resolution walks up from sources/engine/..., so Marinara-Agents/node_modules/chess.js resolves naturally with no builder changes. Most standard; adds an install step to the repo workflow.
  2. Vendor the library — commit chess.js@1.4.0 under sources/ (MIT-licensed) and alias it in build-feature-packages.mjs. No install step, fully hermetic; adds ~a library of third-party code to the repo.
  3. Document only — leave the builder as-is and document the manual chess.js requirement in CONTRIBUTING, with a clearer builder error. Cheapest; still not turnkey-reproducible.

Option 1 seems most consistent with how the repo already leans on real package resolution, but any of the three closes the gap.

Originally created by @kolacheee on GitHub (Jul 31, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/169 Originally assigned to: @Romuromylus on GitHub. Split out of PR #168 review feedback (CodeRabbit flagged it; the PR also notes it under "Build notes"). ## The problem The chess package's server bundle imports the npm library `chess.js` (`packages/shared/src/features/turn-games/chess/engine.ts` in the captured sources: `import { Chess, type Move } from "chess.js"`). That library used to be a Marinara Engine dependency (`chess.js@^1.4.0`, added with the chess turn game), but the Engine dropped it when the turn games moved into this catalog — it is no longer declared anywhere in the Engine's dependency tree, and this repository has no dependency manifest of its own. Result: **the chess package cannot be rebuilt from a clean Engine + Marinara-Agents checkout.** `node scripts/build-feature-packages.mjs chess` fails with: ``` X [ERROR] Could not resolve "chess.js" ``` Every other feature package resolves its bare imports (zod, react, …) from the Engine workspace `node_modules`; chess is the only one with a dependency that exists nowhere. For PR #168 the bundle was built with a scratch-installed `chess.js@1.4.0` (the version the Engine pinned before dropping it), which works but is not reproducible by anyone else following CONTRIBUTING. ## See it yourself ```bash node scripts/build-feature-packages.mjs chess # → Could not resolve "chess.js" ``` ## Options (maintainer call) 1. **Root dependency manifest** — add a minimal `package.json` here pinning `chess.js@1.4.0` (plus a lockfile), and document `npm install` as a setup step in CONTRIBUTING. Node module resolution walks up from `sources/engine/...`, so `Marinara-Agents/node_modules/chess.js` resolves naturally with no builder changes. Most standard; adds an install step to the repo workflow. 2. **Vendor the library** — commit `chess.js@1.4.0` under `sources/` (MIT-licensed) and alias it in `build-feature-packages.mjs`. No install step, fully hermetic; adds ~a library of third-party code to the repo. 3. **Document only** — leave the builder as-is and document the manual `chess.js` requirement in CONTRIBUTING, with a clearer builder error. Cheapest; still not turnkey-reproducible. Option 1 seems most consistent with how the repo already leans on real package resolution, but any of the three closes the gap.
bsakaguchi 2026-10-20 17:24:13 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Romuromylus commented on GitHub (Aug 1, 2026):

Fixed by #170 (merged to staging as 634e07a5): root package.json pins chess.js@1.4.0 with a lockfile, and CONTRIBUTING documents npm ci as a setup step. Verified the chess server bundle rebuilds byte-identical to the committed artifact from a clean checkout.

<!-- gh-comment-id:5148477363 --> @Romuromylus commented on GitHub (Aug 1, 2026): Fixed by #170 (merged to staging as 634e07a5): root package.json pins chess.js@1.4.0 with a lockfile, and CONTRIBUTING documents npm ci as a setup step. Verified the chess server bundle rebuilds byte-identical to the committed artifact from a clean checkout.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#85
No description provided.