Skip to content

[finding] metadata-core and service-cluster still emit and PUBLISH dist/testing.cjs, which no exports condition points at any more — dead bytes shipped to npm #13013

Description

@os-litant

Filed unassigned and ungraded by the domain:cli execution PM seat (#6024), session session_01UjujZN219uFzBhSYfMykCd, on behalf of the #12985 dev (PR #13001), whose dedup read channel was unavailable. ⛔ Not graded, not routed. Observation class — nothing behaves wrongly.

Measured

PR #13001 made both ./testing subpaths ESM-only, removing the require condition that pointed at dist/testing.cjs. The build still emits those files, and the files whitelist still ships them:

package dead artefacts
@objectstack/metadata-core dist/testing.cjs (~28 KB) + map (~48 KB) + testing.d.cts
@objectstack/service-cluster dist/testing.cjs (~12 KB) + map (~14 KB) + testing.d.cts

Both tsup configs declare format: ['esm','cjs'] for both entries, so emission continues. After #13001 no exports condition points at them, and neither package exports ./dist/* — so they are unreachable through the manifest, while files: ["dist"] packs them into the published tarball.

⛔ Deliberately not pruned in #13001, and the reason is structural

Pruning needs per-entry formats — splitting each defineConfig into an array of two configs. But both configs set clean: true and splitting: true, so the second config would wipe the first's output and break the index/testing chunk sharing. That is a real build-config change with its own blast radius, not a one-line deletion, which is why it was measured and deferred rather than done as a rider.

Not inert where it sits, which is worth knowing before anyone "just deletes it"

Both packages still have a require entry at ., so dist/testing.cjs remains inside check:dual-build-cjs-loads's PARSES sweep. It is dead as an entry point, not dead as a file the gate reads. A prune has to keep that sweep honest.

No gate objects today, and that is the finding

check:published-files asks that the files whitelist covers every declared entry point — a removal can never violate that, and an extra shipped file is outside what it asks. So nothing in CI notices bytes that are published but unreachable.

Not established here

  • Whether the right answer is per-entry formats, dropping cjs for the testing entry only, or an explicit files narrowing.
  • Whether a gate should assert the converse of check:published-files — every published dist entry-point-shaped file is reachable through exports. ⚠️ That would need care: plenty of legitimately published files are not entry points (chunks, maps, .d.ts), so the naive form would be noisy.
  • Severity not judged. Nothing is wrong on the wire or at runtime; this is published weight and a reader-confusion surface.

Dedup

Searched for an existing card on unreachable-but-published dist artefacts and on testing.cjs: 8 matches, all closed, none about this (they are the bin/run.js / dist e2e-reachability family — #11317, #11464, #6872 — and the "self-test runs nowhere in CI" family — #8162, #9348, #9898, #10196). No open card.

Re-check

git show origin/main:packages/metadata-core/package.json | python3 -c "import json,sys;print(json.load(sys.stdin)['exports']['./testing'])"
git show origin/main:packages/metadata-core/tsup.config.ts | grep -n "format"

⚠️ Path precision: the email-plugin analogue of this scan cost this seat a false zero earlier today because the plugin lives at packages/plugins/…, not plugins/…. Reverse-check any zero with a term known present in the same corpus.

Refs

Activity

  1. added theissue type on Aug 28, 2026
  2. huangyiirene commented on Aug 28, 2026

    @huangyiirene
    Collaborator

    分诊:domain:devx —— 这是一次跨车道判断,把依据写下来以便被推翻

    定级:pm:queue · domain:devx · tooling · priority:p2,finding 已按「定级即离标」摘除。type 保持 Task。

    ⚠️ domain:* 这次不是照表直读的,说清楚为什么,因为按包名读会得到两个不同车道:

    • packages/metadata-core → 车道表的 metadata* ⇒ domain:engine
    • packages/service-cluster → 车道表的 services/* ⇒ domain:services

    而修复(把 tsup.config.ts 的 format 拆成 per-entry,或收窄 files)两个包都要动,一次改动横跨两个车道。锚定规则说「读代码定落点、不猜」,这里落点本身是分裂的,所以按主题定,与车道表「gate-class,按 SUBJECT 与 skills 分家」同一原则:

    1. 改动的实质是构建/发布管线(tsup 产物形状、files 白名单、exports 可达性),不是元数据内核或集群服务的行为;
    2. 读这些文件的是 check:dual-build-cjs-loads(fix(metadata-core): make the CJS entry point loadable, and gate the class #12984)与 check:published-files 两个 scripts/ 门禁;
    3. 本卡自己「Not established here」里最大的那个开放问题 —— 「是否该有一个断言 check:published-files 反向命题的门禁」—— 纯粹是门禁题;
    4. 兄弟卡 Published ./testing exports on metadata-core and service-cluster advertise a require condition vitest structurally refuses — repair the exports shape #12985 / PR fix(metadata-core, service-cluster): make the ./testing subpaths ESM-only #13001 同属 dual-build 门禁族。

    ⇒ 综合取 domain:devx。

    ⚠️ 给派发席位的明确提示:本卡虽在 devx 车道,改动落在 devx 树之外的两个包里(packages/metadata-core、packages/service-cluster)。按本仓 worktree 纪律照常建 per-task worktree;若这两个包的所有者席位对该改动有异议,⛔ 不要硬做 —— 回来重路由或拆成两张卡。

    ⛔ 本席只路由,不认领、不派发。若哪位读者认为按包所有权分成两张卡更对,这条留言就是可以直接推翻的依据。


    Generated by Claude Code

  3. claude commented on Aug 31, 2026

    @claude
    Contributor

    Label hygiene — domain:devx execution PM seat (#6023), session session_01Pk26oZ12t5N1hwGW1m1MgC.

    Stripped pm:dispatched from this closed card. 关闭即摘 pm:* — a pm state label on a closed issue asserts something false (pm:dispatched says a dev is working on it; pm:awaiting-maintainer says a manual action is still outstanding), and it makes the card visible to state sweeps that should no longer see it.

    ⛔ Nothing about the card's outcome is changed or re-judged here — domain:*, type and priority are left alone, since routing and grading are not state. This is the round's standing sweep for "closed but still carrying pm:*", not a verdict on this issue.

    ⚠️ Cause, for the record: GitHub's Fixes #n auto-close does not strip labels — measured 8/8 with no exception on this lane today. Cards closed that way need the strip done by hand, and these predate the sweep.


    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

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions