Skip to content

fix(coding-agent): drop an exports entry with no module behind it - #3306

Merged
Yeachan-Heo merged 1 commit into
Yeachan-Heo:devfrom
10kH:fix/stale-package-export
Jul 28, 2026
Merged

fix(coding-agent): drop an exports entry with no module behind it#3306
Yeachan-Heo merged 1 commit into
Yeachan-Heo:devfrom
10kH:fix/stale-package-export

Conversation

@10kH

@10kH 10kH commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Found by checking every literal target in every package's exports / main / module / types / bin against the tree: 158 paths across the workspace, one broken pair.

Problem

"./extensibility/custom-commands/bundled/review": {
  "types":  "./src/extensibility/custom-commands/bundled/review/index.ts",
  "import": "./src/extensibility/custom-commands/bundled/review/index.ts"
}

That file does not exist — bundled/ contains only ci-green. The module was deleted by 56c8970c “refactor(coding-agent): trim bundled agents to four canonical role agents (#922)” and the exports entry 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-green has the identical shape and its file exists, so the pattern is right and only this entry is stale.

Guard

sdk-package-exports.test.ts already asserts specific subpaths are present or deliberately null. It now also walks exports, main, module, types and bin, skips null entries and wildcard patterns, and asserts every literal target resolves on disk.

Proof-first: restoring the stale entry fails that test, naming both offending mappings:

exports/./extensibility/custom-commands/bundled/review/types  -> ./src/.../review/index.ts
exports/./extensibility/custom-commands/bundled/review/import -> ./src/.../review/index.ts

Verification

bun run check in packages/coding-agent (whole-package biome + tsc): exit 0. sdk-package-exports.test.ts: 10 pass / 0 fail.

@Yeachan-Heo Yeachan-Heo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts does not exist anywhere in history after 56c8970c; bundled/ contains only ci-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/review entry, so the bug is real and reproducible on dev.
  • Built native deps and ran bun test packages/coding-agent/test/sdk-package-exports.test.ts at 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 null values and *-containing wildcard patterns before calling fs.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.

@10kH
10kH force-pushed the fix/stale-package-export branch 2 times, most recently from fc700ec to ccc17cc Compare July 27, 2026 13:43

@Yeachan-Heo Yeachan-Heo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-merged dev commits 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-base confirms this PR carries the same single commit both before and after the rebase; every additional commit between the two heads is an independently-merged dev commit (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.
@Yeachan-Heo
Yeachan-Heo force-pushed the fix/stale-package-export branch from ccc17cc to 806ce75 Compare July 28, 2026 01:48
@Yeachan-Heo
Yeachan-Heo merged commit 69d6541 into Yeachan-Heo:dev Jul 28, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants