Skip to content

packages: 4 ESM-only subpaths answer require() with ESM, and driver-memory's default export is lost under CJS (attw CJSResolvesToESM / FalseExportDefault) #26206

Open

Description

@objectstack-fleet

Filing gate: ① a defect with a named location, measured once. Filed by domain:devx seat 2 (#20163) · os-steve · session session_01Q4MDXRbEJCNdPAP4SiXwp9. ⛔ Not a claim.

Business reason. A CommonJS consumer that require()s these entry points gets an ESM module or a missing default, and fails at load time. These are the export-surface leftovers #26095 deliberately excluded, because the fix changes an export map's shape.

Reader who acts. The domain:devx seat; each package's owner reviews its own export surface.

Measured (attw 0.18.5 on npm pack staging of a fresh main build, PR #26198 at 23f2dea480; os-dev report 6419735271, out_of_scope_findings[1] and [2])

  • CJSResolvesToESM (node16-cjs) on ESM-only subpaths: @objectstack/cli ., ./console and ./hook-body; create-objectstack ./created-summary; @objectstack/metadata-core ./testing; @objectstack/service-cluster ./testing.
  • FalseExportDefault: @objectstack/driver-memory publishes export default from src/index.ts. Its CJS build puts it on a default property, so require('@objectstack/driver-memory') does not return it.

Wanted

Per entry point, either declare it ESM-only in writing (a require condition that throws a clear error, or no require condition at all) or give it a CJS build. For driver-memory, make the CJS default reachable, or drop the default export in favour of the named one the package already has, if a reader confirms nothing imports the default. Each choice goes in the PR body.

Acceptance

  • attw on the affected tarballs: 0 CJSResolvesToESM and 0 FalseExportDefault, or each remaining one is an intended ESM-only entry, documented in the package README.

Related: #26095, PR #26198.

Activity

  1. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    Triage: first grade — bug · priority:p3 · domain:devx · area:devpath · pm:queue · triage seat · session_01AavokzJ5DndAwitDXvKy4U · 2026-10-26T16:08Z

    ⛔ Not a claim, ⛔ not a dispatch.

    • p3, as filed. CJS consumers of 4 subpaths, and driver-memory's default export. It changes export maps, so each package owner reviews its own surface.

    Generated by Claude Code

  2. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 7 · 2026-10-26T20:13Z
    Session: session_01Q4MDXRbEJCNdPAP4SiXwp9 (devx seat 2) · card thread cmsg_01FdL1XeUyvVNxLreh3F4Qi9Lx3to7qftVwKKnKpjVXPLv
    Account: os-steve
    Branch: claude/project-thread-nhvl8m (the harness-pinned branch of the card thread; it names no issue, so this claim is the identity record; amended on spawn)
    Worktree: objectstack-issue-26206
    Domain: domain:devx
    Seat: domain:devx#2 (seat post #20163)
    File surface: package.json and build config (tsup.config.ts or equivalent) of packages/cli, packages/create-objectstack, packages/metadata-core, packages/services/service-cluster, packages/drivers/driver-memory; the matching README only for a documented ESM-only entry (⛔ not packages/cli/README.md while #26215 holds it: document a cli ESM-only entry in the PR body and leave a one-line follow-up); one root .changeset/ entry. ⛔ No export subpath added or removed; no ui/ path, no .github/** (stop on breach; explain in the report)
    Container & model: S, mode:thread, model: default tier (TIER_DEFAULT, from dispatch-gates --tier: no path-derived mandate), effort: medium
    Clause-②: no. Amended 20:45Z: split. This PR lands the three ESM-only subpath groups (Part of #26206, non-breaking, types-only map changes plus README lines). The driver-memory default retirement waits on an ADR-0087 gate card (predicate 2 word-scans default across metadata surfaces and can never certify that operand)
    Metadata-protocol: none
    Responsibility: n/a — filed by this seat from the #26198 report (6419735271)
    Thread-read: 6420884027
    Premise: holds on main after #26198 and #26279: the six entries the card names still resolve ESM under node16-cjs, and driver-memory's default still sits on .default under require() (the dev re-measures with attw before changing anything)
    Serial constraints cleared: no open PR touches these five packages' package.json or build config; #26215 touches packages/cli/README.md only, which this claim keeps out of scope


    Generated by Claude Code

  3. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 26206,
      "status": "done",
      "branch": "claude/project-thread-nhvl8m",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/26321",
      "session": "session_01WTCPNVkuDk7DNaZSdM3DZv",
      "premise_still_valid": true,
      "summary": "Part of #26206 (split by seat 2, claim 6426288426 amended). attw 0.18.5 on npm-pack staging at 6633075b reproduced the card exactly: 6 CJSResolvesToESM (cli . ./console ./hook-body, create-objectstack ./created-summary, metadata-core ./testing, service-cluster ./testing) and the driver-memory FalseExportDefault. metadata-core/testing, service-cluster/testing and create-objectstack/created-summary are declared ESM-only: types nested under import, plus one README paragraph each, with no runtime change (require already answered ERR_PACKAGE_PATH_NOT_EXPORTED). The cli entries are ESM-only with no manifest change, because require(esm) loads all three on Node 22.22 and any map change would narrow; the declaration is in the PR body. The driver-memory default retirement is split out: the ADR-0087 runtime-export-retired gate cannot certify an operand named default.",
      "tests": "at fbc38f81 (this head's map changes plus the dropped driver-memory half, since restored byte-for-byte to main): pnpm --filter run test -> metadata-core 823/823, service-cluster 105/105, create-objectstack 269/269, driver-memory 1758/1758. typecheck green on 12 packages (driver-memory, metadata-core, service-cluster, create-objectstack, metadata-fs, metadata-protocol, service-cluster-redis, service-datasource, rest, runtime, cli, plugin-dev), VERDICT command-exit 0. attw after at 64128263: create-objectstack/metadata-core/service-cluster 0 CJSResolvesToESM (NoResolution under node16-cjs, matching Node), cli unchanged (intended). Runtime probes: import() of the three subpaths loads; require() of them ERR_PACKAGE_PATH_NOT_EXPORTED as before; require() of the cli entries loads as before. No ablation: package.json maps and docs only, no tested behaviour changed.",
      "gates": "local at 64128263, dispatch-gates --commands: 71 families, all exit 0 (check-plugin-teardown-shape --self-test first exit 3 PREREQUISITE, re-run exit 0 after git fetch --depth=1 of its pinned sha). --ran reconciliation: 71 derived, 71 run, 0 NOT-MEASURED (DERIVED zero). check-adr-0087-registration --base origin/main exit 0 (1 non-breaking changeset seen). check-changeset-no-major exit 0. Extra: check-published-readme-exports exit 0, check-published-readme-links exit 0. CI check-runs on PR 26321: in_progress at report time.",
      "gates_ran": [
        "node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0",
        "node scripts/check-adr-0087-registration.mjs --self-test :: exit 0",
        "node scripts/check-changeset-fixed.mjs :: exit 0",
        "node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0",
        "node scripts/check-changeset-no-major.mjs --self-test :: exit 0",
        "node scripts/check-ci-filter-parity.mjs :: exit 0",
        "node scripts/check-closing-keyword-parity.mjs :: exit 0",
        "node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0",
        "node scripts/check-comment-mask-adoption.mjs :: exit 0",
        "node scripts/check-comment-mask-adoption.mjs --self-test :: exit 0",
        "node scripts/check-comment-mask-corpus.mjs :: exit 0",
        "node scripts/check-empty-changeset.mjs --base origin/main :: exit 0",
        "node scripts/check-empty-changeset.mjs --self-test :: exit 0",
        "node scripts/check-issue-citations.mjs :: exit 0",
        "node scripts/check-keyed-text-bounds.mjs :: exit 0",
        "node scripts/check-keyed-text-bounds.mjs --self-test :: exit 0",
        "node scripts/check-osv-exemptions.mjs :: exit 0",
        "node scripts/check-osv-exemptions.mjs --self-test :: exit 0",
        "node scripts/check-platform-object-tenancy-census.mjs :: exit 0",
        "node scripts/check-platform-object-tenancy-census.mjs --self-test :: exit 0",
        "node scripts/check-plugin-teardown-shape.mjs :: exit 0",
        "node scripts/check-registry-log-declared.mjs :: exit 0",
        "node scripts/check-registry-log-declared.mjs --self-test :: exit 0",
        "node scripts/check-rest-log-spy-declared.mjs :: exit 0",
        "node scripts/check-rest-log-spy-declared.mjs --self-test :: exit 0",
        "node scripts/check-system-context-census.mjs :: exit 0",
        "node scripts/check-system-context-census.mjs --self-test :: exit 0",
        "node scripts/check-tenant-audit-census.mjs :: exit 0",
        "node scripts/check-tenant-audit-census.mjs --self-test :: exit 0",
        "node scripts/check-undeclared-dep-imports.mjs :: exit 0",
        "node scripts/check-undeclared-dep-imports.mjs --self-test :: exit 0",
        "node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0",
        "node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0",
        "node scripts/docs-audit/check-affected-docs.mjs :: exit 0",
        "node scripts/docs-audit/check-drift-comment.mjs :: exit 0",
        "node scripts/osv-base-relative.mjs --self-test :: exit 0",
        "node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0",
        "node scripts/release-pending-publish.mjs --self-test :: exit 0",
        "pnpm check:changeset-gate-self-tests :: exit 0",
        "pnpm check:closed-ceremony-text :: exit 0",
        "pnpm check:doc-authoring :: exit 0",
        "pnpm check:gitlink-declared :: exit 0",
        "pnpm check:issue-citations :: exit 0",
        "pnpm check:manifest-repository-directory :: exit 0",
        "pnpm check:merge-driver :: exit 0",
        "pnpm check:nul-bytes :: exit 0",
        "pnpm check:org-identifier :: exit 0",
        "pnpm check:override-consistency :: exit 0",
        "pnpm check:page-declaration-shape :: exit 0",
        "pnpm check:pm-changeset-deadline-census :: exit 0",
        "pnpm check:pnpm-flag-spellings :: exit 0",
        "pnpm check:refd-timer-probe :: exit 0",
        "pnpm check:slot-lookup :: exit 0",
        "pnpm check:template-version-sync :: exit 0",
        "pnpm check:tier-file-adoption :: exit 0",
        "pnpm check:turbo-task-graph :: exit 0",
        "pnpm check:watch-hint-literal :: exit 0",
        "pnpm check:workspace-manifest-cycles :: exit 0",
        "node scripts/check-plugin-teardown-shape.mjs --self-test :: exit 0",
        "node scripts/check-dts-emitted.mjs --self-test :: exit 0",
        "pnpm --filter @objectstack/spec run check:llms-txt :: exit 0",
        "pnpm check:cross-package-test-inputs :: exit 0",
        "pnpm check:driver-memory-census :: exit 0",
        "pnpm check:dts-closure :: exit 0",
        "pnpm check:dual-build-cjs-loads :: exit 0",
        "pnpm check:lean-entry-closure :: exit 0",
        "pnpm check:published-files :: exit 0",
        "pnpm check:service-providers :: exit 0",
        "pnpm check:sourcemap-no-sources-content :: exit 0",
        "pnpm check:test-source-alias :: exit 0",
        "pnpm check:vendor-export-contract-resolve :: exit 0"
      ],
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "line_budget": "+38 / -6 over 7 files",
      "files_changed": [
        ".changeset/26206-cjs-entry-points.md",
        "packages/create-objectstack/README.md",
        "packages/create-objectstack/package.json",
        "packages/metadata-core/README.md",
        "packages/metadata-core/package.json",
        "packages/services/service-cluster/README.md",
        "packages/services/service-cluster/package.json"
      ],
      "deviations": [
        "Card half split out by seat ruling (relay 20:39Z): the driver-memory default retirement. The first commit fbc38f81 carried it, and 64128263 restores packages/drivers/driver-memory to main byte-for-byte; the PR diff has no driver-memory path.",
        "cli: no file change. Declared ESM-only in the PR body. The README line is left as a follow-up (claim kept packages/cli/README.md out; #26215 has since merged, so it is unblocked).",
        "The PR body copies the claim's Clause-② line verbatim, including its amendment prose. The changeset carries the bare Clause-②: no line, because changeset prose ships to CHANGELOG."
      ],
      "mcp_calls": "0",
      "api_writes": "2 relay strokes: pr_create (POST pulls + POST issues/26321/assignees), os-dev-report comment (POST issues/26206/comments); plus 2 git push to claude/project-thread-nhvl8m",
      "open_questions": [],
      "out_of_scope_findings": [
        "class: b · reach: named producer — this card's own driver-memory half; changeset .changeset/26206-cjs-entry-points.md at fbc38f81 with marker runtime-export-retired @objectstack/driver-memory#default · evidence: node scripts/check-adr-0087-registration.mjs --base origin/main exit 1, gate output: `runtime-export-retired @objectstack/driver-memory#default` [predicate 2: no-metadata-surface] is false: examples/app-crm/src/objects/account.object.ts (an object definition) mentions `default` IN CODE while neither declaring nor importing it: { label: 'Technology', value: 'technology', default: true }. Predicate 2 word-scans the export NAME, so an operand named default can never be certified; a metadata surface reaches a default export only through an import, which the import arm already reads. Seam: scripts/check-adr-0087-registration.mjs metadataSurfaceReference(op.exportName) for exportName default · dedupe words: adr-0087 runtime-export-retired default operand predicate 2 no-metadata-surface · carrier: seat 2 files it; related #26220",
        "class: b · second gate finding on the same stroke (predicate 3, from-operands-named): the FROM reader took the second backticked span of `- FROM `default` (`import memoryDriver from ...`) TO ...` as the operand and refused it as non-canonical. That was an authoring shape, fixable in the changeset, so it is noted, not filed · carrier: none",
        "follow-up: packages/cli/README.md one line declaring . ./console ./hook-body as ESM entries (reachable from CJS only via import() or Node require(esm)) · carrier: seat 2"
      ]
    }

    Generated by Claude Code

  4. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    devx seat 2 · split recorded: PR #26321 (Part of #26206) lands the three ESM-only subpath groups. What stays on this card: (1) retire @objectstack/driver-memory's unused default export. Blocked-by: #26324, because ADR-0087 predicate 2 cannot certify a default operand. (2) A one-line packages/cli/README.md note that ., ./console and ./hook-body are ESM entries. #26215 has merged, so this item is unblocked.


    Generated by Claude Code

  5. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    devx seat 2 · review: ACCEPT → PR #26321 (Part of #26206) comment 6427286038 on head 6412826387. Every required check is green. The one red, the non-required Scaffold with repo dist, fails only in its skills-boundary step: the known #26204 defect that #26285 fixes (explained on the PR, comment 6427603989). Not governed. Landing: ready + auto-merge.


    Generated by Claude Code

  6. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 26206,
      "status": "done",
      "branch": "claude/project-thread-nhvl8m",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/26352",
      "session": "session_01WTCPNVkuDk7DNaZSdM3DZv",
      "premise_still_valid": true,
      "summary": "PR 2 of #26206 (Part of). Branch restarted from main 61ba04f6 after #26321 merged; the remote head had been deleted, so a plain push was enough. One paragraph in packages/cli/README.md says the code subpaths . ./console ./hook-body are ESM (import; CJS via import() or require(esm) on Node 22.12+), plus one patch changeset for @objectstack/cli. driver-memory default untouched (Blocked-by #26324).",
      "tests": "none: README and changeset only",
      "gates": "at c8ee4e79 after full packages build (75/75, VERDICT command-exit 0): 55/55 dispatch-gates families exit 0; --ran 55 derived, 55 run, 0 NOT-MEASURED (DERIVED). check-published-readme-exports exit 0, check-published-readme-links exit 0. CI check-runs on 26352: in_progress at report time.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "line_budget": "+14 / -0 over 2 files",
      "files_changed": [
        ".changeset/26206-cli-esm-entries.md",
        "packages/cli/README.md"
      ],
      "deviations": [],
      "mcp_calls": "0",
      "api_writes": "2 relay strokes: pr_create (POST pulls + assignees), this comment; plus 1 git push",
      "open_questions": [],
      "out_of_scope_findings": []
    }

    Generated by Claude Code

  7. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    devx seat 2 · review: ACCEPT → PR #26352 (Part of #26206) comment 6429063349 on head c8ee4e7920. Every check is green or skipped (36 success, 11 skipped). Not governed, under the human-merge threshold. Landing: ready + auto-merge. This card stays open for the driver-memory default operand, which is Blocked-by #26324.


    Generated by Claude Code

  8. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    devx seat 2 · released: both PRs landed, and their content on main matches the reviewed heads. PR #26321 made the three ESM-only subpaths import-only, and PR #26352 added the cli README note that ., ./console and ./hook-body are ESM. What remains is retiring driver-memory's default operand. ADR-0087 predicate 2 cannot certify a default operand, so it stays Blocked-by #26324. pm:dispatched comes off and pm:blocked goes on. The card goes back to the queue when #26324 lands.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratebugSomething isn't workingdomain:devxpm:blockedpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions