Repository navigation
Conversation
Move-only. The in-memory workflow terminal wake queue (pendingWorkflowRunAttention), the per-run settlement chain (workflowRunSettlementByRun) and their methods (queueWorkflowRunAttention, markWorkflowRunTerminalAttentionSettled, settleWorkflowRunTerminalAttention, clearWorkflowRunDowngradeSettlement) move into a plain WorkflowRunAttention class. TaskService builds it with call-time closures for sessionsDir and terminalAttentionStore, keeps the two public methods as one-line facades, and the drain reaches the queue through queuedRunIds/dropOwner/dropRun. Tests that seed the queue through a cast now point at workflowRunAttention.pendingWorkflowRunAttention. The new class gets its own unit tests with a fake store.
… in WorkflowRunAttention tests
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
🟢 e2e stories (Haiku): 14 passed22 agent steps · 7 replayed from cache · 15 model calls · 46.3k tokens (28% cached) All 14 tests in 9 files
e2e 0.20.0 · 1m 12s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 8.0k tokens (32% cached) All 3 tests in 3 files
e2e 0.20.0 · 18.5s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 5.3s · 2 targets (web, phone) · run artifacts |
Summary
Moves TaskService's owed workflow terminal wakes (
pendingWorkflowRunAttention) and the per-run settlement chain (workflowRunSettlementByRun) into a newWorkflowRunAttentionclass (workflowRunAttention.ts).taskService.ts: 22,382 → 22,224 lines.Background
PR 2 to 5 of the TaskService split stack (#7665 is PR 1). Each layer moves one group of TaskService state and the methods that own it into a plain class that TaskService builds in its constructor. The rules are the same in every layer: public methods stay on TaskService as one-line facades, methods that tests spy on or patch stay reachable on TaskService and the new class calls them through call-time closures, and tests that cast a moved field change only the cast target. No behaviour changes.
Implementation
queueWorkflowRunAttention,markWorkflowRunTerminalAttentionSettled,settleWorkflowRunTerminalAttention,clearWorkflowRunDowngradeSettlement. The two public ones keep TaskService facades (tools/task_await, tools/workflow_resume, WorkflowService and turnRequestBuilder call them).noteWorkflowRunTerminalAttentionanddrainTerminalAttentionstay on TaskService. The drain uses three accessors:queuedRunIds,dropOwneranddropRun.sessionsDirandterminalAttentionStore, so a test that swaps the store still works.workspaceWorkflowRuns.ts, which caches sidebar run activity for WorkspaceService.taskService.test.tsandqueuedWorkflowRunAttentionin the shared harness now castworkflowRunAttention.pendingWorkflowRunAttention. The newworkflowRunAttention.test.ts(14 tests) covers queue dedupe, settle write order, a failed marker write, a newer generation, an unreadable run, and that settlements of one run do not overlap.Validation
bun teston taskService, workspaceTurnManager, workflows, tools and the new file: all pass (on this layer and on the stack top, 4,898 tests).make static-check,make lint-eslint,make crap-check(moved methods are CC 2 to 6),make dry-check: pass.??→||on a Set or Promise).Risks
Low. The settlement chain and the settle write order move as one unit, with the same statements.
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$53.33