MCPcopy Create free account

hub / github.com/alibaba/open-code-review / functions

Functions7,390 in github.com/alibaba/open-code-review

FunctionTestBoundaryDeadlineExceededIsFailed
A parent deadline is not a user abort: only context.Canceled reaches parentCancelled, so an expired parent context is failed. Conflating the two would
internal/llm/retry_boundary_test.go:512
FunctionTestBoundaryHelpersAreInertWithoutCollectorOrMeta
A nil collector and a context without identity are both no-ops, so no call site in the three clients needs to guard either.
internal/llm/retry_boundary_test.go:718
FunctionTestBoundaryKeepsHTTPClassOnCorruptErrorBody
--- the counter-example: corrections must not overwrite an HTTP class --- A 5xx whose error body is corrupt makes the SDK return the raw JSON error in
internal/llm/retry_boundary_test.go:342
FunctionTestBoundaryKeepsHTTPClassOnStreamThatNeverOpened
A stream that never opened needs no correction: stream.Err() carries the non-2xx *apierror.Error, the observer already recorded the attempt as an erro
internal/llm/retry_boundary_test.go:270
FunctionTestBoundaryKeepsTruncationCorrectionWhenRecallIsCancelled
The truncation correction is applied before the EOF branch consults ctx, so a request that ends cancelled still shows why the 200 was not usable. Noth
internal/llm/retry_boundary_test.go:143
FunctionTestBoundaryRetryAfterOutlivingAttemptTimeoutIsFailed
The same backoff wait as the test above, ended by the per-attempt timeout instead of a user abort — the pair that pins the cancelled/failed split. Bo
internal/llm/retry_boundary_test.go:447
FunctionTestBoundarySkipsRequestWithoutAttempt
A request that fails before any HTTP attempt (here: unparsable tool call arguments) has no entry to finalize, so it is absent from the report rather t
internal/llm/retry_boundary_test.go:548
FunctionTestBoundedStderrKeepsPrefixAndSuffix
boundedStderr must keep the head and tail of a stream while draining all of it: Output's retention stays bounded like exec.Cmd.Output even when a comm
internal/gitcmd/runner_pipe_test.go:184
FunctionTestBrowserCandidates
(t *testing.T)
internal/viewer/browser_test.go:12
FunctionTestBrowserHelperProcess
TestBrowserHelperProcess is not a real test. It is the child process the tests below exec, standing in for xdg-open/open/rundll32 so exit-status handl
internal/viewer/browser_exec_test.go:31
FunctionTestBrowserOpenerUsesExecutableAndWaits
(t *testing.T)
internal/chatgptauth/io_test.go:129
FunctionTestBudgetConcurrencyAndWaitingCancellation
(test *testing.T)
internal/behaviortask/budget_test.go:210
FunctionTestBudgetEstimatesContentAndReasoningOnce
(test *testing.T)
internal/behaviortask/budget_reasoning_test.go:14
FunctionTestBudgetEstimationAndFailures
(test *testing.T)
internal/behaviortask/budget_test.go:65
FunctionTestBudgetExceededFlag
TestBudgetExceededFlag pins BudgetExceeded() to the actual state of the token budget gate. Before this it was hard-coded false, so a budget stop never
internal/scan/budget_exceeded_test.go:26
FunctionTestBudgetGate_PlanThreshold
(t *testing.T)
internal/scan/budget_test.go:127
FunctionTestBudgetGate_StopsBeforeExceeding
TestBudgetGate_StopsBeforeExceeding verifies the per-file gate stops dispatch once the running token total + next-file look-ahead would blow the budge
internal/scan/budget_test.go:79
FunctionTestBudgetGate_Unlimited
TestBudgetGate_Unlimited verifies MaxTokensBudget=0 runs every file.
internal/scan/budget_test.go:184
FunctionTestBudgetServerUsageWithTools
(test *testing.T)
internal/behaviortask/budget_test.go:158
FunctionTestBudgetToolDefinitionEstimation
(test *testing.T)
internal/behaviortask/budget_test.go:93
FunctionTestBudgetsCancellationAndProviderFailure
(test *testing.T)
internal/behaviortask/runner_test.go:189
FunctionTestBuild
(t *testing.T)
acp/internal/testutil/stub_test.go:69
FunctionTestBuildAllowedHosts
(t *testing.T)
internal/viewer/hostguard_test.go:51
FunctionTestBuildAllowedHosts_BracketedIPv6
(t *testing.T)
internal/viewer/server_extra_test.go:773
FunctionTestBuildAnthropicParams_AllRoles
TestBuildAnthropicParams_AllRoles exercises every message-role branch (system, tool-result flushing, assistant with/without tool calls, user string an
internal/llm/client_params_test.go:114
FunctionTestBuildAnthropicParams_CacheControl
(t *testing.T)
internal/llm/client_test.go:110
FunctionTestBuildAnthropicParams_CacheControl_NoSystem
(t *testing.T)
internal/llm/client_test.go:204
FunctionTestBuildAnthropicParams_CacheControl_NoTools
(t *testing.T)
internal/llm/client_test.go:177
FunctionTestBuildAnthropicParams_DefaultMaxTokens
TestBuildAnthropicParams_DefaultMaxTokens verifies the fallback to 8192 when the request omits MaxTokens, and that optional fields stay unset.
internal/llm/client_params_test.go:180
FunctionTestBuildAnthropicParams_DynamicCacheBreakpoint
(t *testing.T)
internal/llm/client_test.go:232
FunctionTestBuildAnthropicParams_InvalidToolArgs
TestBuildAnthropicParams_InvalidToolArgs covers the error branch where an assistant tool call carries malformed JSON arguments.
internal/llm/client_params_test.go:164
FunctionTestBuildAnthropicParams_NativeReuseDoesNotAliasOriginalSlice
TestBuildAnthropicParams_NativeReuseDoesNotAliasOriginalSlice guards the slice-aliasing fix: buildAnthropicParams must not let the dynamic cache_contr
internal/llm/native_turn_test.go:325
FunctionTestBuildAnthropicParams_NullToolCallArguments
(t *testing.T)
internal/llm/client_test.go:317
FunctionTestBuildAnthropicParams_ToolChoice
TestBuildAnthropicParams_ToolChoice locks the explicit tool_choice mapping. Anthropic has no bare "required" mode — the client must translate ChatRequ
internal/llm/client_params_test.go:208
FunctionTestBuildBadge
(t *testing.T)
cmd/opencodereview/output_test.go:14
FunctionTestBuildChangeFilesExceptGroup
(t *testing.T)
internal/agent/agent_test.go:925
FunctionTestBuildDedupCommentsJSON_IncludesIDsAndKeyFields
(t *testing.T)
internal/scan/dedup_test.go:93
FunctionTestBuildDiffLines
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:165
FunctionTestBuildFileMetadataTable
(t *testing.T)
internal/agent/grouping_test.go:555
FunctionTestBuildGrepArgs_CaseInsensitive
(t *testing.T)
internal/tool/code_search_test.go:81
FunctionTestBuildGrepArgs_CaseSensitive
(t *testing.T)
internal/tool/code_search_test.go:74
FunctionTestBuildGrepArgs_CommitMode
(t *testing.T)
internal/tool/code_search_test.go:36
FunctionTestBuildGrepArgs_FixedString
(t *testing.T)
internal/tool/code_search_test.go:96
FunctionTestBuildGrepArgs_NoIndex
(t *testing.T)
internal/tool/code_search_test.go:816
FunctionTestBuildGrepArgs_PatternStartingWithDash
(t *testing.T)
internal/tool/code_search_test.go:64
FunctionTestBuildGrepArgs_PerlRegexp
(t *testing.T)
internal/tool/code_search_test.go:88
FunctionTestBuildGrepArgs_RejectsOptionLikeRef
(t *testing.T)
internal/tool/code_search_test.go:45
FunctionTestBuildGrepArgs_WorkspaceMode
(t *testing.T)
internal/tool/code_search_test.go:20
FunctionTestBuildGroupFilterCommentsJSON
TestBuildGroupFilterCommentsJSON covers the group-level serialization: the filter sees one flat, globally indexed list spanning every file in the grou
internal/agent/agent_test.go:125
FunctionTestBuildGroupingIndex
(t *testing.T)
internal/viewer/store_test.go:24
FunctionTestBuildGroupingIndex_IgnoresSystemMessage
(t *testing.T)
internal/viewer/store_test.go:61
FunctionTestBuildLifetime
(t *testing.T)
acp/internal/testutil/stub_test.go:16
FunctionTestBuildMessageXML
(t *testing.T)
internal/llmloop/compression_test.go:264
FunctionTestBuildMessageXML
(t *testing.T)
internal/agent/util_test.go:121
FunctionTestBuildOpenAIParams_AllRoles
TestBuildOpenAIParams_AllRoles exercises every message-role branch plus the tools/max-tokens/temperature options in buildOpenAIParams.
internal/llm/client_params_test.go:12
FunctionTestBuildOpenAIParams_Minimal
TestBuildOpenAIParams_Minimal verifies that optional fields stay unset when the request omits tools, max tokens, and temperature.
internal/llm/client_params_test.go:57
FunctionTestBuildOpenAIParams_ToolChoice
TestBuildOpenAIParams_ToolChoice locks the explicit tool_choice mapping for callers that request it. openai.ChatCompletionToolChoiceOptionUnionParam s
internal/llm/client_params_test.go:77
FunctionTestBuildReLocationMessages_NilOrEmptyTask
(t *testing.T)
internal/diff/relocation_test.go:205
FunctionTestBuildReLocationMessages_Rendering
TestBuildReLocationMessages_Rendering pins what the split moved out of ReLocateComment: the prompt the model receives, byte for byte. Splitting the fu
internal/diff/relocation_test.go:178
FunctionTestBuildResponsesParams_AssistantTextPlusToolCalls
(t *testing.T)
internal/llm/responses_client_test.go:168
FunctionTestBuildResponsesParams_MaxTokensAndTemperature
(t *testing.T)
internal/llm/responses_client_test.go:315
FunctionTestBuildResponsesParams_NoInstructionsWhenNoSystem
(t *testing.T)
internal/llm/responses_client_test.go:94
FunctionTestBuildResponsesParams_StoreAndCacheKey
(t *testing.T)
internal/llm/responses_client_test.go:275
FunctionTestBuildResponsesParams_SystemToInstructions
(t *testing.T)
internal/llm/responses_client_test.go:67
FunctionTestBuildResponsesParams_ToolCallItems
(t *testing.T)
internal/llm/responses_client_test.go:114
FunctionTestBuildResponsesParams_ToolChoice
TestBuildResponsesParams_ToolChoice locks the explicit tool_choice mapping. ChatRequest.ToolChoice="required" must become responses.ToolChoiceOptionsR
internal/llm/responses_client_test.go:242
FunctionTestBuildResponsesParams_Tools
(t *testing.T)
internal/llm/responses_client_test.go:197
FunctionTestBuildReviewArgs
(t *testing.T)
acp/internal/contract/intent_test.go:11
FunctionTestBuildReviewArgsExtraWhitelist
TestBuildReviewArgsExtraWhitelist covers the flags that must not be forwardable from a caller, plus the value validation on the ones that may.
acp/internal/contract/intent_test.go:216
FunctionTestBuildReviewArgsRejectsNilAndContradictory
TestBuildReviewArgsRejectsNilAndContradictory pins the mode exclusivity: a workspace intent must not carry range/commit fields, and vice versa. Silent
acp/internal/contract/intent_test.go:324
FunctionTestBuildScanArgs
(t *testing.T)
acp/internal/contract/intent_test.go:102
FunctionTestBuildScanArgsExtraWhitelist
TestBuildScanArgsExtraWhitelist is the scan counterpart. The whitelists differ between commands, so --effort is rejected here and accepted on review.
acp/internal/contract/intent_test.go:277
FunctionTestBuildScanArgsRejectsNil
(t *testing.T)
acp/internal/contract/intent_test.go:347
FunctionTestBuildSummaryCommentsList_TruncatesAndOneLines
(t *testing.T)
internal/scan/agent_test.go:146
FunctionTestBuildSummaryCommentsList_TruncatesOnRuneBoundary
(t *testing.T)
internal/scan/agent_test.go:172
FunctionTestBuildToolInputSchema
TestBuildToolInputSchema covers properties, required filtering (non-string entries dropped), and extra-field passthrough.
internal/llm/client_params_test.go:243
FunctionTestBuildToolInputSchema_Empty
TestBuildToolInputSchema_Empty ensures a bare schema stays empty.
internal/llm/client_params_test.go:267
FunctionTestBuildToolRegistry
(t *testing.T)
cmd/opencodereview/git_test.go:185
FunctionTestBuildUserPromptWithoutState
(t *testing.T)
acp/internal/intent/tool_test.go:47
FunctionTestBuiltinToolProvider
(t *testing.T)
internal/tool/stub_test.go:29
FunctionTestCLIReferenceDocumentsSessionCompare
(t *testing.T)
cmd/opencodereview/cli_reference_compare_docs_test.go:13
FunctionTestCLIReferenceDocumentsSessionExport
(t *testing.T)
cmd/opencodereview/cli_reference_compare_docs_test.go:35
FunctionTestCLIReferenceDocumentsSessionRm
(t *testing.T)
cmd/opencodereview/cli_reference_compare_docs_test.go:122
FunctionTestCLIReferenceUsesSubtaskUnit
(t *testing.T)
cmd/opencodereview/cli_reference_compare_docs_test.go:57
FunctionTestCallGroupingLLM_EmptyResponse
(t *testing.T)
internal/agent/grouping_test.go:514
FunctionTestCallGroupingLLM_UsesTemplateMaxTokens
TestCallGroupingLLM_UsesTemplateMaxTokens guards against reintroducing the hardcoded MaxTokens: 4096 this replaced: a small, task-specific cap left no
internal/agent/grouping_test.go:532
FunctionTestCallToolPreservesEndpointQueryAndEscapedPath
(t *testing.T)
acp/internal/intent/llm/client_test.go:31
FunctionTestCallToolUnsupportedProtocol
(t *testing.T)
acp/internal/intent/llm/client_test.go:335
FunctionTestCallbackMalformedQueryDoesNotExchangeCode
(t *testing.T)
internal/chatgptauth/lifecycle_test.go:441
FunctionTestCallbackOneTimeAndWrongMethod
(t *testing.T)
internal/chatgptauth/lifecycle_test.go:400
FunctionTestCancelClearsIdleClarification
(t *testing.T)
acp/internal/adapter/lifecycle_test.go:173
FunctionTestCancelDuringParsing
(t *testing.T)
acp/internal/adapter/lifecycle_test.go:94
FunctionTestCancelPendingCompression_NilJob
(t *testing.T)
internal/llmloop/runner_test.go:181
FunctionTestCancelPendingCompression_WithJob
(t *testing.T)
internal/llmloop/runner_test.go:187
FunctionTestCancellationAtStartBoundaryDoesNotStartOCR
(t *testing.T)
acp/internal/orchestrator/termination_test.go:185
FunctionTestCanonicalPathResolvesSymlink
(t *testing.T)
internal/pathutil/path_test.go:39
FunctionTestCanonicalPath_NestedSymlink
(t *testing.T)
internal/pathutil/path_test.go:92
FunctionTestCanonicalPath_NonExistentPath
(t *testing.T)
internal/pathutil/path_test.go:60
FunctionTestCanonicalPath_RelativePath
(t *testing.T)
internal/pathutil/path_test.go:67
FunctionTestCanonicalRemote
(t *testing.T)
internal/diff/git_resolve_test.go:161
← previousnext →3,501–3,600 of 7,390, ranked by callers