Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
7,484 in github.com/alibaba/open-code-review
⨍
Functions
7,484
◇
Types & classes
809
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
Function
TestOutputText_NoComments
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:538
Function
TestOutputText_WithComments
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:547
Function
TestPagerCSS_StaysHiddenUntilScripted
(t *testing.T)
internal/viewer/server_extra_test.go:322
Function
TestPagerJS_Contract
(t *testing.T)
internal/viewer/server_extra_test.go:975
Function
TestParentCommands_KnownSubcommandStillWorks
TestParentCommands_KnownSubcommandStillWorks ensures that adding RunE to parent commands does not break legitimate subcommand routing.
cmd/opencodereview/parent_cmd_test.go:53
Function
TestParentCommands_NoArgsPrintsHelp
TestParentCommands_NoArgsPrintsHelp verifies that invoking a parent command with no arguments still prints help and exits 0 (RunE returns cmd.Help() w
cmd/opencodereview/parent_cmd_test.go:92
Function
TestParentCommands_UnknownSubcommand
TestParentCommands_UnknownSubcommand verifies that parent commands which previously silently printed help and exited 0 now return a non-zero exit code
cmd/opencodereview/parent_cmd_test.go:17
Function
TestParseBatchStrategy
(t *testing.T)
internal/scan/batch_test.go:33
Function
TestParseBpeData_EmptyLines
(t *testing.T)
internal/llm/embedded_loader_test.go:26
Function
TestParseBpeData_InvalidBase64
(t *testing.T)
internal/llm/embedded_loader_test.go:45
Function
TestParseBpeData_InvalidLine
(t *testing.T)
internal/llm/embedded_loader_test.go:37
Function
TestParseBpeData_InvalidRank
(t *testing.T)
internal/llm/embedded_loader_test.go:53
Function
TestParseBpeData_Valid
(t *testing.T)
internal/llm/embedded_loader_test.go:11
Function
TestParseComments
(t *testing.T)
internal/tool/code_comment_test.go:15
Function
TestParseComments_CategorySeverity
TestParseComments_CategorySeverity verifies the structured category and severity fields are read off each comment object when present, and left zero-v
internal/tool/code_comment_test.go:142
Function
TestParseComments_CategorySeveritySchemaDrift
(t *testing.T)
internal/tool/code_comment_test.go:223
Function
TestParseComments_CleanRepairIsAcceptedIntact
TestParseComments_CleanRepairIsAcceptedIntact is the contrast that keeps the detector honest: every fixture here is an actually-observed failure shape
internal/tool/comment_args_repair_test.go:468
Function
TestParseComments_Fields
(t *testing.T)
internal/tool/code_comment_test.go:102
Function
TestParseComments_NormalizePath
(t *testing.T)
internal/tool/code_comment_test.go:385
Function
TestParseComments_RepairKeepsEveryCommentInTheBatch
(t *testing.T)
internal/tool/comment_args_repair_test.go:95
Function
TestParseComments_RepairRejectedWhenABatchEntryEndsUpEmpty
(t *testing.T)
internal/tool/comment_args_repair_test.go:132
Function
TestParseComments_RepairRejectedWhenProseBecameAField
(t *testing.T)
internal/tool/comment_args_repair_test.go:206
Function
TestParseComments_RepairsAllControlCharacters
(t *testing.T)
internal/tool/comment_args_repair_test.go:190
Function
TestParseComments_RepairsBareControlCharacter
(t *testing.T)
internal/tool/comment_args_repair_test.go:79
Function
TestParseComments_RepairsIllegalBackslashEscape
(t *testing.T)
internal/tool/comment_args_repair_test.go:153
Function
TestParseComments_RepairsProseQuoteAcrossMultiByteRunes
(t *testing.T)
internal/tool/comment_args_repair_test.go:61
Function
TestParseComments_RepairsUnescapedProseQuote
(t *testing.T)
internal/tool/comment_args_repair_test.go:36
Function
TestParseComments_SuspectContentRejectsTheBatch
(t *testing.T)
internal/tool/comment_args_repair_test.go:449
Function
TestParseComments_SuspectExistingCodeRejectsTheBatch
(t *testing.T)
internal/tool/comment_args_repair_test.go:454
Function
TestParseComments_SuspectPathRejectsTheBatch
(t *testing.T)
internal/tool/comment_args_repair_test.go:460
Function
TestParseComments_SuspectSuggestionRejectsTheBatch
One case per checked field, each feeding a value the scan cuts short. All must be refused rather than partially recovered: a cut existing_code matches
internal/tool/comment_args_repair_test.go:443
Function
TestParseComments_TruncatedThinkingStillAccepted
TestParseComments_TruncatedThinkingStillAccepted pins the decision to leave thinking out of commentTextFields. Adding it looks like a completeness win
internal/tool/comment_args_repair_test.go:504
Function
TestParseComments_UnrepairableKeepsOriginalParserWording
(t *testing.T)
internal/tool/comment_args_repair_test.go:114
Function
TestParseComments_WellFormedInputReportsNoRepair
(t *testing.T)
internal/tool/comment_args_repair_test.go:308
Function
TestParseDiffHeaderLine_QuotingCombinations
TestParseDiffHeaderLine_QuotingCombinations covers issue #1492. Git quotes the two sides of a header independently, so a changed file can arrive in an
internal/diff/quotedpath_test.go:64
Function
TestParseDiffText_AmbiguousRenameHeaderStillUsesRenameLines
TestParseDiffText_AmbiguousRenameHeaderStillUsesRenameLines pins that a rename whose two paths both contain " b/" keeps taking its paths from the "ren
internal/diff/parser_test.go:131
Function
TestParseDiffText_BinaryMarkerAnchored
TestParseDiffText_BinaryMarkerAnchored guards two binary-detection cases: a text file whose CONTENT mentions "Binary files " must not be classified as
internal/diff/parser_test.go:249
Function
TestParseDiffText_CRLFKeepsDevNullMetadata
The "new file mode" / "deleted file mode" headers are matched by prefix, so they survive a trailing CR on their own. The /dev/null markers are compare
internal/diff/crlf_test.go:50
Function
TestParseDiffText_CRLFKeepsPathsClean
CRLF-terminated diff text reaches the parser from a .patch checked out under core.autocrlf=true, or from output captured through a Windows shell. Befo
internal/diff/crlf_test.go:16
Function
TestParseDiffText_CountsContentLinesWithPlusMinusPrefix
TestParseDiffText_CountsContentLinesWithPlusMinusPrefix covers content lines that themselves begin with "++"/"--": an added line "++i" renders in the
internal/diff/parser_test.go:286
Function
TestParseDiffText_DeletedFile
TestParseDiffText_DeletedFile guards the /dev/null detection: git emits "+++ /dev/null" WITHOUT the b/ prefix, which the old regexes required, so dele
internal/diff/parser_test.go:184
Function
TestParseDiffText_DevNullStringInsideHunk
TestParseDiffText_DevNullStringInsideHunk ensures an added content line whose rendered form is exactly "+++ /dev/null" (i.e. the file gained a line re
internal/diff/parser_test.go:317
← previous
next →
4,901–5,000 of 7,484, ranked by callers