MCPcopy Create free account

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

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

FunctionTestEstimateCost_EmptyItems
(t *testing.T)
internal/scan/estimate_test.go:133
FunctionTestEstimateCost_ScalesWithContentAndPhases
(t *testing.T)
internal/scan/estimate_test.go:32
FunctionTestEstimateDiffCost
TestEstimateDiffCost verifies the aggregate estimate sums per-file costs, skips deleted/empty diffs, and satisfies TotalTokens == Input + Output. Used
internal/agent/estimate_test.go:66
FunctionTestEstimateDiffCost_ScalesWithContent
TestEstimateDiffCost_ScalesWithContent verifies that a larger diff projects strictly more tokens than a small one (the estimate isn't a flat constant)
internal/agent/estimate_test.go:96
FunctionTestEstimateDiffFileTokens_ZeroForSkipped
TestEstimateDiffFileTokens_ZeroForSkipped verifies deleted and empty diffs project to zero tokens so they never trip the budget gate (they are skipped
internal/agent/estimate_test.go:43
FunctionTestEstimateFileTokens
(t *testing.T)
internal/scan/estimate_test.go:69
FunctionTestEstimateFileTokens_UsesPerFilePlanPredicate
(t *testing.T)
internal/scan/estimate_test.go:98
FunctionTestEstimate_StringMentionsTokens
(t *testing.T)
internal/scan/estimate_test.go:140
FunctionTestEvent_Disabled
(t *testing.T)
internal/telemetry/events_test.go:89
FunctionTestEvent_Enabled
(t *testing.T)
internal/telemetry/events_test.go:83
FunctionTestEvent_NilCtx
(t *testing.T)
internal/telemetry/events_test.go:96
FunctionTestEventf_Enabled
(t *testing.T)
internal/telemetry/events_test.go:101
FunctionTestEveryPositionalCommandUsesFriendlyErrors
TestEveryPositionalCommandUsesFriendlyErrors walks the whole command tree and fails if a command that declares positional placeholders in Use still re
cmd/opencodereview/arg_errors_test.go:205
FunctionTestExactPathspecsRespectArgumentBudget
(test *testing.T)
internal/behaviortask/prepare_test.go:82
FunctionTestExchangeIdentityAndScopes
(t *testing.T)
internal/chatgptauth/auth_test.go:256
FunctionTestExcludeReasonConstants
(t *testing.T)
internal/model/model_test.go:88
FunctionTestExcludedDirs
(t *testing.T)
internal/diff/gitignore_test.go:12
FunctionTestExcludedDoesNotChangeTerminalState
Excluded files are recorded with their reason but stay outside the denominator: complete means complete over the selected set.
internal/session/manifest_test.go:876
FunctionTestExcludedJSONShape
(t *testing.T)
internal/session/manifest_test.go:980
FunctionTestExcludedOnlyIsSkipped
A run that selected nothing is still skipped, and says what it left out.
internal/session/manifest_test.go:906
FunctionTestExeName
(t *testing.T)
acp/internal/testutil/stub_test.go:56
FunctionTestExecuteDelegatePreviewCreatesNoSession
TestExecuteDelegatePreviewCreatesNoSession covers the third preview entry point, which built its agent the same leaky way as review and scan.
cmd/opencodereview/delegate_exec_test.go:155
FunctionTestExecuteDelegatePreviewJSON
(t *testing.T)
cmd/opencodereview/delegate_exec_test.go:179
FunctionTestExecuteDelegatePreview_Commit
(t *testing.T)
cmd/opencodereview/delegate_exec_test.go:141
FunctionTestExecuteDelegatePreview_Range
(t *testing.T)
cmd/opencodereview/delegate_exec_test.go:130
FunctionTestExecuteDelegatePreview_Workspace
(t *testing.T)
cmd/opencodereview/delegate_exec_test.go:117
FunctionTestExecuteDelegateRule
(t *testing.T)
cmd/opencodereview/delegate_exec_test.go:169
FunctionTestExecuteDelegateRuleJSON
(t *testing.T)
cmd/opencodereview/delegate_exec_test.go:204
FunctionTestExecuteGroupPlanPhase
(t *testing.T)
internal/agent/coverage_test.go:586
FunctionTestExecuteGroupPlanPhase_Identity
TestExecuteGroupPlanPhase_Identity checks the plan request carries the identity of the record executeGroupPlanPhase created for it. The empty-provider
internal/agent/retry_identity_test.go:58
FunctionTestExecuteGroupPlanPhase_LLMError
(t *testing.T)
internal/agent/coverage_test.go:714
FunctionTestExecuteReviewFilter_Identity
TestExecuteReviewFilter_Identity is the review-filter counterpart. The filter only runs when comments exist for the file, so one is seeded first.
internal/agent/retry_identity_test.go:122
FunctionTestExecuteReviewFilter_LLMError
(t *testing.T)
internal/agent/coverage_test.go:368
FunctionTestExecuteReviewFilter_NoComments
(t *testing.T)
internal/agent/coverage_test.go:233
FunctionTestExecuteReviewFilter_NoFilterTask
(t *testing.T)
internal/agent/coverage_test.go:211
FunctionTestExecuteReviewFilter_OmitsToolChoiceAndFailsOpenWithoutToolCall
(t *testing.T)
internal/agent/coverage_test.go:276
FunctionTestExecuteReviewFilter_RemovesComments
(t *testing.T)
internal/agent/coverage_test.go:313
FunctionTestExecuteReviewFilter_SkipFilter
(t *testing.T)
internal/agent/coverage_test.go:402
FunctionTestExecuteReviewFilter_WithTimeout
(t *testing.T)
internal/agent/coverage_test.go:919
FunctionTestExecuteScanPromptOverflowCannotReportClean
(t *testing.T)
cmd/opencodereview/scan_prompt_overflow_test.go:16
FunctionTestExecuteScanRejectsFileReadDiff
(t *testing.T)
cmd/opencodereview/scan_cmd_test.go:21
FunctionTestExecuteSubtask_ContextCancelled
(t *testing.T)
internal/scan/coverage_test.go:631
FunctionTestExecuteSubtask_ContextCancelled
(t *testing.T)
internal/agent/coverage_test.go:889
FunctionTestExecuteSubtask_EmptyMainTask
(t *testing.T)
internal/agent/coverage_test.go:741
FunctionTestExecuteSubtask_Success
(t *testing.T)
internal/scan/coverage_test.go:529
FunctionTestExecuteSubtask_TokenThresholdExceeded
(t *testing.T)
internal/agent/coverage_test.go:772
FunctionTestExecuteSubtask_WithPlan
(t *testing.T)
internal/scan/coverage_test.go:576
FunctionTestExecuteSubtask_WithPlanPhase
(t *testing.T)
internal/agent/coverage_test.go:822
FunctionTestExecuteToolCall_ArgumentsEdgeCases
(t *testing.T)
internal/reviewtask/loop_test.go:502
FunctionTestExecuteToolCall_CodeCommentAsyncPool
TestExecuteToolCall_CodeCommentAsyncPool covers the async dispatch path where a CommentWorkerPool is present: the call returns immediately with a succ
internal/reviewtask/loop_execute_more_test.go:247
FunctionTestExecuteToolCall_CodeCommentDiffResolved
TestExecuteToolCall_CodeCommentDiffResolved covers the synchronous code_comment path where DiffLookup returns a diff and ResolveComment resolves the l
internal/reviewtask/loop_execute_more_test.go:289
FunctionTestExecuteToolCall_CodeCommentNoReasoning
TestExecuteToolCall_CodeCommentNoReasoning verifies comments keep an empty thinking when the turn has no reasoning content.
internal/reviewtask/loop_execute_more_test.go:370
FunctionTestExecuteToolCall_CodeCommentRepairedArgsWarns
The model gets a plain success, so the run warning is the only record that its `comments` violated the array schema.
internal/reviewtask/loop_test.go:1063
FunctionTestExecuteToolCall_CodeCommentSuspectRepairReportsTheError
The far side of the accept/decline decision: a refused batch must reach the model as a failure, since that error is what makes it resend. No warning e
internal/reviewtask/loop_test.go:1109
FunctionTestExecuteToolCall_CodeCommentThinkingBackfill
TestExecuteToolCall_CodeCommentThinkingBackfill covers the thinking backfill: when the current turn carries reasoning content, comments without an exp
internal/reviewtask/loop_execute_more_test.go:336
FunctionTestExecuteToolCall_CodeCommentUsesPerItemPath
(t *testing.T)
internal/reviewtask/loop_test.go:614
FunctionTestExecuteToolCall_CodeCommentValidationErrorPrintsTerminalFailure
(t *testing.T)
internal/reviewtask/loop_execute_test.go:191
FunctionTestExecuteToolCall_CodeCommentWellFormedArgsDoesNotWarn
The contrast that keeps the tests above honest: a conformant batch must warn nothing, so comment_args_repaired counts real violations only.
internal/reviewtask/loop_test.go:1142
FunctionTestExecuteToolCall_CodeCommentWithNoUsableEntryIsReported
(t *testing.T)
internal/reviewtask/loop_test.go:658
FunctionTestExecuteToolCall_DynamicExecuteError
TestExecuteToolCall_DynamicExecuteError verifies newly registered tools use the common failure-observation path without tool-specific instrumentation.
internal/reviewtask/loop_execute_test.go:50
FunctionTestExecuteToolCall_DynamicNotRegistered
TestExecuteToolCall_DynamicNotRegistered covers the path where the LLM calls a name that is neither a built-in tool nor present in the registry.
internal/reviewtask/loop_execute_test.go:34
FunctionTestExecuteToolCall_DynamicParseError
TestExecuteToolCall_DynamicParseError verifies malformed calls to registered tools are captured by the same failure-observation path.
internal/reviewtask/loop_execute_test.go:157
FunctionTestExecuteToolCall_DynamicSuccessRecordsResult
TestExecuteToolCall_DynamicSuccessRecordsResult covers the dynamic-tool success path with a non-nil TaskRecord so AddToolResult runs.
internal/reviewtask/loop_execute_test.go:85
FunctionTestExecuteToolCall_FailureStreakScopedPerTaskAndTool
TestExecuteToolCall_FailureStreakScopedPerTaskAndTool confirms the counter is keyed by (taskKey, toolName): failures against a different taskKey or a
internal/reviewtask/tool_failure_streak_test.go:70
FunctionTestExecuteToolCall_KnownToolNotRegistered
TestExecuteToolCall_KnownToolNotRegistered covers the lookupTool-nil branch: a built-in tool the model may call but which is absent from the registry.
internal/reviewtask/loop_execute_test.go:113
FunctionTestExecuteToolCall_RepeatedFailureBackoff
TestExecuteToolCall_RepeatedFailureBackoff drives the same (taskKey, toolName) pair to failure three times in a row and checks the response escalates
internal/reviewtask/tool_failure_streak_test.go:21
FunctionTestExecuteToolCall_SuccessResetsFailureStreak
TestExecuteToolCall_SuccessResetsFailureStreak confirms a success for a (taskKey, toolName) pair resets its streak, so a later failure starts over at
internal/reviewtask/tool_failure_streak_test.go:113
FunctionTestExecuteToolCall_TaskDone
TestExecuteToolCall_TaskDone covers every branch of the task_done handling: argument parse error, missing state (implicit completion), non-string stat
internal/reviewtask/loop_execute_more_test.go:187
FunctionTestExecute_CommitMode
(t *testing.T)
internal/tool/file_read_test.go:401
FunctionTestExecute_DefaultStartLine
(t *testing.T)
internal/tool/file_read_test.go:420
FunctionTestExecute_EmptyFilePath
(t *testing.T)
internal/tool/file_read_test.go:344
FunctionTestExecute_InvalidLineRange
(t *testing.T)
internal/tool/file_read_test.go:357
FunctionTestExecute_LineCapIsUtf8Safe
The mid-line cut must land on a UTF-8 rune boundary so the rendered line stays valid UTF-8 instead of ending in a split multibyte sequence.
internal/tool/file_read_test.go:633
FunctionTestExecute_MissingFile
(t *testing.T)
internal/tool/file_read_test.go:391
FunctionTestExecute_ResultBudgetCountsFormattedLine
The budget must be counted over the fully formatted lines: the line-number prefix and the trailing newline are body bytes too. Counting only the line
internal/tool/file_read_test.go:587
FunctionTestExecute_SingleOversizeLineIsCapped
A minified or generated file can pack its whole content into one line, which the 500-line cap counts as a single line. The tool result must still boun
internal/tool/file_read_test.go:479
FunctionTestExecute_StartBeyondTotalLines
(t *testing.T)
internal/tool/file_read_test.go:374
FunctionTestExecute_TotalResultBytesCapped
The per-line cap alone is not enough: 500 capped lines can still render far more bytes than one request should carry, so the total rendered body needs
internal/tool/file_read_test.go:547
FunctionTestExecute_Truncation
(t *testing.T)
internal/tool/file_read_test.go:304
FunctionTestExecute_UnrenderedOversizeLineDoesNotReportLineTruncation
(test *testing.T)
internal/tool/file_read_test.go:507
FunctionTestExecute_WithEndLine
setupTestRepo is already defined in code_search_test.go (same package) getHeadCommit is already defined in code_search_test.go (same package)
internal/tool/file_read_test.go:442
FunctionTestExecutionCommandQuotesArguments
(t *testing.T)
acp/internal/adapter/presentation/progress_format_test.go:40
FunctionTestExecutionDetailsSurviveUpdatesWithoutCommandInChat
(t *testing.T)
acp/internal/adapter/progress_test.go:31
FunctionTestExecutionStatsFromCLIJSON
(t *testing.T)
acp/internal/adapter/presentation/progress_format_test.go:70
FunctionTestExpandBraces_MultipleOptions
(t *testing.T)
internal/config/rules/system_rules_test.go:39
FunctionTestExpandBraces_NoBraces
(t *testing.T)
internal/config/rules/system_rules_test.go:19
FunctionTestExpandBraces_SingleGroup
(t *testing.T)
internal/config/rules/system_rules_test.go:26
FunctionTestExpandBraces_UnclosedBrace
(t *testing.T)
internal/config/rules/system_rules_test.go:52
FunctionTestExpandSessionKeyInBody
(t *testing.T)
internal/llm/sessionkey_test.go:170
FunctionTestExpandSessionKeyInHeaders
(t *testing.T)
internal/llm/sessionkey_test.go:144
FunctionTestExplainErrorClassifiesBedrockFailures
TestExplainErrorClassifiesBedrockFailures covers the diagnosis Bedrock's own wording does not give. Two of these are actively misleading: the API-key
internal/llm/bedrock_test.go:379
FunctionTestExplainErrorLeavesNonBedrockErrorsAlone
TestExplainErrorLeavesNonBedrockErrorsAlone keeps the diagnosis scoped: every other protocol shares this client type.
internal/llm/bedrock_test.go:492
FunctionTestExplainErrorNamesTheBearerTokenVariable
TestExplainErrorNamesTheBearerTokenVariable separates the two ways the same 403 arrives: an SSO token the SDK attached on its own, versus a token the
internal/llm/bedrock_test.go:481
FunctionTestExplicitPlanConsent
(t *testing.T)
internal/chatgptauth/recovery_test.go:94
FunctionTestExportSession_Errors
TestExportSession_Errors pins that a failure writes nothing, so a caller pointing at a file cannot end up with a half-rendered page.
internal/viewer/export_test.go:138
FunctionTestExportSession_SelfContained
TestExportSession_SelfContained is the whole point of the feature: the page must render offline, so all /static/ assets have to arrive inlined and cor
internal/viewer/export_test.go:41
FunctionTestExportSession_Variants
(t *testing.T)
internal/viewer/export_test.go:80
FunctionTestExtFromPath
(t *testing.T)
internal/scan/coverage_test.go:307
FunctionTestExtFromPath
(t *testing.T)
internal/agent/agent_test.go:379
FunctionTestExtraEnumCaseCompatibility
(t *testing.T)
acp/internal/contract/intent_test.go:369
← previousnext →4,001–4,100 of 7,390, ranked by callers