MCPcopy Create free account

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

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

FunctionTestApplyLanguage_ScanTemplate_AllOptionalTasks
(t *testing.T)
internal/config/template/template_test.go:429
FunctionTestApplyLanguage_ScanTemplate_NilOptionalTasks
(t *testing.T)
internal/config/template/template_test.go:462
FunctionTestApplyLanguage_SkipsNonSystemMessages
(t *testing.T)
internal/config/template/template_test.go:477
FunctionTestApplyManualConfigNormalizesAuthHeader
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2709
FunctionTestApplyManualConfig_DoubleWritesProtocolAndUseAnthropic
TestApplyManualConfig_DoubleWritesProtocolAndUseAnthropic verifies the dual write: cfg.Llm.Protocol always gets the canonical name, and UseAnthropic i
cmd/opencodereview/provider_tui_test.go:2902
FunctionTestApplyManualConfig_MissingModel
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:278
FunctionTestApplyManualConfig_MissingURL
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:271
FunctionTestApplyModelDeleteToEntry
(t *testing.T)
cmd/opencodereview/provider_tui_rollback_test.go:39
FunctionTestApplyOfficialProviderConfig_APIKeyCmdSatisfiesRequirement
A provider configured with only api_key_cmd must survive a trip through the TUI: picking a model returns an empty apiKey, which must not be mistaken f
cmd/opencodereview/provider_cmd_test.go:360
FunctionTestApplyOfficialProviderConfig_EmptyKeyClearsSavedAPIKey
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:321
FunctionTestApplyOfficialProviderConfig_IgnoresURLFromResult
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:557
FunctionTestApplyOfficialProviderConfig_MissingFields
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:314
FunctionTestApplyOfficialProviderConfig_PreservesURLWhenWizardOmitsURL
TestApplyOfficialProviderConfig_PreservesURLWhenWizardOmitsURL verifies that the URL configured through `ocr config set` survives a later provider wiz
cmd/opencodereview/provider_cmd_test.go:532
FunctionTestApplyOfficialProviderConfig_UsesSessionModelPick
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:450
FunctionTestApplyOfficialProviderConfig_Validation
TestApplyOfficialProviderConfig_Validation covers the pre-save validation branches (empty provider, empty model, missing API key) that reject the requ
cmd/opencodereview/provider_config_apply_test.go:15
FunctionTestApplyProviderConfig_TestsWrittenConfigPath
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:229
FunctionTestApplyProviderDeletions
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:126
FunctionTestApplyProviderDeletions_ActiveCleared
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:160
FunctionTestApplyProviderDeletions_SkipsNotFound
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:183
FunctionTestApplyProviderField
TestApplyProviderField exercises every field branch of applyProviderField, including the JSON/parse error paths and the unknown-field default.
cmd/opencodereview/apply_provider_field_test.go:12
FunctionTestApplyResumeLine_InvalidJSON
(t *testing.T)
internal/session/resume_test.go:386
FunctionTestApplyResumeLine_OrphanLLMRequestIsNoOp
TestApplyResumeLine_OrphanLLMRequestIsNoOp is the same guarantee at the unit level: the line must change nothing at all, not merely avoid an error.
internal/session/resume_orphan_request_test.go:63
FunctionTestApplyResumeLine_ReviewItemDone
(t *testing.T)
internal/session/resume_test.go:284
FunctionTestApplyResumeLine_ReviewItemDone_EmptyFingerprint
(t *testing.T)
internal/session/resume_test.go:324
FunctionTestApplyResumeLine_ReviewItemDone_FallbackToNewPath
(t *testing.T)
internal/session/resume_test.go:307
FunctionTestApplyResumeLine_ReviewItemFailed
(t *testing.T)
internal/session/resume_test.go:349
FunctionTestApplyResumeLine_ReviewItemFailed_EmptyFingerprint
(t *testing.T)
internal/session/resume_test.go:363
FunctionTestApplyResumeLine_ReviewItemReused
(t *testing.T)
internal/session/resume_test.go:336
FunctionTestApplyResumeLine_SessionStart
--- applyResumeLine ---
internal/session/resume_test.go:260
FunctionTestApplyResumeLine_UnknownType
(t *testing.T)
internal/session/resume_test.go:377
FunctionTestApplyResumeReusesCompletedItemsAcrossModels
(t *testing.T)
internal/agent/agent_test.go:759
FunctionTestApplyResumeWorkspaceReusesCompletedItems
(t *testing.T)
internal/agent/agent_test.go:821
FunctionTestApplySessionStart_OverridesRepoDir
(t *testing.T)
internal/session/resume_test.go:406
FunctionTestApplySessionStart_PreservesRepoDirWhenCwdEmpty
--- applySessionStart ---
internal/session/resume_test.go:398
FunctionTestApplySessionStart_PreservesSessionIDWhenEmpty
(t *testing.T)
internal/session/resume_test.go:414
FunctionTestApplySessionStart_SetsAllFields
(t *testing.T)
internal/session/resume_test.go:422
FunctionTestApplySessionStart_SetsScanPathScope
(t *testing.T)
internal/session/resume_test.go:860
FunctionTestArgCountErrors_AreActionable
TestArgCountErrors_AreActionable verifies that a wrong positional-argument count reports what the command expects instead of Cobra's raw "accepts 2 ar
cmd/opencodereview/arg_errors_test.go:19
FunctionTestArgCountErrors_MatchHelpOutput
TestArgCountErrors_MatchHelpOutput guards the property that makes this approach maintainable: the usage line in the error is the command's own UseLine
cmd/opencodereview/arg_errors_test.go:174
FunctionTestAuthDefaultsToChatGPT
(t *testing.T)
cmd/opencodereview/auth_cmd_test.go:17
FunctionTestAuthLoginFlagsAreMutuallyExclusive
(t *testing.T)
cmd/opencodereview/auth_cmd_test.go:61
FunctionTestAuthRejectsUnsupportedProviderWithoutAccountFlags
(t *testing.T)
cmd/opencodereview/auth_cmd_test.go:52
FunctionTestAuthorizationAndCallbacks
(t *testing.T)
internal/chatgptauth/auth_test.go:225
FunctionTestAwaitCompletedProcessObservesCancellationWithoutWatcher
(t *testing.T)
acp/internal/orchestrator/termination_test.go:76
FunctionTestAwaitFirstObservedCauseSurvivesCleanup
(t *testing.T)
acp/internal/orchestrator/termination_test.go:152
FunctionTestAwaitObservedTimeoutIsNotReplacedByCancel
(t *testing.T)
acp/internal/orchestrator/termination_test.go:213
FunctionTestAwaitRechecksAfterConsumingCompletion
(t *testing.T)
acp/internal/orchestrator/termination_test.go:119
FunctionTestBedrockClientReportsAWSFailureAsError
TestBedrockClientReportsAWSFailureAsError is the guard against the SDK's bedrock.WithLoadDefaultConfig, which panics when AWS config cannot be loaded.
internal/llm/bedrock_test.go:525
FunctionTestBedrockContextReportsResolvedRegion
TestBedrockContextReportsResolvedRegion covers what `ocr llm test` prints: bedrock has no configured URL, so the resolved region is the only way to se
internal/llm/bedrock_test.go:506
FunctionTestBedrockDoesNotRunAPIKeyCmd
TestBedrockDoesNotRunAPIKeyCmd pins that an ambient-auth provider never executes api_key_cmd. A signed request has no use for the output, and the comm
internal/llm/bedrock_test.go:102
FunctionTestBedrockIsRejectedOnTheURLAndTokenPaths
TestBedrockIsRejectedOnTheURLAndTokenPaths covers the two strategies that describe a single HTTP endpoint. Both validated anthropic-bedrock as a proto
internal/llm/bedrock_test.go:205
FunctionTestBedrockModelOverrideIsNotGatedByThePresetList
TestBedrockModelOverrideIsNotGatedByThePresetList covers identifiers scoped to an account and region that cannot appear in a list compiled upstream.
internal/llm/bedrock_test.go:300
FunctionTestBedrockProtocolIsRecognized
TestBedrockProtocolIsRecognized guards the three-part contract documented in protocol.go: a new protocol needs a constant, a NormalizeProtocol case, a
internal/llm/bedrock_test.go:33
FunctionTestBedrockProviderIsRegistered
TestBedrockProviderIsRegistered pins the preset's shape. An api_key or a BaseURL here would be wrong: credentials come from the AWS chain and the host
internal/llm/bedrock_test.go:47
FunctionTestBindRawWriter_NilHolderIsNoop
(t *testing.T)
cmd/opencodereview/shared_raw_test.go:41
FunctionTestBindRawWriter_OpenFailureIsNoop
(t *testing.T)
cmd/opencodereview/shared_raw_test.go:81
FunctionTestBindRawWriter_OpensSessionRawFile
(t *testing.T)
cmd/opencodereview/shared_raw_test.go:56
FunctionTestBlurCPStep_AllSteps
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:459
FunctionTestBlurManualStep_AllSteps
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:573
FunctionTestBoundaryCancelDuringBackoffIsCancelled
--- outcome is decided at Finalize, not read off the last attempt --- Cancelling while the SDK sleeps between attempts produces no new attempt, so the
internal/llm/retry_boundary_test.go:381
FunctionTestBoundaryCorrectsDecodeFailure
--- blind spot 2: any other decode failure after HTTP 200 --- A 200 whose body is not JSON at all fails in the SDK's post-retry-loop decode and arrive
internal/llm/retry_boundary_test.go:194
FunctionTestBoundaryCorrectsMidStreamFailure
--- blind spot 3: a stream that fails after it opened --- The stream opens with HTTP 200 and then ends without any choice reaching a finish_reason. OC
internal/llm/retry_boundary_test.go:230
FunctionTestBoundaryCorrectsResponsesStatus
--- blind spot 4: a Responses object that is not a success --- The Responses API answers HTTP 200 with the failure inside the object, so the SDK retur
internal/llm/retry_boundary_test.go:300
FunctionTestBoundaryCorrectsTruncatedResponse
--- blind spot 1: truncated body after HTTP 200 --- A body shorter than its Content-Length fails during the read that happens after the SDK's retry lo
internal/llm/retry_boundary_test.go:70
FunctionTestBoundaryDeadlineExceededIsFailed
A parent deadline is not a user abort: only context.Canceled reaches parentCancelled, so an expired parent context is failed. Conflating the two would
internal/llm/retry_boundary_test.go:512
FunctionTestBoundaryHelpersAreInertWithoutCollectorOrMeta
A nil collector and a context without identity are both no-ops, so no call site in the three clients needs to guard either.
internal/llm/retry_boundary_test.go:718
FunctionTestBoundaryKeepsHTTPClassOnCorruptErrorBody
--- the counter-example: corrections must not overwrite an HTTP class --- A 5xx whose error body is corrupt makes the SDK return the raw JSON error in
internal/llm/retry_boundary_test.go:342
FunctionTestBoundaryKeepsHTTPClassOnStreamThatNeverOpened
A stream that never opened needs no correction: stream.Err() carries the non-2xx *apierror.Error, the observer already recorded the attempt as an erro
internal/llm/retry_boundary_test.go:270
FunctionTestBoundaryKeepsTruncationCorrectionWhenRecallIsCancelled
The truncation correction is applied before the EOF branch consults ctx, so a request that ends cancelled still shows why the 200 was not usable. Noth
internal/llm/retry_boundary_test.go:143
FunctionTestBoundaryRetryAfterOutlivingAttemptTimeoutIsFailed
The same backoff wait as the test above, ended by the per-attempt timeout instead of a user abort — the pair that pins the cancelled/failed split. Bo
internal/llm/retry_boundary_test.go:447
FunctionTestBoundarySkipsRequestWithoutAttempt
A request that fails before any HTTP attempt (here: unparsable tool call arguments) has no entry to finalize, so it is absent from the report rather t
internal/llm/retry_boundary_test.go:548
FunctionTestBoundedStderrKeepsPrefixAndSuffix
boundedStderr must keep the head and tail of a stream while draining all of it: Output's retention stays bounded like exec.Cmd.Output even when a comm
internal/gitcmd/runner_pipe_test.go:184
FunctionTestBrowserCandidates
(t *testing.T)
internal/viewer/browser_test.go:12
FunctionTestBrowserHelperProcess
TestBrowserHelperProcess is not a real test. It is the child process the tests below exec, standing in for xdg-open/open/rundll32 so exit-status handl
internal/viewer/browser_exec_test.go:31
FunctionTestBrowserOpenerUsesExecutableAndWaits
(t *testing.T)
internal/chatgptauth/io_test.go:129
FunctionTestBudgetExceededFlag
TestBudgetExceededFlag pins BudgetExceeded() to the actual state of the token budget gate. Before this it was hard-coded false, so a budget stop never
internal/scan/budget_exceeded_test.go:26
FunctionTestBudgetGate_PlanThreshold
(t *testing.T)
internal/scan/budget_test.go:127
FunctionTestBudgetGate_StopsBeforeExceeding
TestBudgetGate_StopsBeforeExceeding verifies the per-file gate stops dispatch once the running token total + next-file look-ahead would blow the budge
internal/scan/budget_test.go:79
FunctionTestBudgetGate_Unlimited
TestBudgetGate_Unlimited verifies MaxTokensBudget=0 runs every file.
internal/scan/budget_test.go:184
FunctionTestBuild
(t *testing.T)
acp/internal/testutil/stub_test.go:69
FunctionTestBuildAllowedHosts
(t *testing.T)
internal/viewer/hostguard_test.go:51
FunctionTestBuildAllowedHosts_BracketedIPv6
(t *testing.T)
internal/viewer/server_extra_test.go:762
FunctionTestBuildAnthropicParams_AllRoles
TestBuildAnthropicParams_AllRoles exercises every message-role branch (system, tool-result flushing, assistant with/without tool calls, user string an
internal/llm/client_params_test.go:114
FunctionTestBuildAnthropicParams_CacheControl
(t *testing.T)
internal/llm/client_test.go:110
FunctionTestBuildAnthropicParams_CacheControl_NoSystem
(t *testing.T)
internal/llm/client_test.go:204
FunctionTestBuildAnthropicParams_CacheControl_NoTools
(t *testing.T)
internal/llm/client_test.go:177
FunctionTestBuildAnthropicParams_DefaultMaxTokens
TestBuildAnthropicParams_DefaultMaxTokens verifies the fallback to 8192 when the request omits MaxTokens, and that optional fields stay unset.
internal/llm/client_params_test.go:180
FunctionTestBuildAnthropicParams_DynamicCacheBreakpoint
(t *testing.T)
internal/llm/client_test.go:232
FunctionTestBuildAnthropicParams_InvalidToolArgs
TestBuildAnthropicParams_InvalidToolArgs covers the error branch where an assistant tool call carries malformed JSON arguments.
internal/llm/client_params_test.go:164
FunctionTestBuildAnthropicParams_NativeReuseDoesNotAliasOriginalSlice
TestBuildAnthropicParams_NativeReuseDoesNotAliasOriginalSlice guards the slice-aliasing fix: buildAnthropicParams must not let the dynamic cache_contr
internal/llm/native_turn_test.go:325
FunctionTestBuildAnthropicParams_NullToolCallArguments
(t *testing.T)
internal/llm/client_test.go:317
FunctionTestBuildAnthropicParams_ToolChoice
TestBuildAnthropicParams_ToolChoice locks the explicit tool_choice mapping. Anthropic has no bare "required" mode — the client must translate ChatRequ
internal/llm/client_params_test.go:208
FunctionTestBuildBadge
(t *testing.T)
cmd/opencodereview/output_test.go:14
FunctionTestBuildChangeFilesExceptGroup
(t *testing.T)
internal/agent/agent_test.go:925
FunctionTestBuildDedupCommentsJSON_IncludesIDsAndKeyFields
(t *testing.T)
internal/scan/dedup_test.go:93
FunctionTestBuildDiffLines
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:165
FunctionTestBuildFileMetadataTable
(t *testing.T)
internal/agent/grouping_test.go:555
FunctionTestBuildGrepArgs_CaseInsensitive
(t *testing.T)
internal/tool/code_search_test.go:81
FunctionTestBuildGrepArgs_CaseSensitive
(t *testing.T)
internal/tool/code_search_test.go:74
FunctionTestBuildGrepArgs_CommitMode
(t *testing.T)
internal/tool/code_search_test.go:36
← previousnext →3,301–3,400 of 7,169, ranked by callers