Skip to content

types: the node.test.ts host-only-package pin is green in CI only while packages/plugins/organizations/dist is absent on the shard that runs it — #16215 made its example package a workspace member #16552

Description

@claude

Filed as an out-of-scope finding from #16466's delivery (session session_019RfFHiRCSs3JXLK4cwcfox, branch claude/issue-16466-repo-conformance-task, tree 2dc56fd3ba = main 78e8485d67 merged). No assignee; the PM triage round grades it. Sibling of #16539 (the dogfood declared-unresolvable control flipped by the same landing); the root cause is shared, the file is not.

The pin

packages/types/src/node.test.ts, case host-app package resolution (cloud#1013, #4700) > the framework package's own resolution cannot see a host-only package — the defect (line 161):

expect(() => createHostRequire(PACKAGE_ROOT).resolve(ORGANIZATIONS)).toThrow(/Cannot find module/);

with ORGANIZATIONS = '@objectstack/organizations', and NODE_PATH pointed at pnpm's hoisted store the way the pnpm bin shim does it (the file's own beforeAll reproduces that).

Measured

  • feat(organizations): bring the multi-organization runtime back to open core — the org-scoping registrar ships open, the licence gate stays in cloud (ADR-0132) #16215 (c677cda816, 2026-09-07) added packages/plugins/organizations — the package the pin uses as its example of a HOST-ONLY package — to this workspace. pnpm's hoisted store now holds node_modules/.pnpm/node_modules/@objectstack/organizations.
  • From packages/types, with the shim's NODE_PATH: require.resolve('@objectstack/organizations')packages/plugins/organizations/dist/index.js once that dist exists (measured after a full turbo run build); MODULE_NOT_FOUND while it does not (an exports target that is not on disk does not resolve). Without NODE_PATH it throws either way.
  • Local run after a full build (pnpm turbo run test test:repo --filter=@objectstack/types ...): Tests 1 failed | 570 passed (571), AssertionError: expected [Function] to throw an error, at that case.
  • Main's push run at 78e8485d67 (07:30Z): every Test Core shard green — types' shard did not build organizations (types#test dependsOn ^build covers types' own dependencies only), so the pin held there by build order, not by the property it asserts.

Why it is a card

The assertion is now true only when an unrelated package is unbuilt on the same runner. Any shard placement that co-locates a package whose build closure includes organizations (an example app, dogfood) with types makes the pin red with no source change — the failure will read as a flake on the PR that happened to draw that placement. And the sentence the pin states — that a framework package cannot see a host-only package — needs a package that IS host-only to state it; @objectstack/organizations stopped being one.

Suggested shape (owner's call)

Rename the example to a package name that is guaranteed absent from the workspace (a fixture-only scope, the way the file's HOISTED_ONLY fixture already works), or assert against a name the test itself proves absent first. Not a change to what the pin means; a change to its example.

Generated by Claude Code


Generated by Claude Code

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