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
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
Function
TestOutputPreviewText_ColorEmitsEscapes
(t *testing.T)
cmd/opencodereview/output_color_test.go:169
Function
TestOutputPreviewText_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
Function
TestOutputPreviewText_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
Function
TestOutputPreviewText_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
Function
TestOutputPreviewText_NoFiles
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:688
Function
TestOutputPreviewText_WithExcludedFiles
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:724
Function
TestOutputPreviewText_WithReviewableFiles
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:698
Function
TestOutputPreview_SarifRejects
--preview --format sarif should error, not emit a non-SARIF document.
cmd/opencodereview/sarif_test.go:755
Function
TestOutputRetryReportText_CancelledIsShown
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:176
Function
TestOutputRetryReportText_EmptyRequestsHasNoDanglingSummary
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:91
Function
TestOutputRetryReportText_NilWritesNothing
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:83
Function
TestOutputRetryReportText_PluralAgreement
Counted nouns are singular at one and plural above it.
cmd/opencodereview/retry_report_render_test.go:103
Function
TestOutputRetryReportText_RecoveredAndFailed
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:75
Function
TestOutputRetryReportText_SanitizesControlChars
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:229
Function
TestOutputRetryReportText_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
Function
TestOutputRetryReportText_TruncatesStageList
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:240
Function
TestOutputSARIF_BasicStructure
--- AC-1: Basic SARIF output structure ---
cmd/opencodereview/sarif_test.go:50
Function
TestOutputSARIF_EmptyCategory
--- AC-7: Empty Category defaults to "other" ---
cmd/opencodereview/sarif_test.go:234
Function
TestOutputSARIF_EmptyComments
--- AC-2: Empty comments produces empty results array (not null) ---
cmd/opencodereview/sarif_test.go:94
Function
TestOutputSARIF_FullFieldMapping
--- AC-4: Full field mapping ---
cmd/opencodereview/sarif_test.go:136
Function
TestOutputSARIF_JSONFormatting
--- AC-14: JSON formatting (2-space indent, trailing newline) ---
cmd/opencodereview/sarif_test.go:461
Function
TestOutputSARIF_MultipleComments
--- AC-15: Multiple comments ---
cmd/opencodereview/sarif_test.go:478
Function
TestOutputSARIF_NoFixes
--- AC-9: Missing suggestion/existing code omits fixes ---
cmd/opencodereview/sarif_test.go:294
Function
TestOutputSARIF_SchemaCompliance
--- AC-13: Schema compliance (field types) ---
cmd/opencodereview/sarif_test.go:403
Function
TestOutputSARIF_ZeroLineNumbers
--- AC-8: Zero line numbers omit region AND fixes (deletedRegion is required) ---
cmd/opencodereview/sarif_test.go:257
Function
TestOutputTextWithWarnings_NoCommentsNoErrors
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:562
Function
TestOutputTextWithWarnings_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
Function
TestOutputTextWithWarnings_NoCommentsWithSubtaskError
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:572
Function
TestOutputTextWithWarnings_WithComments
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:607
← previous
next →
4,801–4,900 of 7,390, ranked by callers