Skip to content

bug(tests): Jiti reload child cannot resolve nested dependency #1431

Description

@MarsSall

Before submitting

  • I searched open and closed issues and did not find a report of this problem.
  • I reviewed this report and removed credentials, tokens, private paths, hostnames, and other sensitive data.

Problem

The fd3 standing-permission reload test imports jiti from a spawned node --eval child as if it were a root dependency. Under a fresh npm install, Jiti 2.7.0 belongs to @earendil-works/pi-coding-agent and is nested there, so the child cannot resolve it.

Steps to reproduce

From main commit 80375c6c, run npm install --ignore-scripts --no-save --package-lock=false --no-audit --no-fund, then node --experimental-strip-types --test --test-name-pattern='fresh Jiti moduleCache:false reloads share fd3 structurally and reject stale terminal callbacks' tests/review-session-standing-permission-ipc.test.ts.

Expected and actual behavior

Expected: the child loads Jiti from its owning package and verifies both moduleCache: false reloads and fd3 behavior.
Actual: ERR_MODULE_NOT_FOUND before those assertions. Resolving Jiti from the Pi package makes the test pass; with both independent fixture fixes, the full unit suite passes 3437/3480, with 43 skips and 0 failures.

gentle-pi version

3.7.0 (80375c6c)

Pi version

0.87.1

Operating system

Linux

Relevant logs or error output (optional)

ERR_MODULE_NOT_FOUND: Cannot find package 'jiti' imported from [eval1]

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions