MCPcopy Create free account

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

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

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
FunctionTestOutputText_NoComments
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:538
FunctionTestOutputText_WithComments
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:547
FunctionTestPagerCSS_StaysHiddenUntilScripted
(t *testing.T)
internal/viewer/server_extra_test.go:322
FunctionTestPagerJS_Contract
(t *testing.T)
internal/viewer/server_extra_test.go:975
FunctionTestParentCommands_KnownSubcommandStillWorks
TestParentCommands_KnownSubcommandStillWorks ensures that adding RunE to parent commands does not break legitimate subcommand routing.
cmd/opencodereview/parent_cmd_test.go:53
FunctionTestParentCommands_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
FunctionTestParentCommands_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
FunctionTestParseBatchStrategy
(t *testing.T)
internal/scan/batch_test.go:33
FunctionTestParseBpeData_EmptyLines
(t *testing.T)
internal/llm/embedded_loader_test.go:26
FunctionTestParseBpeData_InvalidBase64
(t *testing.T)
internal/llm/embedded_loader_test.go:45
FunctionTestParseBpeData_InvalidLine
(t *testing.T)
internal/llm/embedded_loader_test.go:37
FunctionTestParseBpeData_InvalidRank
(t *testing.T)
internal/llm/embedded_loader_test.go:53
FunctionTestParseBpeData_Valid
(t *testing.T)
internal/llm/embedded_loader_test.go:11
FunctionTestParseComments
(t *testing.T)
internal/tool/code_comment_test.go:15
FunctionTestParseComments_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
FunctionTestParseComments_CategorySeveritySchemaDrift
(t *testing.T)
internal/tool/code_comment_test.go:223
FunctionTestParseComments_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
FunctionTestParseComments_Fields
(t *testing.T)
internal/tool/code_comment_test.go:102
FunctionTestParseComments_NormalizePath
(t *testing.T)
internal/tool/code_comment_test.go:385
FunctionTestParseComments_RepairKeepsEveryCommentInTheBatch
(t *testing.T)
internal/tool/comment_args_repair_test.go:95
FunctionTestParseComments_RepairRejectedWhenABatchEntryEndsUpEmpty
(t *testing.T)
internal/tool/comment_args_repair_test.go:132
FunctionTestParseComments_RepairRejectedWhenProseBecameAField
(t *testing.T)
internal/tool/comment_args_repair_test.go:206
FunctionTestParseComments_RepairsAllControlCharacters
(t *testing.T)
internal/tool/comment_args_repair_test.go:190
FunctionTestParseComments_RepairsBareControlCharacter
(t *testing.T)
internal/tool/comment_args_repair_test.go:79
FunctionTestParseComments_RepairsIllegalBackslashEscape
(t *testing.T)
internal/tool/comment_args_repair_test.go:153
FunctionTestParseComments_RepairsProseQuoteAcrossMultiByteRunes
(t *testing.T)
internal/tool/comment_args_repair_test.go:61
FunctionTestParseComments_RepairsUnescapedProseQuote
(t *testing.T)
internal/tool/comment_args_repair_test.go:36
FunctionTestParseComments_SuspectContentRejectsTheBatch
(t *testing.T)
internal/tool/comment_args_repair_test.go:449
FunctionTestParseComments_SuspectExistingCodeRejectsTheBatch
(t *testing.T)
internal/tool/comment_args_repair_test.go:454
FunctionTestParseComments_SuspectPathRejectsTheBatch
(t *testing.T)
internal/tool/comment_args_repair_test.go:460
FunctionTestParseComments_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
FunctionTestParseComments_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
FunctionTestParseComments_UnrepairableKeepsOriginalParserWording
(t *testing.T)
internal/tool/comment_args_repair_test.go:114
FunctionTestParseComments_WellFormedInputReportsNoRepair
(t *testing.T)
internal/tool/comment_args_repair_test.go:308
FunctionTestParseDiffHeaderLine_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
FunctionTestParseDiffText_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
FunctionTestParseDiffText_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
FunctionTestParseDiffText_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
FunctionTestParseDiffText_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
FunctionTestParseDiffText_CountsContentLinesWithPlusMinusPrefix
TestParseDiffText_CountsContentLinesWithPlusMinusPrefix covers content lines that themselves begin with "++"/"--": an added line "++i" renders in the
internal/diff/parser_test.go:286
FunctionTestParseDiffText_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
FunctionTestParseDiffText_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
← previousnext →4,901–5,000 of 7,484, ranked by callers