Skip to content

Commit 442b851

Browse files
test(presenter): adapt the stream-state specs to the new dispatch/policy API
After merging upstream/main, presentAssistantMessage requires a request policy snapshot and tracks dispatchState/activeToolContexts; the branch-added spec doubles now provide them.
1 parent 6c8fd0e commit 442b851

8 files changed

Lines changed: 29 additions & 1 deletion

File tree

‎.git-msg-lint.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
test: clear unused bindings exposed by re-enabled unused-variable lint
2+
3+
Upstream main re-enabled @typescript-eslint/no-unused-vars for src; these
4+
bindings became dead weight in this branch's test files. Clearing them keeps
5+
the lint gate green on the merge ref.

‎.git-msg-stryker.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
chore(tools): drop Stryker suppression comment per maintainer directive
2+
3+
The mutation-diff gate treats surviving mutants as advisory and suppression
4+
comments are no longer accepted; the equivalence rationale is recorded in the
5+
PR description instead.

‎.husky/_/post-checkout‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-checkout' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; }
3+
git lfs post-checkout "$@"

‎.husky/_/post-commit‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-commit' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; }
3+
git lfs post-commit "$@"

‎.husky/_/post-merge‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-merge' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; }
3+
git lfs post-merge "$@"

‎.husky/_/pre-push‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; }
3+
git lfs pre-push "$@"

‎.local/state/gh/device-id‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
937325a2-e5e9-4d29-a4ce-17eaff41896e

‎src/core/assistant-message/__tests__/presentAssistantMessage-validation-rejection.spec.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { describe, it, expect, beforeEach, vi } from "vitest"
55
import { providerIdentifiers } from "@roo-code/types/provider-identifiers"
66

77
import { presentAssistantMessage } from "../presentAssistantMessage"
8+
import { DispatchState } from "../../task/dispatchState"
89
import type { RequestPolicySnapshot } from "../../prompts/tools/effective-tool-policy"
910
import type { Task } from "../../task/Task"
1011

@@ -121,7 +122,11 @@ describe("presentAssistantMessage - a rejected write_to_file releases its stream
121122
}
122123
// Added by the tool-context bookkeeping in presentAssistantMessageBlock; assigned after
123124
// the literal so the mock stays assignable when the structural type lags the runtime.
124-
Object.assign(mockTask, { activeToolContexts: new Map() })
125+
Object.assign(mockTask, {
126+
activeToolContexts: new Map(),
127+
dispatchState: DispatchState.IDLE,
128+
pendingWork: null,
129+
})
125130
})
126131

127132
const writeBlock = () => [

0 commit comments

Comments
 (0)