MCPcopy Create free account

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

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

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
FunctionTestOutputPreviewText_ColorEmitsEscapes
(t *testing.T)
cmd/opencodereview/output_color_test.go:169
FunctionTestOutputPreviewText_ColumnsAlign
TestOutputPreviewText_ColumnsAlign guards the padding: the counts are padded before colorizing, so the path/count columns line up in both modes.
cmd/opencodereview/output_color_test.go:144
FunctionTestOutputPreviewText_ExcludedPathDoesNotWidenWillReview
TestOutputPreviewText_ExcludedPathDoesNotWidenWillReview pins issue #1236: a long excluded path must not pad the Will review rows, or the counts are p
cmd/opencodereview/output_helpers_test.go:756
FunctionTestOutputPreviewText_NoColorIsPlain
TestOutputPreviewText_NoColorIsPlain covers the second text path that emitted escapes: `ocr review --preview` piped to a file.
cmd/opencodereview/output_color_test.go:122
FunctionTestOutputPreviewText_NoFiles
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:688
FunctionTestOutputPreviewText_WithExcludedFiles
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:724
FunctionTestOutputPreviewText_WithReviewableFiles
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:698
FunctionTestOutputPreview_SarifRejects
--preview --format sarif should error, not emit a non-SARIF document.
cmd/opencodereview/sarif_test.go:755
FunctionTestOutputRetryReportText_CancelledIsShown
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:176
FunctionTestOutputRetryReportText_EmptyRequestsHasNoDanglingSummary
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:91
FunctionTestOutputRetryReportText_NilWritesNothing
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:83
FunctionTestOutputRetryReportText_PluralAgreement
Counted nouns are singular at one and plural above it.
cmd/opencodereview/retry_report_render_test.go:103
FunctionTestOutputRetryReportText_RecoveredAndFailed
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:75
FunctionTestOutputRetryReportText_SanitizesControlChars
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:229
FunctionTestOutputRetryReportText_SucceededAfterRetry
A retry that ended in success without any error attempt is a real outcome: an HTTP 200 carrying x-should-retry: true makes the SDK attempt again. The
cmd/opencodereview/retry_report_render_test.go:144
FunctionTestOutputRetryReportText_TruncatesStageList
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:240
FunctionTestOutputSARIF_BasicStructure
--- AC-1: Basic SARIF output structure ---
cmd/opencodereview/sarif_test.go:50
FunctionTestOutputSARIF_EmptyCategory
--- AC-7: Empty Category defaults to "other" ---
cmd/opencodereview/sarif_test.go:234
FunctionTestOutputSARIF_EmptyComments
--- AC-2: Empty comments produces empty results array (not null) ---
cmd/opencodereview/sarif_test.go:94
FunctionTestOutputSARIF_FullFieldMapping
--- AC-4: Full field mapping ---
cmd/opencodereview/sarif_test.go:136
FunctionTestOutputSARIF_JSONFormatting
--- AC-14: JSON formatting (2-space indent, trailing newline) ---
cmd/opencodereview/sarif_test.go:461
FunctionTestOutputSARIF_MultipleComments
--- AC-15: Multiple comments ---
cmd/opencodereview/sarif_test.go:478
FunctionTestOutputSARIF_NoFixes
--- AC-9: Missing suggestion/existing code omits fixes ---
cmd/opencodereview/sarif_test.go:294
FunctionTestOutputSARIF_SchemaCompliance
--- AC-13: Schema compliance (field types) ---
cmd/opencodereview/sarif_test.go:403
FunctionTestOutputSARIF_ZeroLineNumbers
--- AC-8: Zero line numbers omit region AND fixes (deletedRegion is required) ---
cmd/opencodereview/sarif_test.go:257
FunctionTestOutputTextWithWarnings_NoCommentsNoErrors
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:562
FunctionTestOutputTextWithWarnings_NoCommentsWithReviewLimitReached
A limit the grace round completed still truncates the review, so the zero-finding output must not read as an unqualified approval.
cmd/opencodereview/output_helpers_test.go:584
FunctionTestOutputTextWithWarnings_NoCommentsWithSubtaskError
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:572
FunctionTestOutputTextWithWarnings_WithComments
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:607
← previousnext →4,801–4,900 of 7,390, ranked by callers