fix(coding-agent): drop an exports entry with no module behind it - #3306
Conversation
Yeachan-Heo
left a comment
There was a problem hiding this comment.
Signed exact-head verdict — PR #3306 @ 83c77a1d95e45b5732de2f0ab5834861ed12afbc
Verdict: APPROVE
Scope: Removes the stale ./extensibility/custom-commands/bundled/review exports entry from packages/coding-agent/package.json (the target file was deleted in 56c8970c / #922 while the manifest entry was left behind), and adds a generic guard test that walks exports/main/module/types/bin, skips null and wildcard (*) targets, and asserts every literal target resolves on disk.
Verification performed:
- Confirmed
packages/coding-agent/src/extensibility/custom-commands/bundled/review/index.tsdoes not exist anywhere in history after56c8970c;bundled/contains onlyci-green. - Grepped the tree for other references to the removed subpath — none outside the now-fixed
package.json. - Confirmed the pre-fix manifest (current dev HEAD
1122e2ced) still contains the dangling./extensibility/custom-commands/bundled/reviewentry, so the bug is real and reproducible on dev. - Built native deps and ran
bun test packages/coding-agent/test/sdk-package-exports.test.tsat the PR head: 10 pass, 0 fail, including the new "resolves every declared export target to a file that exists" test. - New test correctly skips
nullvalues and*-containing wildcard patterns before callingfs.existsSync, matching the stated behavior. - CHANGELOG entry accurately describes the fix.
No functional risk: this only shrinks the declared public export surface to match what already worked at runtime (nothing imported the dead subpath). Dev-branch CI at the PR's exact base (1122e2ced) is terminal/green, and the PR's own CI is green.
fc700ec to
ccc17cc
Compare
Yeachan-Heo
left a comment
There was a problem hiding this comment.
Verdict: APPROVE — exact head ccc17cc25c503b10090c71e191efba38ab7dede0
Rebase-only refresh of the prior exact-head review at 83c77a1d95e45b5732de2f0ab5834861ed12afbc (APPROVE).
Checks performed:
- Content identity confirmed, not assumed:
diff <(git show 83c77a1d --format= -- packages/coding-agent/package.json packages/coding-agent/test/sdk-package-exports.test.ts) <(git show ccc17cc2 --format= -- packages/coding-agent/package.json packages/coding-agent/test/sdk-package-exports.test.ts)is empty — the PR's own commit is byte-for-byte identical to the version the prior review validated. CHANGELOG.md is intentionally excluded from this file set: its diff context shifted because independently-mergeddevcommits inserted new entries above the same insertion point, which is expected rebase churn, not a content change to this PR's own line. - Rebase mechanics verified:
git merge-baseconfirms this PR carries the same single commit both before and after the rebase; every additional commit between the two heads is an independently-mergeddevcommit (own-PR-numbered), not new work folded into this PR. - Exact-head terminal CI: 15 success / 0 failure / 0 pending / 5 skipped (total 20). No pending/queued checks remain.
Prior technical analysis still applies verbatim to this head.
—
[repo owner's gaebal-gajae (clawdbot) 🦞]
package.json advertised ./extensibility/custom-commands/bundled/review, mapping both types and import to ./src/extensibility/custom-commands/bundled/review/index.ts. That file does not exist: bundled/ contains only ci-green. The module was deleted by 56c8970 "refactor(coding-agent): trim bundled agents to four canonical role agents (Yeachan-Heo#922)" and the exports entry was left behind. No code imports the subpath, so nothing broke locally to signal the drift, but the published package declares a subpath that fails to resolve for consumers and export-surface linters flag it. The sibling entry is the control: ci-green has the identical shape and its file exists, so the pattern is right and only this entry is stale. Adds the general guard that would have caught it. sdk-package-exports.test.ts already asserts specific subpaths; it now also walks exports, main, module, types and bin, skipping nulls and wildcard patterns, and asserts every literal target resolves on disk. Restoring the stale entry fails that test with the two offending mappings named.
ccc17cc to
806ce75
Compare
Found by checking every literal target in every package's
exports/main/module/types/binagainst the tree: 158 paths across the workspace, one broken pair.Problem
That file does not exist —
bundled/contains onlyci-green. The module was deleted by56c8970c“refactor(coding-agent): trim bundled agents to four canonical role agents (#922)” and theexportsentry was left behind.Nothing in the tree imports the subpath, which is exactly why it survived: no import breaks to signal the drift. What it does affect is the published surface — the package declares a subpath that fails to resolve for consumers, and export-surface linters flag entries pointing at missing files.
The sibling is the control:
ci-greenhas the identical shape and its file exists, so the pattern is right and only this entry is stale.Guard
sdk-package-exports.test.tsalready asserts specific subpaths are present or deliberatelynull. It now also walksexports,main,module,typesandbin, skipsnullentries and wildcard patterns, and asserts every literal target resolves on disk.Proof-first: restoring the stale entry fails that test, naming both offending mappings:
Verification
bun run checkinpackages/coding-agent(whole-package biome + tsc): exit 0.sdk-package-exports.test.ts: 10 pass / 0 fail.