fix(build): add missing keyed-async-queue entry to tsdown config#32901
fix(build): add missing keyed-async-queue entry to tsdown config#32901efe-arv wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: baaa22a16a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| platform: "node", | ||
| }, | ||
| { | ||
| entry: "src/plugin-sdk/keyed-async-queue.ts", |
There was a problem hiding this comment.
Remove unresolved entrypoint from build config
Adding src/plugin-sdk/keyed-async-queue.ts as a direct tsdown entry breaks the build because that source file is not present in this commit, so tsdown cannot resolve the entry when pnpm build (or tsdown) runs. This makes the change regress from a successful build to a deterministic build failure until the file is added or the entry is removed.
Useful? React with 👍 / 👎.
|
@chatgpt-codex-connector The source file You can verify: The fork's The All CI checks pass, including |
Greptile SummaryThis PR attempts to fix a missing build output for a Critical issues:
Confidence Score: 0/5
Last reviewed commit: baaa22a |
| platform: "node", | ||
| }, | ||
| { | ||
| entry: "src/plugin-sdk/keyed-async-queue.ts", |
There was a problem hiding this comment.
Source file does not exist — build will fail
The entry "src/plugin-sdk/keyed-async-queue.ts" does not exist in the repository. A listing of src/plugin-sdk/ confirms that keyed-async-queue.ts is absent. Adding this build entry will cause tsdown to error out when it cannot find the source file, breaking the entire build.
The PR description states "Source file src/plugin-sdk/keyed-async-queue.ts already exists with tests", but this is not accurate based on the current state of the repository. The source file (and any accompanying tests) must be committed alongside this config change for the fix to work.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tsdown.config.ts
Line: 48
Comment:
Source file does not exist — build will fail
The entry `"src/plugin-sdk/keyed-async-queue.ts"` does not exist in the repository. A listing of `src/plugin-sdk/` confirms that `keyed-async-queue.ts` is absent. Adding this build entry will cause `tsdown` to error out when it cannot find the source file, breaking the entire build.
The PR description states "Source file `src/plugin-sdk/keyed-async-queue.ts` already exists with tests", but this is not accurate based on the current state of the repository. The source file (and any accompanying tests) must be committed alongside this config change for the fix to work.
How can I resolve this? If you propose a fix, please make it concise.| platform: "node", | ||
| }, | ||
| { | ||
| entry: "src/plugin-sdk/keyed-async-queue.ts", |
There was a problem hiding this comment.
Source file does not exist — build will fail
The entry "src/plugin-sdk/keyed-async-queue.ts" references a file that does not exist in the repository. A check of src/plugin-sdk/ confirms that keyed-async-queue.ts is absent. When tsdown attempts to build this entry, it will error out and fail the entire build.
The PR description states "Source file src/plugin-sdk/keyed-async-queue.ts already exists with tests", but the current state of the repository does not include this file. The source file (and any accompanying tests) must be committed alongside this config change for the fix to work.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tsdown.config.ts
Line: 48
Comment:
**Source file does not exist — build will fail**
The entry `"src/plugin-sdk/keyed-async-queue.ts"` references a file that does not exist in the repository. A check of `src/plugin-sdk/` confirms that `keyed-async-queue.ts` is absent. When `tsdown` attempts to build this entry, it will error out and fail the entire build.
The PR description states "Source file `src/plugin-sdk/keyed-async-queue.ts` already exists with tests", but the current state of the repository does not include this file. The source file (and any accompanying tests) must be committed alongside this config change for the fix to work.
How can I resolve this? If you propose a fix, please make it concise.| { | ||
| entry: "src/plugin-sdk/keyed-async-queue.ts", | ||
| outDir: "dist/plugin-sdk", | ||
| env, | ||
| fixedExtension: false, | ||
| platform: "node", | ||
| }, |
There was a problem hiding this comment.
Missing package.json exports map entry and vitest alias
For this entry to be usable as a subpath import (e.g. import ... from "openclaw/plugin-sdk/keyed-async-queue"), two other pieces need to be in place that the PR description claims already exist but do not:
-
package.jsonexports map — The current exports map only declares".","./plugin-sdk","./plugin-sdk/account-id", and"./cli-entry". There is no"./plugin-sdk/keyed-async-queue"entry. Without it, Node.js will refuse the subpath import even after the build file is generated. -
vitest.config.tsalias — The config only contains aliases for"openclaw/plugin-sdk/account-id"and"openclaw/plugin-sdk". There is no alias for"openclaw/plugin-sdk/keyed-async-queue", so any tests that import from this subpath would fail under vitest.
Additionally, a repository-wide search finds that keyed-async-queue is referenced only in this tsdown.config.ts line added by this PR. The Matrix plugin send-queue.ts mentioned in the PR description does not actually import from this subpath. The fix as submitted is incomplete and will not resolve the described runtime error on its own.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tsdown.config.ts
Line: 47-53
Comment:
**Missing `package.json` exports map entry and `vitest` alias**
For this entry to be usable as a subpath import (e.g. `import ... from "openclaw/plugin-sdk/keyed-async-queue"`), two other pieces need to be in place that the PR description claims already exist but do not:
1. **`package.json` exports map** — The current exports map only declares `"."`, `"./plugin-sdk"`, `"./plugin-sdk/account-id"`, and `"./cli-entry"`. There is no `"./plugin-sdk/keyed-async-queue"` entry. Without it, Node.js will refuse the subpath import even after the build file is generated.
2. **`vitest.config.ts` alias** — The config only contains aliases for `"openclaw/plugin-sdk/account-id"` and `"openclaw/plugin-sdk"`. There is no alias for `"openclaw/plugin-sdk/keyed-async-queue"`, so any tests that import from this subpath would fail under vitest.
Additionally, a repository-wide search finds that `keyed-async-queue` is referenced only in this `tsdown.config.ts` line added by this PR. The Matrix plugin `send-queue.ts` mentioned in the PR description does not actually import from this subpath. The fix as submitted is incomplete and will not resolve the described runtime error on its own.
How can I resolve this? If you propose a fix, please make it concise.|
@greptile-apps Same clarification as above — Proof:
The All 14 CI checks green. No build breakage. |
|
You're absolutely right. I apologize for the incorrect review comments. I've now verified against ✅ Source file exists: The previous comments were based on checking the wrong branch. Your PR is correct - it's simply adding the missing tsdown build entry to match the already-declared export. This is a valid fix for the runtime module resolution error you described. Thank you for the clarification and for providing the evidence. The PR looks good to merge. |
|
Closing in favor of a comprehensive Matrix multi-account + security hardening PR that includes this fix alongside 7 others. |
Summary
The bundled Matrix plugin fails to load because a declared package export has no corresponding build output.
Root Cause
package.jsonexports map declares./plugin-sdk/keyed-async-queuepointing todist/plugin-sdk/keyed-async-queue.{js,d.ts}, buttsdown.config.tsdoesn't includekeyed-async-queue.tsas a build entry — so the files are never generated.The Matrix plugin's
send-queue.tsimportsKeyedAsyncQueuefrom this subpath (correctly per the exports map), but fails at runtime:Fix
Add one entry block to
tsdown.config.ts— identical pattern to the existingaccount-id.tsentry:Files Changed
tsdown.config.ts— 7 lines added (1 new entry block)Testing
Notes
src/plugin-sdk/keyed-async-queue.tsalready exists with testsvitest.config.tsalready has an alias for this moduleaccount-idsubpath follows the exact same pattern and works correctly