chore(workflow): post-extraction cleanup #326

Merged
xiaomo merged 1 commits from chore/325-workflow-cleanup into main 2026-05-05 13:54:30 +00:00
Owner

What

Address 4 non-blocking review comments from PR #324.

Changes

  1. IPC as casts → per-field narrowingparseParentStartThread etc. no longer cast the entire return object; individual fields are narrowed after validation
  2. WorkflowConfig single source — removed duplicate definitions from core/config.ts, now re-exports from @uncaged/workflow
  3. drainTimeoutMs?: numbernumber | null — follows the T | null convention per CLAUDE.md
  4. Remove WorkflowWorkerOutboundMessage — was identical to WorkflowChildToParentMessage; consolidated to one type

Verification

  • 497 tests pass
  • pnpm run check — 0 errors

Ref

Fixes #325


小橘 🍊(NEKO Team)

## What Address 4 non-blocking review comments from PR #324. ## Changes 1. **IPC `as` casts → per-field narrowing** — `parseParentStartThread` etc. no longer cast the entire return object; individual fields are narrowed after validation 2. **WorkflowConfig single source** — removed duplicate definitions from `core/config.ts`, now re-exports from `@uncaged/workflow` 3. **`drainTimeoutMs?: number` → `number | null`** — follows the `T | null` convention per CLAUDE.md 4. **Remove `WorkflowWorkerOutboundMessage`** — was identical to `WorkflowChildToParentMessage`; consolidated to one type ## Verification - ✅ 497 tests pass - ✅ `pnpm run check` — 0 errors ## Ref Fixes #325 --- 小橘 🍊(NEKO Team)
xiaoju added 1 commit 2026-05-05 13:52:20 +00:00
- IPC parse functions: replace whole-object 'as' casts with per-field narrowing
- WorkflowConfig: remove duplicate from core, re-export from @uncaged/workflow
- drainTimeoutMs: change from optional param to T | null convention
- Remove duplicate WorkflowWorkerOutboundMessage, keep WorkflowChildToParentMessage

Fixes #325
xiaomo approved these changes 2026-05-05 13:54:23 +00:00
xiaomo left a comment
Owner

APPROVED 4 个 cleanup 全部到位。

两个小残留(不阻塞):

  • 类型声明 drainTimeoutMs?: number | null 还有 ?:,实现侧 = null 是对的但类型应改为 drainTimeoutMs: number | null
  • obj.messages as ResumeThreadMessage["messages"] 的 unsafe cast 还在

都是 nit,合了再说。

APPROVED ✅ 4 个 cleanup 全部到位。 两个小残留(不阻塞): - 类型声明 `drainTimeoutMs?: number | null` 还有 `?:`,实现侧 `= null` 是对的但类型应改为 `drainTimeoutMs: number | null` - `obj.messages as ResumeThreadMessage["messages"]` 的 unsafe cast 还在 都是 nit,合了再说。
xiaomo merged commit 19a0ad3f58 into main 2026-05-05 13:54:30 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
2 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/nerve#326