MCPcopy Create free account

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

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

FunctionTestAppendTaskRecord
(t *testing.T)
internal/session/history_test.go:120
FunctionTestAppendTaskRecord_CopiesNativeAndReasoningContent
TestAppendTaskRecord_CopiesNativeAndReasoningContent guards copyMessages' own "deep copy" contract: an assistant history message carrying replay state
internal/session/history_test.go:166
FunctionTestAppendTaskRecord_CopiesToolCallExtraContent
TestAppendTaskRecord_CopiesToolCallExtraContent guards copyMessages' deep-copy contract for the one tool-call field that is a byte slice: a plain elem
internal/session/history_test.go:649
FunctionTestAppendTaskRecord_DefensiveCopy
(t *testing.T)
internal/session/history_test.go:147
FunctionTestAppendTaskRecord_PersistsToolCallExtraContent
TestAppendTaskRecord_PersistsToolCallExtraContent guards the request half of the #1357 contract: a tool call's opaque provider metadata must survive i
internal/session/history_test.go:559
FunctionTestAppendTaskRecord_PersistsToolCallsAndNativePayload
TestAppendTaskRecord_PersistsToolCallsAndNativePayload guards copyMessagesForJSON: the llm_request record's messages must be a self-contained, replaya
internal/session/history_test.go:382
FunctionTestApplyCLIExcludes_AppendsPatterns
(t *testing.T)
cmd/opencodereview/shared_test.go:57
FunctionTestApplyCLIExcludes_Empty
(t *testing.T)
cmd/opencodereview/shared_test.go:49
FunctionTestApplyCLIExcludes_NilFileFilter
(t *testing.T)
cmd/opencodereview/shared_test.go:65
FunctionTestApplyCreateCustomProvider
TestApplyCreateCustomProvider covers the create-custom-provider handler: nil config guard, empty config path guard, empty name, duplicate name, succes
cmd/opencodereview/provider_tui_persist_test.go:177
FunctionTestApplyCustomProviderConfigInvalidName
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:292
FunctionTestApplyCustomProviderConfigNormalizesAuthHeader
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2735
FunctionTestApplyCustomProviderConfigPreservesModelOrder
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2665
FunctionTestApplyCustomProviderConfig_EmptyKeyClearsSavedAPIKey
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:390
FunctionTestApplyCustomProviderConfig_MissingModel
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:307
FunctionTestApplyCustomProviderConfig_MissingProvider
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:285
FunctionTestApplyDedupGroups_AcceptsMarkdownFences
(t *testing.T)
internal/scan/dedup_test.go:84
FunctionTestApplyDedupGroups_KeepCanonicalContentWhenNoMergedContent
(t *testing.T)
internal/scan/dedup_test.go:48
FunctionTestApplyDedupGroups_MergeAndKeep
(t *testing.T)
internal/scan/dedup_test.go:17
FunctionTestApplyDedupGroups_RejectsBadShapes
(t *testing.T)
internal/scan/dedup_test.go:64
FunctionTestApplyEditCustomProviderSave_ClearsAPIKeyWhenEditedEmpty
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:810
FunctionTestApplyEditCustomProviderSave_Guards
TestApplyEditCustomProviderSave_Guards covers the two early-return guards: a nil config and an empty config path.
cmd/opencodereview/provider_tui_editsave_test.go:14
FunctionTestApplyEditCustomProviderSave_PreservesAPIKeyWhenMasked
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:848
FunctionTestApplyEditCustomProviderSave_RenameReassignsActiveProvider
TestApplyEditCustomProviderSave_RenameReassignsActiveProvider covers the name-change branch where the edited provider is also the active provider: the
cmd/opencodereview/provider_tui_editsave_test.go:40
FunctionTestApplyEditCustomProviderSave_SaveFailureRestoresBackup
TestApplyEditCustomProviderSave_SaveFailureRestoresBackup covers the save-failure path where the reload also fails (config path is a directory, so bot
cmd/opencodereview/provider_tui_editsave_test.go:78
FunctionTestApplyEffort
(t *testing.T)
internal/config/template/effort_test.go:41
FunctionTestApplyExtraHeaders
(t *testing.T)
acp/internal/intent/llm/client_test.go:370
FunctionTestApplyLanguage
(t *testing.T)
internal/config/template/template_test.go:303
FunctionTestApplyLanguage
(t *testing.T)
internal/config/testconnection/testconnection_test.go:59
FunctionTestApplyLanguage_DefaultEnglish
(t *testing.T)
internal/config/template/template_test.go:322
FunctionTestApplyLanguage_EmptyLang
(t *testing.T)
internal/config/testconnection/testconnection_test.go:82
FunctionTestApplyLanguage_ScanTemplate
(t *testing.T)
internal/config/template/template_test.go:118
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
FunctionTestBehaviorMainTaskMessageStructure
(test *testing.T)
internal/config/template/behavior_test.go:46
FunctionTestBehaviorReportFocusSurvivesEveryPhase
(test *testing.T)
internal/config/template/behavior_test.go:90
FunctionTestBehaviorTemplateIsolation
(test *testing.T)
internal/config/template/behavior_test.go:13
FunctionTestBehaviorTemplateValidation
(test *testing.T)
internal/config/template/behavior_test.go:67
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
← previousnext →3,401–3,500 of 7,390, ranked by callers