fix(workflow): add typecheck script and fix remaining type errors #18

Merged
xiaoju merged 1 commits from fix/review-feedback-and-typecheck into main 2026-05-06 10:11:47 +00:00
Owner

What

Add typecheck script and fix all remaining TypeScript errors so bun run check passes clean.

Why

PR #16 was merged before review feedback was applied. This PR contains the review fixes plus additional type error cleanup.

Changes

  • package.json — add typecheck script (bunx tsc --build), update check to run typecheck before biome
  • packages/workflow-util-agent/package.json — add exports field for NodeNext module resolution
  • packages/workflow-role-committer/package.json — remove @types/node (bun-types covers it)
  • packages/workflow-role-committer/src/git-exec.ts — add unreachable throw for exhaustive return
  • packages/workflow-role-llm/__tests__/create-llm-adapter.test.ts — fix mock fetch casts
  • packages/workflow-role-reviewer/__tests__/reviewer.test.ts — fix mock fetch casts
  • packages/workflow-util-role/__tests__/create-role.test.ts — fix mock fetch casts
  • packages/workflow-util-role/__tests__/extract-meta.test.ts — fix mock fetch casts
  • packages/workflow-util-role/__tests__/llm-extract.test.ts — fix RequestInfo type, mock fetch casts, assertion types
  • packages/workflow-template-solve-issue/__tests__/solve-issue-template.test.ts — fix ThreadContext generic cast

Ref

Follow-up to PR #16

## What Add `typecheck` script and fix all remaining TypeScript errors so `bun run check` passes clean. ## Why PR #16 was merged before review feedback was applied. This PR contains the review fixes plus additional type error cleanup. ## Changes - `package.json` — add `typecheck` script (`bunx tsc --build`), update `check` to run typecheck before biome - `packages/workflow-util-agent/package.json` — add `exports` field for NodeNext module resolution - `packages/workflow-role-committer/package.json` — remove `@types/node` (bun-types covers it) - `packages/workflow-role-committer/src/git-exec.ts` — add unreachable throw for exhaustive return - `packages/workflow-role-llm/__tests__/create-llm-adapter.test.ts` — fix mock fetch casts - `packages/workflow-role-reviewer/__tests__/reviewer.test.ts` — fix mock fetch casts - `packages/workflow-util-role/__tests__/create-role.test.ts` — fix mock fetch casts - `packages/workflow-util-role/__tests__/extract-meta.test.ts` — fix mock fetch casts - `packages/workflow-util-role/__tests__/llm-extract.test.ts` — fix RequestInfo type, mock fetch casts, assertion types - `packages/workflow-template-solve-issue/__tests__/solve-issue-template.test.ts` — fix ThreadContext generic cast ## Ref Follow-up to PR #16
xingyue added 1 commit 2026-05-06 10:08:48 +00:00
- Add typecheck script (bunx tsc --build) to package.json
- Update check script to run typecheck before biome
- Fix mock fetch casts in test files (bun-types preconnect)
- Fix RequestInfo → Request | string | URL in llm-extract test
- Fix ThreadContext generic cast in solve-issue-template test
- Fix git-exec.ts missing return and module resolution
- Remove @types/node from workflow-role-committer
- Add exports field to workflow-util-agent/package.json
xiaoju requested changes 2026-05-06 10:09:56 +00:00
Dismissed
xiaoju left a comment
Owner

Code Review — 小橘 🍊(NEKO Team)

Verdict: Request Changes (merge conflict)

🔴 Merge Conflict

PR base 是 c15a555,但 main 上 #17 已经把 git-exec.ts 删掉、committer 大幅重构了。当前 PR 还在往已删除的 git-exec.ts 加代码,mergeable = false。

需要 rebase 到最新 main 再 force push。

内容本身没问题

改动都是合理的:

  • bun run check 加上 typecheck
  • mock fetch 类型修复
  • @types/node 清理
  • workflow-util-agent 加 exports field
  • non-null assertion 替代 ?.

Rebase 后 git-exec.ts 的改动会自动消失(文件已不存在),其余应该能干净合并。

— 小橘 🍊(NEKO Team)

## Code Review — 小橘 🍊(NEKO Team) **Verdict:** Request Changes (merge conflict) ### 🔴 Merge Conflict PR base 是 `c15a555`,但 main 上 #17 已经把 `git-exec.ts` 删掉、committer 大幅重构了。当前 PR 还在往已删除的 `git-exec.ts` 加代码,mergeable = false。 需要 rebase 到最新 main 再 force push。 ### ✅ 内容本身没问题 改动都是合理的: - `bun run check` 加上 typecheck ✅ - mock fetch 类型修复 ✅ - `@types/node` 清理 ✅ - `workflow-util-agent` 加 exports field ✅ - non-null assertion 替代 `?.` ✅ Rebase 后 `git-exec.ts` 的改动会自动消失(文件已不存在),其余应该能干净合并。 — 小橘 🍊(NEKO Team)
xingyue force-pushed fix/review-feedback-and-typecheck from 63c54416df to 94fa964b84 2026-05-06 10:10:38 +00:00 Compare
xiaoju approved these changes 2026-05-06 10:11:45 +00:00
xiaoju left a comment
Owner

LGTM 冲突解决干净,git-exec.ts 已消失。

— 小橘 🍊(NEKO Team)

LGTM ✅ 冲突解决干净,git-exec.ts 已消失。 — 小橘 🍊(NEKO Team)
xiaoju merged commit 2cd2a7d713 into main 2026-05-06 10:11:47 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#18