Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
7,390 in github.com/alibaba/open-code-review
⨍
Functions
7,390
◇
Types & classes
806
Function
TestBoundaryDeadlineExceededIsFailed
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
Function
TestBoundaryHelpersAreInertWithoutCollectorOrMeta
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
Function
TestBoundaryKeepsHTTPClassOnCorruptErrorBody
--- 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
Function
TestBoundaryKeepsHTTPClassOnStreamThatNeverOpened
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
Function
TestBoundaryKeepsTruncationCorrectionWhenRecallIsCancelled
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
Function
TestBoundaryRetryAfterOutlivingAttemptTimeoutIsFailed
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
Function
TestBoundarySkipsRequestWithoutAttempt
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
Function
TestBoundedStderrKeepsPrefixAndSuffix
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
Function
TestBrowserCandidates
(t *testing.T)
internal/viewer/browser_test.go:12
Function
TestBrowserHelperProcess
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
Function
TestBrowserOpenerUsesExecutableAndWaits
(t *testing.T)
internal/chatgptauth/io_test.go:129
Function
TestBudgetConcurrencyAndWaitingCancellation
(test *testing.T)
internal/behaviortask/budget_test.go:210
Function
TestBudgetEstimatesContentAndReasoningOnce
(test *testing.T)
internal/behaviortask/budget_reasoning_test.go:14
Function
TestBudgetEstimationAndFailures
(test *testing.T)
internal/behaviortask/budget_test.go:65
Function
TestBudgetExceededFlag
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
Function
TestBudgetGate_PlanThreshold
(t *testing.T)
internal/scan/budget_test.go:127
Function
TestBudgetGate_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
Function
TestBudgetGate_Unlimited
TestBudgetGate_Unlimited verifies MaxTokensBudget=0 runs every file.
internal/scan/budget_test.go:184
Function
TestBudgetServerUsageWithTools
(test *testing.T)
internal/behaviortask/budget_test.go:158
Function
TestBudgetToolDefinitionEstimation
(test *testing.T)
internal/behaviortask/budget_test.go:93
Function
TestBudgetsCancellationAndProviderFailure
(test *testing.T)
internal/behaviortask/runner_test.go:189
Function
TestBuild
(t *testing.T)
acp/internal/testutil/stub_test.go:69
Function
TestBuildAllowedHosts
(t *testing.T)
internal/viewer/hostguard_test.go:51
Function
TestBuildAllowedHosts_BracketedIPv6
(t *testing.T)
internal/viewer/server_extra_test.go:773
Function
TestBuildAnthropicParams_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
Function
TestBuildAnthropicParams_CacheControl
(t *testing.T)
internal/llm/client_test.go:110
Function
TestBuildAnthropicParams_CacheControl_NoSystem
(t *testing.T)
internal/llm/client_test.go:204
Function
TestBuildAnthropicParams_CacheControl_NoTools
(t *testing.T)
internal/llm/client_test.go:177
Function
TestBuildAnthropicParams_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
Function
TestBuildAnthropicParams_DynamicCacheBreakpoint
(t *testing.T)
internal/llm/client_test.go:232
Function
TestBuildAnthropicParams_InvalidToolArgs
TestBuildAnthropicParams_InvalidToolArgs covers the error branch where an assistant tool call carries malformed JSON arguments.
internal/llm/client_params_test.go:164
Function
TestBuildAnthropicParams_NativeReuseDoesNotAliasOriginalSlice
TestBuildAnthropicParams_NativeReuseDoesNotAliasOriginalSlice guards the slice-aliasing fix: buildAnthropicParams must not let the dynamic cache_contr
internal/llm/native_turn_test.go:325
Function
TestBuildAnthropicParams_NullToolCallArguments
(t *testing.T)
internal/llm/client_test.go:317
Function
TestBuildAnthropicParams_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
Function
TestBuildBadge
(t *testing.T)
cmd/opencodereview/output_test.go:14
Function
TestBuildChangeFilesExceptGroup
(t *testing.T)
internal/agent/agent_test.go:925
Function
TestBuildDedupCommentsJSON_IncludesIDsAndKeyFields
(t *testing.T)
internal/scan/dedup_test.go:93
Function
TestBuildDiffLines
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:165
Function
TestBuildFileMetadataTable
(t *testing.T)
internal/agent/grouping_test.go:555
Function
TestBuildGrepArgs_CaseInsensitive
(t *testing.T)
internal/tool/code_search_test.go:81
Function
TestBuildGrepArgs_CaseSensitive
(t *testing.T)
internal/tool/code_search_test.go:74
Function
TestBuildGrepArgs_CommitMode
(t *testing.T)
internal/tool/code_search_test.go:36
Function
TestBuildGrepArgs_FixedString
(t *testing.T)
internal/tool/code_search_test.go:96
Function
TestBuildGrepArgs_NoIndex
(t *testing.T)
internal/tool/code_search_test.go:816
Function
TestBuildGrepArgs_PatternStartingWithDash
(t *testing.T)
internal/tool/code_search_test.go:64
Function
TestBuildGrepArgs_PerlRegexp
(t *testing.T)
internal/tool/code_search_test.go:88
Function
TestBuildGrepArgs_RejectsOptionLikeRef
(t *testing.T)
internal/tool/code_search_test.go:45
Function
TestBuildGrepArgs_WorkspaceMode
(t *testing.T)
internal/tool/code_search_test.go:20
Function
TestBuildGroupFilterCommentsJSON
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
Function
TestBuildGroupingIndex
(t *testing.T)
internal/viewer/store_test.go:24
Function
TestBuildGroupingIndex_IgnoresSystemMessage
(t *testing.T)
internal/viewer/store_test.go:61
Function
TestBuildLifetime
(t *testing.T)
acp/internal/testutil/stub_test.go:16
Function
TestBuildMessageXML
(t *testing.T)
internal/llmloop/compression_test.go:264
Function
TestBuildMessageXML
(t *testing.T)
internal/agent/util_test.go:121
Function
TestBuildOpenAIParams_AllRoles
TestBuildOpenAIParams_AllRoles exercises every message-role branch plus the tools/max-tokens/temperature options in buildOpenAIParams.
internal/llm/client_params_test.go:12
Function
TestBuildOpenAIParams_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
Function
TestBuildOpenAIParams_ToolChoice
TestBuildOpenAIParams_ToolChoice locks the explicit tool_choice mapping for callers that request it. openai.ChatCompletionToolChoiceOptionUnionParam s
internal/llm/client_params_test.go:77
Function
TestBuildReLocationMessages_NilOrEmptyTask
(t *testing.T)
internal/diff/relocation_test.go:205
Function
TestBuildReLocationMessages_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
Function
TestBuildResponsesParams_AssistantTextPlusToolCalls
(t *testing.T)
internal/llm/responses_client_test.go:168
Function
TestBuildResponsesParams_MaxTokensAndTemperature
(t *testing.T)
internal/llm/responses_client_test.go:315
Function
TestBuildResponsesParams_NoInstructionsWhenNoSystem
(t *testing.T)
internal/llm/responses_client_test.go:94
Function
TestBuildResponsesParams_StoreAndCacheKey
(t *testing.T)
internal/llm/responses_client_test.go:275
Function
TestBuildResponsesParams_SystemToInstructions
(t *testing.T)
internal/llm/responses_client_test.go:67
Function
TestBuildResponsesParams_ToolCallItems
(t *testing.T)
internal/llm/responses_client_test.go:114
Function
TestBuildResponsesParams_ToolChoice
TestBuildResponsesParams_ToolChoice locks the explicit tool_choice mapping. ChatRequest.ToolChoice="required" must become responses.ToolChoiceOptionsR
internal/llm/responses_client_test.go:242
Function
TestBuildResponsesParams_Tools
(t *testing.T)
internal/llm/responses_client_test.go:197
Function
TestBuildReviewArgs
(t *testing.T)
acp/internal/contract/intent_test.go:11
Function
TestBuildReviewArgsExtraWhitelist
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
Function
TestBuildReviewArgsRejectsNilAndContradictory
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
Function
TestBuildScanArgs
(t *testing.T)
acp/internal/contract/intent_test.go:102
Function
TestBuildScanArgsExtraWhitelist
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
Function
TestBuildScanArgsRejectsNil
(t *testing.T)
acp/internal/contract/intent_test.go:347
Function
TestBuildSummaryCommentsList_TruncatesAndOneLines
(t *testing.T)
internal/scan/agent_test.go:146
Function
TestBuildSummaryCommentsList_TruncatesOnRuneBoundary
(t *testing.T)
internal/scan/agent_test.go:172
Function
TestBuildToolInputSchema
TestBuildToolInputSchema covers properties, required filtering (non-string entries dropped), and extra-field passthrough.
internal/llm/client_params_test.go:243
Function
TestBuildToolInputSchema_Empty
TestBuildToolInputSchema_Empty ensures a bare schema stays empty.
internal/llm/client_params_test.go:267
Function
TestBuildToolRegistry
(t *testing.T)
cmd/opencodereview/git_test.go:185
Function
TestBuildUserPromptWithoutState
(t *testing.T)
acp/internal/intent/tool_test.go:47
Function
TestBuiltinToolProvider
(t *testing.T)
internal/tool/stub_test.go:29
Function
TestCLIReferenceDocumentsSessionCompare
(t *testing.T)
cmd/opencodereview/cli_reference_compare_docs_test.go:13
Function
TestCLIReferenceDocumentsSessionExport
(t *testing.T)
cmd/opencodereview/cli_reference_compare_docs_test.go:35
Function
TestCLIReferenceDocumentsSessionRm
(t *testing.T)
cmd/opencodereview/cli_reference_compare_docs_test.go:122
Function
TestCLIReferenceUsesSubtaskUnit
(t *testing.T)
cmd/opencodereview/cli_reference_compare_docs_test.go:57
Function
TestCallGroupingLLM_EmptyResponse
(t *testing.T)
internal/agent/grouping_test.go:514
Function
TestCallGroupingLLM_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
Function
TestCallToolPreservesEndpointQueryAndEscapedPath
(t *testing.T)
acp/internal/intent/llm/client_test.go:31
Function
TestCallToolUnsupportedProtocol
(t *testing.T)
acp/internal/intent/llm/client_test.go:335
Function
TestCallbackMalformedQueryDoesNotExchangeCode
(t *testing.T)
internal/chatgptauth/lifecycle_test.go:441
Function
TestCallbackOneTimeAndWrongMethod
(t *testing.T)
internal/chatgptauth/lifecycle_test.go:400
Function
TestCancelClearsIdleClarification
(t *testing.T)
acp/internal/adapter/lifecycle_test.go:173
Function
TestCancelDuringParsing
(t *testing.T)
acp/internal/adapter/lifecycle_test.go:94
Function
TestCancelPendingCompression_NilJob
(t *testing.T)
internal/llmloop/runner_test.go:181
Function
TestCancelPendingCompression_WithJob
(t *testing.T)
internal/llmloop/runner_test.go:187
Function
TestCancellationAtStartBoundaryDoesNotStartOCR
(t *testing.T)
acp/internal/orchestrator/termination_test.go:185
Function
TestCanonicalPathResolvesSymlink
(t *testing.T)
internal/pathutil/path_test.go:39
Function
TestCanonicalPath_NestedSymlink
(t *testing.T)
internal/pathutil/path_test.go:92
Function
TestCanonicalPath_NonExistentPath
(t *testing.T)
internal/pathutil/path_test.go:60
Function
TestCanonicalPath_RelativePath
(t *testing.T)
internal/pathutil/path_test.go:67
Function
TestCanonicalRemote
(t *testing.T)
internal/diff/git_resolve_test.go:161
← previous
next →
3,501–3,600 of 7,390, ranked by callers