MCPcopy Create free account

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

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

FunctionTestNewToolResultMessage
(t *testing.T)
internal/llm/message_test.go:68
FunctionTestNilCollectorIsInert
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
FunctionTestNilCollectorMountsNoObserver
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
FunctionTestNonAmbientProviderStillRequiresAPIKey
TestNonAmbientProviderStillRequiresAPIKey makes sure open model lists do not relax credential requirements.
internal/llm/bedrock_test.go:362
FunctionTestNormalizeAuthHeader
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
FunctionTestNormalizeLine
(t *testing.T)
internal/diff/resolver_test.go:289
FunctionTestNormalizeModelList
(t *testing.T)
cmd/opencodereview/config_cmd_test.go:1514
FunctionTestNormalizeProtocol
(t *testing.T)
internal/llm/protocol_test.go:11
FunctionTestNumberedCodeLines
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
FunctionTestOAuthNoRedirects
(t *testing.T)
internal/chatgptauth/io_test.go:122
FunctionTestOTLPSignalURL
(t *testing.T)
internal/telemetry/exporter_test.go:212
FunctionTestObserverClassifiesTerminalStatuses
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
FunctionTestObserverConcurrentRequests
--- 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
FunctionTestObserverDropsRequestsWithoutIdentity
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
FunctionTestObserverIgnoresOverriddenRetryCountHeader
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
FunctionTestObserverMountedOnOpenAIClients
--- 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
FunctionTestObserverRecordsExhaustedRetries
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
FunctionTestObserverRecordsRateLimitedThenSuccess
--- 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
FunctionTestObserverRecordsRetryDirectiveOnSuccess
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
FunctionTestObserverRecordsTransportFailure
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
FunctionTestOf
(t *testing.T)
internal/tool/response_message_test.go:34
FunctionTestOfName
(t *testing.T)
internal/tool/definitions_test.go:11
FunctionTestOf_Empty
(t *testing.T)
internal/tool/response_message_test.go:47
FunctionTestOfficialAPIKeyEnvSetHint
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2068
FunctionTestOfficialAPIKeyRequiredError
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
FunctionTestOfficialProviderActiveModel_DifferentProvider
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:62
FunctionTestOfficialProviderActiveModel_EmptyModel
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:92
FunctionTestOfficialProviderActiveModel_MatchingProvider
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:77
FunctionTestOfficialProviderActiveModel_NilCfg
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:54
FunctionTestOfficialProviderEnvKeySet
TestOfficialProviderEnvKeySet covers empty EnvVar, unset var, and set var.
cmd/opencodereview/provider_tui_cpinput_test.go:67
FunctionTestOfficialSelectedModelUsesRegistryNotStaleMerge
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:1776
FunctionTestOnDiskName
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
FunctionTestOpenAICallTool
(t *testing.T)
acp/internal/intent/llm/client_test.go:100
FunctionTestOpenAIChatCompletions_ReplaysReasoningContentAcrossTurns
(t *testing.T)
internal/llm/native_turn_test.go:40
FunctionTestOpenAIChatCompletions_ReplaysReasoningContentWithEmptyVisibleContent
TestOpenAIChatCompletions_ReplaysReasoningContentWithEmptyVisibleContent guards the specific regression called out in issue #805: when visible content
internal/llm/native_turn_test.go:80
FunctionTestOpenAIChatCompletions_ReplaysToolCallExtraContentAcrossTurns
(t *testing.T)
internal/llm/tool_call_extra_content_test.go:24
FunctionTestOpenAIChatCompletions_ReplaysToolCallExtraContentFromStream
TestOpenAIChatCompletions_ReplaysToolCallExtraContentFromStream covers the streaming path, where ChatCompletionAccumulator synthesizes its result fiel
internal/llm/tool_call_extra_content_test.go:107
FunctionTestOpenAIChatCompletions_StreamedExtraContentMapsToMatchingToolCall
TestOpenAIChatCompletions_StreamedExtraContentMapsToMatchingToolCall guards that interleaved tool calls each keep their own metadata.
internal/llm/tool_call_extra_content_test.go:193
FunctionTestOpenAIChatCompletions_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
FunctionTestOpenAIChatCompletions_ToolCallExtraContentOmittedWhenAbsent
TestOpenAIChatCompletions_ToolCallExtraContentOmittedWhenAbsent guards the wire format for every provider that never sends the field.
internal/llm/tool_call_extra_content_test.go:149
FunctionTestOpenAIClient_BoundsOversizedErrorBody
(t *testing.T)
internal/llm/provider_error_test.go:73
FunctionTestOpenAIClient_ContextSessionKeyOverridesFallback
(t *testing.T)
internal/llm/client_test.go:1857
FunctionTestOpenAIClient_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
FunctionTestOpenAIClient_DoesNotRetryNonRetryableError
(t *testing.T)
internal/llm/client_test.go:681
FunctionTestOpenAIClient_DoesNotRetryTruncatedResponseAfterCancellation
(t *testing.T)
internal/llm/client_test.go:714
FunctionTestOpenAIClient_ExtraHeadersSent
(t *testing.T)
internal/llm/client_test.go:559
FunctionTestOpenAIClient_NoInjectionWithoutPlaceholder
(t *testing.T)
internal/llm/client_test.go:1731
FunctionTestOpenAIClient_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
FunctionTestOpenAIClient_RetriesTruncatedResponse
(t *testing.T)
internal/llm/client_test.go:603
FunctionTestOpenAIClient_RetryCodesTriggersRetry
(t *testing.T)
internal/llm/client_test.go:2155
FunctionTestOpenAIClient_SessionKeyExpandedInExtraBody
(t *testing.T)
internal/llm/client_test.go:1705
FunctionTestOpenAIClient_SessionKeyExpandedInExtraHeaders
(t *testing.T)
internal/llm/client_test.go:1678
FunctionTestOpenAIClient_SessionKeyGeneratedWhenEmpty
(t *testing.T)
internal/llm/client_test.go:1756
FunctionTestOpenAIClient_StopsAfterSecondTruncatedResponse
(t *testing.T)
internal/llm/client_test.go:644
FunctionTestOpenAIClient_StreamOnlyGateway
(t *testing.T)
internal/llm/client_test.go:783
FunctionTestOpenAIClient_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
FunctionTestOpenAIClient_StreamingCancellation
(t *testing.T)
internal/llm/client_test.go:1131
FunctionTestOpenAIClient_StreamingError
(t *testing.T)
internal/llm/client_test.go:1107
FunctionTestOpenAIClient_StreamingIncomplete
(t *testing.T)
internal/llm/client_test.go:1332
FunctionTestOpenAIClient_StreamingInconsistentChunks
(t *testing.T)
internal/llm/client_test.go:1206
FunctionTestOpenAIClient_StreamingNoChoices
(t *testing.T)
internal/llm/client_test.go:1358
FunctionTestOpenAIClient_StreamingReasoningContent
(t *testing.T)
internal/llm/client_test.go:1298
FunctionTestOpenAIClient_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
FunctionTestOpenAIClient_StreamingToolCall
(t *testing.T)
internal/llm/client_test.go:1059
FunctionTestOpenAIClient_StreamingUsage
(t *testing.T)
internal/llm/client_test.go:1233
FunctionTestOpenAIClient_StripsTerminalControlsFromErrorBody
TestOpenAIClient_StripsTerminalControlsFromErrorBody guards against an endpoint using the surfaced body to rewrite the terminal.
internal/llm/provider_error_test.go:129
FunctionTestOpenAIClient_SurfacesArrayWrappedErrorBody
(t *testing.T)
internal/llm/provider_error_test.go:55
FunctionTestOpenAIClient_SurfacesArrayWrappedErrorBodyWhenStreaming
TestOpenAIClient_SurfacesArrayWrappedErrorBodyWhenStreaming covers the streaming exit, which returns stream.Err() rather than the request error.
internal/llm/provider_error_test.go:86
FunctionTestOpenAIClient_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
FunctionTestOpenAIErrors
(t *testing.T)
acp/internal/intent/llm/client_test.go:140
FunctionTestOpenAIResponsesClient_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
FunctionTestOpenAIResponsesClient_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
FunctionTestOpenAIResponsesClient_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
FunctionTestOpenAIResponsesClient_ExtraBodyStreamFalseForwarded
(t *testing.T)
internal/llm/responses_client_test.go:732
FunctionTestOpenAIResponsesClient_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
FunctionTestOpenAIResponsesClient_ReplaysReasoningItemBeforeFunctionCall
(t *testing.T)
internal/llm/native_turn_test.go:158
FunctionTestOpenAIResponsesClient_RequiredStreamingOverridesStreamFalse
(test *testing.T)
internal/llm/responses_client_test.go:977
FunctionTestOpenAIResponsesClient_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
FunctionTestOpenAIResponsesClient_StatuslessResponseSucceeds
(t *testing.T)
internal/llm/responses_client_test.go:637
FunctionTestOpenAIResponsesClient_StreamingIncompleteContract
(t *testing.T)
internal/llm/responses_client_test.go:940
FunctionTestOpenAIResponsesClient_StreamingSSEPreservesNativeReasoning
(t *testing.T)
internal/llm/responses_client_test.go:1013
FunctionTestOpenAIResponsesClient_SurfacesArrayWrappedErrorBody
TestOpenAIResponsesClient_SurfacesArrayWrappedErrorBody covers the Responses API exit. It routes its request error through withProviderErrorBody too,
internal/llm/provider_error_test.go:220
FunctionTestOpenBrowser
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
FunctionTestOpenBrowserCandidates_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
FunctionTestOpenBrowserCandidates_Empty
(t *testing.T)
internal/viewer/browser_exec_test.go:276
FunctionTestOpenBrowserCandidates_FallsThroughToNextCandidate
(t *testing.T)
internal/viewer/browser_exec_test.go:232
FunctionTestOpenBrowserCandidates_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
FunctionTestOptionalResultUsage
(t *testing.T)
acp/internal/contract/result_test.go:11
FunctionTestOutputBridgeCloseDrainsBufferedBytes
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
FunctionTestOutputBridgeCloseReportsDrainTimeout
(t *testing.T)
acp/cmd/ocr-acp/stdio_windows_test.go:221
FunctionTestOutputBridgeCloseReportsReceiverFailure
(t *testing.T)
acp/cmd/ocr-acp/stdio_windows_test.go:192
FunctionTestOutputJSON
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:247
FunctionTestOutputJSONNoFiles
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:429
FunctionTestOutputJSONWithWarnings
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:306
FunctionTestOutputJSONWithWarnings_NoCommentsNoErrors
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:369
FunctionTestOutputJSONWithWarnings_NoCommentsSubtaskError
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:194
FunctionTestOutputJSONWithWarnings_NoCommentsWithReviewLimitReached
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:398
FunctionTestOutputJSON_NoComments
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:280
FunctionTestOutputPreviewJSON_KeepsEveryFileInEntryOrder
TestOutputPreviewJSON_KeepsEveryFileInEntryOrder pins that --format json dumps every entry (including provider_directory) in Preview.Entries order.
cmd/opencodereview/output_helpers_test.go:837
FunctionTestOutputPreviewText_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
← previousnext →4,601–4,700 of 7,169, ranked by callers