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
TestAppendTaskRecord
(t *testing.T)
internal/session/history_test.go:120
Function
TestAppendTaskRecord_CopiesNativeAndReasoningContent
TestAppendTaskRecord_CopiesNativeAndReasoningContent guards copyMessages' own "deep copy" contract: an assistant history message carrying replay state
internal/session/history_test.go:166
Function
TestAppendTaskRecord_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
Function
TestAppendTaskRecord_DefensiveCopy
(t *testing.T)
internal/session/history_test.go:147
Function
TestAppendTaskRecord_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
Function
TestAppendTaskRecord_PersistsToolCallsAndNativePayload
TestAppendTaskRecord_PersistsToolCallsAndNativePayload guards copyMessagesForJSON: the llm_request record's messages must be a self-contained, replaya
internal/session/history_test.go:382
Function
TestApplyCLIExcludes_AppendsPatterns
(t *testing.T)
cmd/opencodereview/shared_test.go:57
Function
TestApplyCLIExcludes_Empty
(t *testing.T)
cmd/opencodereview/shared_test.go:49
Function
TestApplyCLIExcludes_NilFileFilter
(t *testing.T)
cmd/opencodereview/shared_test.go:65
Function
TestApplyCreateCustomProvider
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
Function
TestApplyCustomProviderConfigInvalidName
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:292
Function
TestApplyCustomProviderConfigNormalizesAuthHeader
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2735
Function
TestApplyCustomProviderConfigPreservesModelOrder
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2665
Function
TestApplyCustomProviderConfig_EmptyKeyClearsSavedAPIKey
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:390
Function
TestApplyCustomProviderConfig_MissingModel
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:307
Function
TestApplyCustomProviderConfig_MissingProvider
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:285
Function
TestApplyDedupGroups_AcceptsMarkdownFences
(t *testing.T)
internal/scan/dedup_test.go:84
Function
TestApplyDedupGroups_KeepCanonicalContentWhenNoMergedContent
(t *testing.T)
internal/scan/dedup_test.go:48
Function
TestApplyDedupGroups_MergeAndKeep
(t *testing.T)
internal/scan/dedup_test.go:17
Function
TestApplyDedupGroups_RejectsBadShapes
(t *testing.T)
internal/scan/dedup_test.go:64
Function
TestApplyEditCustomProviderSave_ClearsAPIKeyWhenEditedEmpty
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:810
Function
TestApplyEditCustomProviderSave_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
Function
TestApplyEditCustomProviderSave_PreservesAPIKeyWhenMasked
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:848
Function
TestApplyEditCustomProviderSave_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
Function
TestApplyEditCustomProviderSave_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
Function
TestApplyEffort
(t *testing.T)
internal/config/template/effort_test.go:41
Function
TestApplyExtraHeaders
(t *testing.T)
acp/internal/intent/llm/client_test.go:370
Function
TestApplyLanguage
(t *testing.T)
internal/config/template/template_test.go:303
Function
TestApplyLanguage
(t *testing.T)
internal/config/testconnection/testconnection_test.go:59
Function
TestApplyLanguage_DefaultEnglish
(t *testing.T)
internal/config/template/template_test.go:322
Function
TestApplyLanguage_EmptyLang
(t *testing.T)
internal/config/testconnection/testconnection_test.go:82
Function
TestApplyLanguage_ScanTemplate
(t *testing.T)
internal/config/template/template_test.go:118
Function
TestApplyLanguage_ScanTemplate_AllOptionalTasks
(t *testing.T)
internal/config/template/template_test.go:429
Function
TestApplyLanguage_ScanTemplate_NilOptionalTasks
(t *testing.T)
internal/config/template/template_test.go:462
Function
TestApplyLanguage_SkipsNonSystemMessages
(t *testing.T)
internal/config/template/template_test.go:477
Function
TestApplyManualConfigNormalizesAuthHeader
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2709
Function
TestApplyManualConfig_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
Function
TestApplyManualConfig_MissingModel
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:278
Function
TestApplyManualConfig_MissingURL
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:271
Function
TestApplyModelDeleteToEntry
(t *testing.T)
cmd/opencodereview/provider_tui_rollback_test.go:39
Function
TestApplyOfficialProviderConfig_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
Function
TestApplyOfficialProviderConfig_EmptyKeyClearsSavedAPIKey
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:321
Function
TestApplyOfficialProviderConfig_IgnoresURLFromResult
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:557
Function
TestApplyOfficialProviderConfig_MissingFields
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:314
Function
TestApplyOfficialProviderConfig_PreservesURLWhenWizardOmitsURL
TestApplyOfficialProviderConfig_PreservesURLWhenWizardOmitsURL verifies that the URL configured through `ocr config set` survives a later provider wiz
cmd/opencodereview/provider_cmd_test.go:532
Function
TestApplyOfficialProviderConfig_UsesSessionModelPick
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:450
Function
TestApplyOfficialProviderConfig_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
Function
TestApplyProviderConfig_TestsWrittenConfigPath
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:229
Function
TestApplyProviderDeletions
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:126
Function
TestApplyProviderDeletions_ActiveCleared
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:160
Function
TestApplyProviderDeletions_SkipsNotFound
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:183
Function
TestApplyProviderField
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
Function
TestApplyResumeLine_InvalidJSON
(t *testing.T)
internal/session/resume_test.go:386
Function
TestApplyResumeLine_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
Function
TestApplyResumeLine_ReviewItemDone
(t *testing.T)
internal/session/resume_test.go:284
Function
TestApplyResumeLine_ReviewItemDone_EmptyFingerprint
(t *testing.T)
internal/session/resume_test.go:324
Function
TestApplyResumeLine_ReviewItemDone_FallbackToNewPath
(t *testing.T)
internal/session/resume_test.go:307
Function
TestApplyResumeLine_ReviewItemFailed
(t *testing.T)
internal/session/resume_test.go:349
Function
TestApplyResumeLine_ReviewItemFailed_EmptyFingerprint
(t *testing.T)
internal/session/resume_test.go:363
Function
TestApplyResumeLine_ReviewItemReused
(t *testing.T)
internal/session/resume_test.go:336
Function
TestApplyResumeLine_SessionStart
--- applyResumeLine ---
internal/session/resume_test.go:260
Function
TestApplyResumeLine_UnknownType
(t *testing.T)
internal/session/resume_test.go:377
Function
TestApplyResumeReusesCompletedItemsAcrossModels
(t *testing.T)
internal/agent/agent_test.go:759
Function
TestApplyResumeWorkspaceReusesCompletedItems
(t *testing.T)
internal/agent/agent_test.go:821
Function
TestApplySessionStart_OverridesRepoDir
(t *testing.T)
internal/session/resume_test.go:406
Function
TestApplySessionStart_PreservesRepoDirWhenCwdEmpty
--- applySessionStart ---
internal/session/resume_test.go:398
Function
TestApplySessionStart_PreservesSessionIDWhenEmpty
(t *testing.T)
internal/session/resume_test.go:414
Function
TestApplySessionStart_SetsAllFields
(t *testing.T)
internal/session/resume_test.go:422
Function
TestApplySessionStart_SetsScanPathScope
(t *testing.T)
internal/session/resume_test.go:860
Function
TestArgCountErrors_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
Function
TestArgCountErrors_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
Function
TestAuthDefaultsToChatGPT
(t *testing.T)
cmd/opencodereview/auth_cmd_test.go:17
Function
TestAuthLoginFlagsAreMutuallyExclusive
(t *testing.T)
cmd/opencodereview/auth_cmd_test.go:61
Function
TestAuthRejectsUnsupportedProviderWithoutAccountFlags
(t *testing.T)
cmd/opencodereview/auth_cmd_test.go:52
Function
TestAuthorizationAndCallbacks
(t *testing.T)
internal/chatgptauth/auth_test.go:225
Function
TestAwaitCompletedProcessObservesCancellationWithoutWatcher
(t *testing.T)
acp/internal/orchestrator/termination_test.go:76
Function
TestAwaitFirstObservedCauseSurvivesCleanup
(t *testing.T)
acp/internal/orchestrator/termination_test.go:152
Function
TestAwaitObservedTimeoutIsNotReplacedByCancel
(t *testing.T)
acp/internal/orchestrator/termination_test.go:213
Function
TestAwaitRechecksAfterConsumingCompletion
(t *testing.T)
acp/internal/orchestrator/termination_test.go:119
Function
TestBedrockClientReportsAWSFailureAsError
TestBedrockClientReportsAWSFailureAsError is the guard against the SDK's bedrock.WithLoadDefaultConfig, which panics when AWS config cannot be loaded.
internal/llm/bedrock_test.go:525
Function
TestBedrockContextReportsResolvedRegion
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
Function
TestBedrockDoesNotRunAPIKeyCmd
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
Function
TestBedrockIsRejectedOnTheURLAndTokenPaths
TestBedrockIsRejectedOnTheURLAndTokenPaths covers the two strategies that describe a single HTTP endpoint. Both validated anthropic-bedrock as a proto
internal/llm/bedrock_test.go:205
Function
TestBedrockModelOverrideIsNotGatedByThePresetList
TestBedrockModelOverrideIsNotGatedByThePresetList covers identifiers scoped to an account and region that cannot appear in a list compiled upstream.
internal/llm/bedrock_test.go:300
Function
TestBedrockProtocolIsRecognized
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
Function
TestBedrockProviderIsRegistered
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
Function
TestBehaviorMainTaskMessageStructure
(test *testing.T)
internal/config/template/behavior_test.go:46
Function
TestBehaviorReportFocusSurvivesEveryPhase
(test *testing.T)
internal/config/template/behavior_test.go:90
Function
TestBehaviorTemplateIsolation
(test *testing.T)
internal/config/template/behavior_test.go:13
Function
TestBehaviorTemplateValidation
(test *testing.T)
internal/config/template/behavior_test.go:67
Function
TestBindRawWriter_NilHolderIsNoop
(t *testing.T)
cmd/opencodereview/shared_raw_test.go:41
Function
TestBindRawWriter_OpenFailureIsNoop
(t *testing.T)
cmd/opencodereview/shared_raw_test.go:81
Function
TestBindRawWriter_OpensSessionRawFile
(t *testing.T)
cmd/opencodereview/shared_raw_test.go:56
Function
TestBlurCPStep_AllSteps
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:459
Function
TestBlurManualStep_AllSteps
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:573
Function
TestBoundaryCancelDuringBackoffIsCancelled
--- 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
Function
TestBoundaryCorrectsDecodeFailure
--- 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
Function
TestBoundaryCorrectsMidStreamFailure
--- 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
Function
TestBoundaryCorrectsResponsesStatus
--- 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
Function
TestBoundaryCorrectsTruncatedResponse
--- 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
← previous
next →
3,401–3,500 of 7,390, ranked by callers