feat(schedule): send messages later on existing threads - #1253
feat(schedule): send messages later on existing threads#1253luoye520ww wants to merge 9 commits into
Conversation
ba51675 to
0c13f64
Compare
0c13f64 to
23aca3d
Compare
|
Local validation for head
The required |
|
Post-CI update (head 17f55c8): added server-side immutability for existing-thread scheduled-send snapshots (prompt, workspace, thread, provider, model, reasoning, account/attachments via scheduledSend) plus regression coverage; title/enabled/time edits remain allowed. Local targeted test: npm.cmd exec vitest run src/main/schedule-runtime.scheduled-send.test.ts (17 passed). npm.cmd exec eslint src/main/schedule-runtime.ts src/main/schedule-runtime.scheduled-send.test.ts and git diff --check pass. Full npm.cmd run typecheck reaches existing baseline dependency/type failures in design-svg, MCP client, Cursor SDK, TUI, etc.; no failures originate in scheduled-send files. Existing CI run 33324088421 had 19 unrelated unit-test files failing (65 tests), so PR remains blocked on repository baseline failures. |
|
CI fix pushed at head 03012c2: Quality gates failure was only check:file-lines (scheduled-send test 708 > 700). Compressed the new regression test to 690 lines total. Revalidated: npm.cmd exec vitest run src/main/schedule-runtime.scheduled-send.test.ts -> 17 passed; targeted ESLint and git diff --check pass. Awaiting a fresh GitHub run. |
|
Review fixes pushed at head 16a188f: existing-thread sends now reject recurring schedules; paused sends are rechecked immediately before admission; one-time retry exhaustion is persisted as disabled terminal error; and post-admission execution errors for one-time sends no longer reschedule. Added regression coverage; test file remains at 700-line gate. Targeted scheduled-send suite: 19 tests passed locally before final compression; rerunning now. |
|
Additional review fixes at head efdfaa1: runtime now rejects existing-thread sends with recurring schedules or missing atTime; frozen send execution fields (mode, orchestration, worktree, dependencies, channel) cannot be mutated; one-time terminal errors disable/clear nextRunAt; admission rechecks enabled state. Local scheduled-send suite: 18 passed; targeted ESLint and git diff --check pass. Full typecheck remains blocked by unrelated baseline dependency/type errors documented earlier. |
|
Latest review fix at head 2b0d8f9: rechecks persisted task cancellation/enabled state immediately before POST after model/worktree awaits, preventing late admission. Settlement now honors disable state. Targeted scheduled-send suite passes (18 tests); ESLint and diff check pass. CI reruns on this head. |
|
CI gate fix at head 4a8ab97: compressed the retry exhaustion condition to bring schedule-runtime-queue.ts under the 700-line repository limit (now 699 lines). Revalidated targeted scheduled-send tests (18 passed), ESLint, and git diff --check. |
|
Post-CI review for final head 4a8ab97: run 33328442086 passed checkout/install, Typecheck and Lint (including file-line gate). Unit tests then failed with the same existing baseline set: 19 files / 65 tests (agent-loop, graph, TUI, secret-store, extension tool/provider and other unrelated suites); 5,039 tests passed. No scheduled-send test failed. Platform package jobs were skipped only because Quality gates aggregates the unrelated unit failures. PR remains open for maintainer review; no duplicate PR will be created. |
Summary\nAdds one-time scheduled sends to existing threads with frozen prompt/model/provider/account/attachments snapshots, FIFO ordering, retry and restart-safe queueing.\n\n## Tests\n- npm.cmd run typecheck\n- npm.cmd exec vitest run src/main/schedule-runtime.scheduled-send.test.ts src/main/ipc/scheduled-send-ipc.test.ts src/renderer/src/components/chat/FloatingComposer.scheduled-send.test.ts\n- npm.cmd --prefix kun test -- src/server/routes/scheduled-send-admission.test.ts\n- npm.cmd run build\n- git diff --check\n\nFixes #1215