Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
7,169 in github.com/alibaba/open-code-review
⨍
Functions
7,169
◇
Types & classes
774
Function
TestNewToolResultMessage
(t *testing.T)
internal/llm/message_test.go:68
Function
TestNilCollectorIsInert
Every method tolerates a nil collector. This is the design premise that the reporting path can never fail a review: a call site that has no collector
internal/llm/retry_report_test.go:339
Function
TestNilCollectorMountsNoObserver
A nil collector must leave the request path exactly as it was: no middleware, no observation, and no change in behavior.
internal/llm/retry_observer_test.go:506
Function
TestNonAmbientProviderStillRequiresAPIKey
TestNonAmbientProviderStillRequiresAPIKey makes sure open model lists do not relax credential requirements.
internal/llm/bedrock_test.go:362
Function
TestNormalizeAuthHeader
TestNormalizeAuthHeader covers every branch of NormalizeAuthHeader, including the empty pass-through, the two canonical forms, the "bearer" alias, and
internal/llm/resolver_norm_test.go:13
Function
TestNormalizeLine
(t *testing.T)
internal/diff/resolver_test.go:289
Function
TestNormalizeModelList
(t *testing.T)
cmd/opencodereview/config_cmd_test.go:1514
Function
TestNormalizeProtocol
(t *testing.T)
internal/llm/protocol_test.go:11
Function
TestNumberedCodeLines
TestNumberedCodeLines pins the numbering contract for the Existing Code gutter. The interesting half of the table is the cases where the reported rang
internal/viewer/server_startserver_test.go:275
Function
TestOAuthNoRedirects
(t *testing.T)
internal/chatgptauth/io_test.go:122
Function
TestOTLPSignalURL
(t *testing.T)
internal/telemetry/exporter_test.go:212
Function
TestObserverClassifiesTerminalStatuses
Statuses the SDK does not retry produce exactly one attempt. 402 is the case that pins the coarse provider bucket: it is told apart by status_code rat
internal/llm/retry_observer_test.go:214
Function
TestObserverConcurrentRequests
--- concurrency --- With --concurrency > 1 several files share one collector. Distinct metas must stay in distinct entries, and the frozen report must
internal/llm/retry_observer_test.go:524
Function
TestObserverDropsRequestsWithoutIdentity
Requests without identity — scan and llm test — are dropped whole. The assertion needs a second, identified request in the same collector: with only u
internal/llm/retry_observer_test.go:392
Function
TestObserverIgnoresOverriddenRetryCountHeader
X-Stainless-Retry-Count is an SDK implementation detail. Overriding it through ExtraHeaders makes the SDK stop maintaining it (it only refreshes the h
internal/llm/retry_observer_test.go:345
Function
TestObserverMountedOnOpenAIClients
--- the other two mount points --- The observer is mounted on all three clients, so the OpenAI Chat Completions and Responses constructors get the sam
internal/llm/retry_observer_test.go:435
Function
TestObserverRecordsExhaustedRetries
Retries exhaust at WithMaxRetries(5), so a permanently overloaded provider produces six attempts under one logical request, numbered without a gap.
internal/llm/retry_observer_test.go:169
Function
TestObserverRecordsRateLimitedThenSuccess
--- attempt-level observation --- The canonical retry: one 429 with a server hint, then success. Everything the observer is responsible for is visible
internal/llm/retry_observer_test.go:86
Function
TestObserverRecordsRetryDirectiveOnSuccess
Both SDKs consult x-should-retry before the status code and do not exclude 2xx, so a server can make them retry a successful response. The extra attem
internal/llm/retry_observer_test.go:262
Function
TestObserverRecordsTransportFailure
A transport failure gives the observer no response at all: no status, no diagnostics, and a class derived from the Go error alone.
internal/llm/retry_observer_test.go:311
Function
TestOf
(t *testing.T)
internal/tool/response_message_test.go:34
Function
TestOfName
(t *testing.T)
internal/tool/definitions_test.go:11
Function
TestOf_Empty
(t *testing.T)
internal/tool/response_message_test.go:47
Function
TestOfficialAPIKeyEnvSetHint
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2068
Function
TestOfficialAPIKeyRequiredError
TestOfficialAPIKeyRequiredError covers every combination of the two hints the message can offer. Both are independently gated, so a provider carrying
cmd/opencodereview/provider_tui_cpinput_test.go:30
Function
TestOfficialProviderActiveModel_DifferentProvider
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:62
Function
TestOfficialProviderActiveModel_EmptyModel
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:92
Function
TestOfficialProviderActiveModel_MatchingProvider
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:77
Function
TestOfficialProviderActiveModel_NilCfg
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:54
Function
TestOfficialProviderEnvKeySet
TestOfficialProviderEnvKeySet covers empty EnvVar, unset var, and set var.
cmd/opencodereview/provider_tui_cpinput_test.go:67
Function
TestOfficialSelectedModelUsesRegistryNotStaleMerge
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:1776
Function
TestOnDiskName
TestOnDiskName pins the two lookups resolution depends on: an exactly spelled entry is returned as is, and a spelling the filesystem resolves to a dif
internal/scan/provider_paths_test.go:445
Function
TestOpenAICallTool
(t *testing.T)
acp/internal/intent/llm/client_test.go:100
Function
TestOpenAIChatCompletions_ReplaysReasoningContentAcrossTurns
(t *testing.T)
internal/llm/native_turn_test.go:40
Function
TestOpenAIChatCompletions_ReplaysReasoningContentWithEmptyVisibleContent
TestOpenAIChatCompletions_ReplaysReasoningContentWithEmptyVisibleContent guards the specific regression called out in issue #805: when visible content
internal/llm/native_turn_test.go:80
Function
TestOpenAIChatCompletions_ReplaysToolCallExtraContentAcrossTurns
(t *testing.T)
internal/llm/tool_call_extra_content_test.go:24
Function
TestOpenAIChatCompletions_ReplaysToolCallExtraContentFromStream
TestOpenAIChatCompletions_ReplaysToolCallExtraContentFromStream covers the streaming path, where ChatCompletionAccumulator synthesizes its result fiel
internal/llm/tool_call_extra_content_test.go:107
Function
TestOpenAIChatCompletions_StreamedExtraContentMapsToMatchingToolCall
TestOpenAIChatCompletions_StreamedExtraContentMapsToMatchingToolCall guards that interleaved tool calls each keep their own metadata.
internal/llm/tool_call_extra_content_test.go:193
Function
TestOpenAIChatCompletions_StreamedExtraContentSurvivesLaterChunks
TestOpenAIChatCompletions_StreamedExtraContentSurvivesLaterChunks guards the merge rule: a later chunk carrying no metadata must not erase what an ear
internal/llm/tool_call_extra_content_test.go:180
Function
TestOpenAIChatCompletions_ToolCallExtraContentOmittedWhenAbsent
TestOpenAIChatCompletions_ToolCallExtraContentOmittedWhenAbsent guards the wire format for every provider that never sends the field.
internal/llm/tool_call_extra_content_test.go:149
Function
TestOpenAIClient_BoundsOversizedErrorBody
(t *testing.T)
internal/llm/provider_error_test.go:73
Function
TestOpenAIClient_ContextSessionKeyOverridesFallback
(t *testing.T)
internal/llm/client_test.go:1857
Function
TestOpenAIClient_DoesNotDuplicateStandardErrorBody
TestOpenAIClient_DoesNotDuplicateStandardErrorBody guards the enrichment's trigger: when the SDK already extracted a payload, nothing is appended.
internal/llm/provider_error_test.go:65
Function
TestOpenAIClient_DoesNotRetryNonRetryableError
(t *testing.T)
internal/llm/client_test.go:681
Function
TestOpenAIClient_DoesNotRetryTruncatedResponseAfterCancellation
(t *testing.T)
internal/llm/client_test.go:714
Function
TestOpenAIClient_ExtraHeadersSent
(t *testing.T)
internal/llm/client_test.go:559
Function
TestOpenAIClient_NoInjectionWithoutPlaceholder
(t *testing.T)
internal/llm/client_test.go:1731
Function
TestOpenAIClient_NonStreamingRequestDropsStreamField
TestOpenAIClient_NonStreamingRequestDropsStreamField verifies that the "stream" key in extra_body is NOT forwarded to the non-streaming Chat Completio
internal/llm/client_test.go:995
Function
TestOpenAIClient_RetriesTruncatedResponse
(t *testing.T)
internal/llm/client_test.go:603
Function
TestOpenAIClient_RetryCodesTriggersRetry
(t *testing.T)
internal/llm/client_test.go:2155
Function
TestOpenAIClient_SessionKeyExpandedInExtraBody
(t *testing.T)
internal/llm/client_test.go:1705
Function
TestOpenAIClient_SessionKeyExpandedInExtraHeaders
(t *testing.T)
internal/llm/client_test.go:1678
Function
TestOpenAIClient_SessionKeyGeneratedWhenEmpty
(t *testing.T)
internal/llm/client_test.go:1756
Function
TestOpenAIClient_StopsAfterSecondTruncatedResponse
(t *testing.T)
internal/llm/client_test.go:644
Function
TestOpenAIClient_StreamOnlyGateway
(t *testing.T)
internal/llm/client_test.go:783
Function
TestOpenAIClient_StreamOptionsConfigOverrides
TestOpenAIClient_StreamOptionsConfigOverrides verifies the extra_body.stream_options states: an explicit include_usage value is respected, an object c
internal/llm/client_test.go:909
Function
TestOpenAIClient_StreamingCancellation
(t *testing.T)
internal/llm/client_test.go:1131
Function
TestOpenAIClient_StreamingError
(t *testing.T)
internal/llm/client_test.go:1107
Function
TestOpenAIClient_StreamingIncomplete
(t *testing.T)
internal/llm/client_test.go:1332
Function
TestOpenAIClient_StreamingInconsistentChunks
(t *testing.T)
internal/llm/client_test.go:1206
Function
TestOpenAIClient_StreamingNoChoices
(t *testing.T)
internal/llm/client_test.go:1358
Function
TestOpenAIClient_StreamingReasoningContent
(t *testing.T)
internal/llm/client_test.go:1298
Function
TestOpenAIClient_StreamingRequestsUsageByDefault
TestOpenAIClient_StreamingRequestsUsageByDefault verifies that streaming requests ask for the final usage chunk via stream_options.include_usage when
internal/llm/client_test.go:858
Function
TestOpenAIClient_StreamingToolCall
(t *testing.T)
internal/llm/client_test.go:1059
Function
TestOpenAIClient_StreamingUsage
(t *testing.T)
internal/llm/client_test.go:1233
Function
TestOpenAIClient_StripsTerminalControlsFromErrorBody
TestOpenAIClient_StripsTerminalControlsFromErrorBody guards against an endpoint using the surfaced body to rewrite the terminal.
internal/llm/provider_error_test.go:129
Function
TestOpenAIClient_SurfacesArrayWrappedErrorBody
(t *testing.T)
internal/llm/provider_error_test.go:55
Function
TestOpenAIClient_SurfacesArrayWrappedErrorBodyWhenStreaming
TestOpenAIClient_SurfacesArrayWrappedErrorBodyWhenStreaming covers the streaming exit, which returns stream.Err() rather than the request error.
internal/llm/provider_error_test.go:86
Function
TestOpenAIClient_SurfacesBodyWhenSDKExtractedNull
TestOpenAIClient_SurfacesBodyWhenSDKExtractedNull covers a provider whose document has an "error" key holding null: gjson reports the literal "null",
internal/llm/provider_error_test.go:189
Function
TestOpenAIErrors
(t *testing.T)
acp/internal/intent/llm/client_test.go:140
Function
TestOpenAIResponsesClient_EndToEnd
TestOpenAIResponsesClient_EndToEnd hits a fake server to make sure the request body carries store=false, prompt_cache_key, and instructions, and that
internal/llm/responses_client_test.go:566
Function
TestOpenAIResponsesClient_ExtraBodyPromptCacheKeyOverridesSessionID
The Responses client also maps the typed ChatRequest.SessionID to the PromptCacheKey param. An explicit extra_body.prompt_cache_key (expanded) is appl
internal/llm/responses_client_test.go:1168
Function
TestOpenAIResponsesClient_ExtraBodyStreamDropped
True and non-boolean stream values must not request SSE while Responses.New expects JSON. Other extra_body keys must still be forwarded.
internal/llm/responses_client_test.go:666
Function
TestOpenAIResponsesClient_ExtraBodyStreamFalseForwarded
(t *testing.T)
internal/llm/responses_client_test.go:732
Function
TestOpenAIResponsesClient_NonSuccessStatusReturnsError
TestOpenAIResponsesClient_NonSuccessStatusReturnsError verifies that a response with HTTP 200 but a non-completed status is surfaced as an error rathe
internal/llm/responses_client_test.go:775
Function
TestOpenAIResponsesClient_ReplaysReasoningItemBeforeFunctionCall
(t *testing.T)
internal/llm/native_turn_test.go:158
Function
TestOpenAIResponsesClient_RequiredStreamingOverridesStreamFalse
(test *testing.T)
internal/llm/responses_client_test.go:977
Function
TestOpenAIResponsesClient_SessionKeyExpandedInHeadersAndBody
Regression for the gap where OpenAIResponsesClient sent {ocr_session_key} literally: the placeholder in extra_headers/extra_body must expand to the co
internal/llm/responses_client_test.go:1122
Function
TestOpenAIResponsesClient_StatuslessResponseSucceeds
(t *testing.T)
internal/llm/responses_client_test.go:637
Function
TestOpenAIResponsesClient_StreamingIncompleteContract
(t *testing.T)
internal/llm/responses_client_test.go:940
Function
TestOpenAIResponsesClient_StreamingSSEPreservesNativeReasoning
(t *testing.T)
internal/llm/responses_client_test.go:1013
Function
TestOpenAIResponsesClient_SurfacesArrayWrappedErrorBody
TestOpenAIResponsesClient_SurfacesArrayWrappedErrorBody covers the Responses API exit. It routes its request error through withProviderErrorBody too,
internal/llm/provider_error_test.go:220
Function
TestOpenBrowser
TestOpenBrowser covers the env-reading wrapper without launching a real browser: $BROWSER is the first candidate on Unix, so pointing it at the helper
internal/viewer/browser_exec_test.go:286
Function
TestOpenBrowserCandidates_AllFail
TestOpenBrowserCandidates_AllFail pins that *every* candidate's failure is reported. Naming only $BROWSER would suggest fixing that variable is enough
internal/viewer/browser_exec_test.go:258
Function
TestOpenBrowserCandidates_Empty
(t *testing.T)
internal/viewer/browser_exec_test.go:276
Function
TestOpenBrowserCandidates_FallsThroughToNextCandidate
(t *testing.T)
internal/viewer/browser_exec_test.go:232
Function
TestOpenBrowserCandidates_SkipsNonZeroExit
TestOpenBrowserCandidates_SkipsNonZeroExit proves the fallthrough is driven by exit status, not just by whether the binary exists.
internal/viewer/browser_exec_test.go:246
Function
TestOptionalResultUsage
(t *testing.T)
acp/internal/contract/result_test.go:11
Function
TestOutputBridgeCloseDrainsBufferedBytes
A successful bridge Write only reaches its intermediate pipe. Close must let the copier deliver those bytes before cancelling it.
acp/cmd/ocr-acp/stdio_windows_test.go:92
Function
TestOutputBridgeCloseReportsDrainTimeout
(t *testing.T)
acp/cmd/ocr-acp/stdio_windows_test.go:221
Function
TestOutputBridgeCloseReportsReceiverFailure
(t *testing.T)
acp/cmd/ocr-acp/stdio_windows_test.go:192
Function
TestOutputJSON
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:247
Function
TestOutputJSONNoFiles
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:429
Function
TestOutputJSONWithWarnings
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:306
Function
TestOutputJSONWithWarnings_NoCommentsNoErrors
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:369
Function
TestOutputJSONWithWarnings_NoCommentsSubtaskError
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:194
Function
TestOutputJSONWithWarnings_NoCommentsWithReviewLimitReached
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:398
Function
TestOutputJSON_NoComments
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:280
Function
TestOutputPreviewJSON_KeepsEveryFileInEntryOrder
TestOutputPreviewJSON_KeepsEveryFileInEntryOrder pins that --format json dumps every entry (including provider_directory) in Preview.Entries order.
cmd/opencodereview/output_helpers_test.go:837
Function
TestOutputPreviewText_AggregatesProviderDirectories
TestOutputPreviewText_AggregatesProviderDirectories pins issue #1236: a vendored tree can hold thousands of files nobody can act on, so the terminal c
cmd/opencodereview/output_helpers_test.go:793
← previous
next →
4,601–4,700 of 7,169, ranked by callers