MCPcopy Create free account

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

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

FunctionTestResolveRuleEntries_ProjectConfinesSymlinkEscape
TestResolveRuleEntries_ProjectConfinesSymlinkEscape verifies that with confine=true, an in-repo symlink pointing at an out-of-repo file is rejected af
internal/config/rules/system_rules_test.go:1806
FunctionTestResolveRuleEntries_ProjectRelativeInsideAllowed
TestResolveRuleEntries_ProjectRelativeInsideAllowed covers the confined relative (non-symlink) path that stays inside the repo.
internal/config/rules/system_rules_test.go:1952
FunctionTestResolveRuleEntries_RelativePath
(t *testing.T)
internal/config/rules/system_rules_test.go:1451
FunctionTestResolveRuleEntries_SubdirectoryPath
(t *testing.T)
internal/config/rules/system_rules_test.go:1546
FunctionTestResolveRuleEntries_SymlinkSafety
(t *testing.T)
internal/config/rules/system_rules_test.go:1486
FunctionTestResolveRuleEntries_TooLarge
(t *testing.T)
internal/config/rules/system_rules_test.go:1430
FunctionTestResolveRuleEntries_TrustedAbsoluteOutsideAllowed
TestResolveRuleEntries_TrustedAbsoluteOutsideAllowed guards that the trusted layers (confine=false) keep the previous behavior: absolute paths may poi
internal/config/rules/system_rules_test.go:1829
FunctionTestResolveRuleEntries_TxtExtension
(t *testing.T)
internal/config/rules/system_rules_test.go:1514
FunctionTestResolveUsageCacheCreationTokensPriority
(t *testing.T)
internal/llm/usage_resolver_test.go:108
FunctionTestResolveUsageCacheReadPathPriority
(t *testing.T)
internal/llm/usage_resolver_test.go:88
FunctionTestResolveUsageOpenAICompatibleCachedTokens
(t *testing.T)
internal/llm/usage_resolver_test.go:8
FunctionTestResolveUsageResponsesAPIFieldNames
(t *testing.T)
internal/llm/usage_resolver_test.go:128
FunctionTestResolveUsageWrappedAnthropicCompatibleCacheTokens
(t *testing.T)
internal/llm/usage_resolver_test.go:62
FunctionTestResolveUsageWrappedCachedTokens
(t *testing.T)
internal/llm/usage_resolver_test.go:34
FunctionTestResolveWorkingDir_BareRepoFailsLoudly
TestResolveWorkingDir_BareRepoFailsLoudly guards the #287 fix: a bare repo has no work tree, so `git rev-parse --git-dir` succeeds (isGit=true) but `-
cmd/opencodereview/shared_test.go:259
FunctionTestResolveWorkingDir_CurrentDir
(t *testing.T)
cmd/opencodereview/shared_test.go:147
FunctionTestResolveWorkingDir_GitRepo
(t *testing.T)
cmd/opencodereview/shared_test.go:272
FunctionTestResolveWorkingDir_MonorepoSubdir
TestResolveWorkingDir_MonorepoSubdir reproduces #287: running `ocr review` from a subdirectory of a git repo must anchor RepoDir at the git top-level
cmd/opencodereview/shared_test.go:194
FunctionTestResolveWorkingDir_NonExistent
(t *testing.T)
cmd/opencodereview/shared_test.go:182
FunctionTestResolveWorkingDir_RequireGitFails
(t *testing.T)
cmd/opencodereview/shared_test.go:174
FunctionTestResolve_CaseInsensitive
(t *testing.T)
internal/config/rules/system_rules_test.go:291
FunctionTestResolve_CustomRule_DefaultFallback
(t *testing.T)
internal/config/rules/system_rules_test.go:277
FunctionTestResolve_CustomRule_FirstMatchWins
(t *testing.T)
internal/config/rules/system_rules_test.go:255
FunctionTestResolve_DefaultRules
(t *testing.T)
internal/config/rules/system_rules_test.go:59
FunctionTestResolve_FallbackToDefault
(t *testing.T)
internal/config/rules/system_rules_test.go:233
FunctionTestResolve_GitHubWorkflows
(t *testing.T)
internal/config/rules/resolve_github_test.go:11
FunctionTestResourceRouting
(t *testing.T)
acp/internal/adapter/resources_test.go:128
FunctionTestResponseRequestID
(t *testing.T)
internal/llm/retry_observer_test.go:663
FunctionTestResponsiveCSS_MetaOverrideComesAfterBase
TestResponsiveCSS_MetaOverrideComesAfterBase guards the cascade for the narrow-screen meta overrides: the selectors are equally specific as the base r
internal/viewer/server_extra_test.go:1587
FunctionTestResultRootMatchesCLIOperation
(t *testing.T)
acp/internal/adapter/workspace/root_test.go:14
FunctionTestResult_CustomTab_Creating
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1516
FunctionTestResult_CustomTab_Editing
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1531
FunctionTestResult_CustomTab_OutOfBounds
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1570
FunctionTestResult_CustomTab_Selected
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1552
FunctionTestResult_ManualTab
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1580
FunctionTestResult_ManualTab_MaskedToken
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1597
FunctionTestResult_OfficialTab
--- result() tests ---
cmd/opencodereview/provider_tui_funcs_test.go:1498
FunctionTestResult_OfficialTab_WithMaskedKey
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1506
FunctionTestResumeComparisonEndpoints
(test *testing.T)
internal/session/code_access_test.go:12
FunctionTestResumeIgnoresLegacyCodeAccessProfile
(test *testing.T)
internal/session/code_access_test.go:62
FunctionTestResumeLineageReachesDiskBeforeFinalize
The round trip above finalizes the session, which flushes on its way out and so cannot tell a buffered record from a persisted one. Lineage exists to
internal/session/resume_identity_test.go:385
FunctionTestResumeLineageRoundTripsThroughSessionFile
End-to-end for the event itself: a lineage written by a live session must come back out of the session file through the same reader `ocr session show`
internal/session/resume_identity_test.go:351
FunctionTestResumeStateSessionStartKeepsRepoDirWhenCwdEmpty
(t *testing.T)
internal/session/persist_test.go:495
FunctionTestResumeStateValidateOptionsRejectsMismatchedMode
(t *testing.T)
internal/session/persist_test.go:479
FunctionTestResumedFromSession
TestResumedFromSession covers the nil and non-nil resume-state branches.
internal/scan/getters_more_test.go:78
FunctionTestRetryAttemptChain_CancelledAttemptNotDuplicated
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:202
FunctionTestRetryAttemptChain_NoStatusCode
An attempt with no HTTP response has no status code to show, so the class is rendered bare rather than as "network(0)".
cmd/opencodereview/retry_report_render_test.go:217
FunctionTestRetryCodesMiddleware_Nil
(t *testing.T)
internal/llm/client_test.go:2087
FunctionTestRetryCodesMiddleware_NoHeaderForNonMatchingCode
(t *testing.T)
internal/llm/client_test.go:2118
FunctionTestRetryCodesMiddleware_PassthroughError
(t *testing.T)
internal/llm/client_test.go:2138
FunctionTestRetryCodesMiddleware_SetsHeader
(t *testing.T)
internal/llm/client_test.go:2098
FunctionTestRetryCollectorConcurrentUse
(t *testing.T)
internal/llm/retry_report_test.go:868
FunctionTestRetryReportHasNoUnexpectedTextFields
The security guarantee is structural rather than filter-based: the report has no free-text field, so there is nothing to redact. This test pins the ex
internal/llm/retry_report_test.go:833
FunctionTestRetryReportJSON_EmptyProviderKept
provider is required and must survive as an empty string: an OCR_LLM_* endpoint has no provider name, and omitting the key there would make an unnamed
cmd/opencodereview/retry_report_render_test.go:328
FunctionTestRetryReportJSON_KeySetIsAllowlisted
The report carries only aggregates, stable classes, status codes and request identity. This pins the emitted JSON key set so a future field cannot qui
cmd/opencodereview/retry_report_render_test.go:269
FunctionTestRetryReport_TerminalAndJSONReadSameFrozenResult
Both exits read the same frozen value, so a single collector Freeze must render identically through the terminal and the JSON output. Built through th
cmd/opencodereview/retry_report_render_test.go:342
FunctionTestReusableItem_ManifestFailureIsNotReusable
--- ResumeState.ReusableItem --- The manifest settles coverage per item, and only completed and reused are settled as results worth carrying forward.
internal/session/resume_test.go:121
FunctionTestReviewE2E_AllFilesFailPublishesReportOnce
Every file failing still produces a manifest (terminal_state=failed), so the normal exit runs and the failure-usage record must not repeat the report.
cmd/opencodereview/retry_report_e2e_test.go:174
FunctionTestReviewE2E_AllFilesFailTextPublishesReportOnce
(t *testing.T)
cmd/opencodereview/retry_report_e2e_test.go:205
FunctionTestReviewE2E_CleanRunEmitsNoRetryReport
(t *testing.T)
cmd/opencodereview/retry_report_e2e_test.go:37
FunctionTestReviewE2E_FreezeErrorIsAWarning
A report-construction error is an observability warning. It must not change a successful review's exit status, print a --resume hint, emit a failure-u
cmd/opencodereview/retry_report_e2e_test.go:230
FunctionTestReviewE2E_JSONAgentStaysSilent
TestReviewE2E_JSONAgentStaysSilent is the counterpart: audience=agent asked for no progress, so the stderr redirect must not resurrect it.
cmd/opencodereview/progress_stream_e2e_test.go:63
FunctionTestReviewE2E_JSONForcedColorOnlyStylesProgress
(test *testing.T)
cmd/opencodereview/progress_stream_e2e_test.go:82
FunctionTestReviewE2E_JSONHumanStreamsProgressToStderr
(t *testing.T)
cmd/opencodereview/progress_stream_e2e_test.go:35
FunctionTestReviewE2E_RecoveredAndFailedReachesJSONExit
(t *testing.T)
cmd/opencodereview/retry_report_e2e_test.go:53
FunctionTestReviewE2E_ReportSurvivesSessionPersistenceFailure
The run_id is the session's in-memory UUID rather than the persistence-gated ag.SessionID(), so a session whose JSONL file could not be created still
cmd/opencodereview/retry_report_e2e_test.go:270
FunctionTestReviewE2E_RetryReportReachesTextExit
(t *testing.T)
cmd/opencodereview/retry_report_e2e_test.go:134
FunctionTestReviewExecutionEquivalence
(t *testing.T)
internal/reviewtask/equivalence_test.go:33
FunctionTestReviewFromWithoutToUsesHEADRangeE2E
TestReviewFromWithoutToUsesHEADRangeE2E pins the CLI shorthand end to end: --from main must behave exactly like --from main --to HEAD, review committe
cmd/opencodereview/default_to_head_e2e_test.go:85
FunctionTestReviewItemFingerprintIgnoresTrailingLineEndings
(t *testing.T)
internal/agent/agent_test.go:676
FunctionTestReviewItemFingerprintStableAcrossPatchPosition
TestReviewItemFingerprintStableAcrossPatchPosition pins down the --resume guarantee end to end: the patch splitter leaves position-dependent trailing
internal/agent/agent_test.go:709
FunctionTestReviewItemResumeRoundTrip
(t *testing.T)
internal/session/persist_test.go:420
FunctionTestReviewLoopPreservesDiffAndComparisonReads
(t *testing.T)
cmd/opencodereview/code_access_test.go:104
FunctionTestReviewModeFromOptions
(t *testing.T)
cmd/opencodereview/misc_helpers_test.go:13
FunctionTestReviewModeString
(t *testing.T)
internal/agent/util_test.go:177
FunctionTestReviewMode_RefValue
(t *testing.T)
internal/tool/filereader_test.go:34
FunctionTestReviewOutputCommittedBeforeMCPShutdown
(t *testing.T)
cmd/opencodereview/review_output_order_test.go:15
FunctionTestReviewRejectsNonRepositoryBeforeRunner
(t *testing.T)
acp/internal/adapter/locations_test.go:143
FunctionTestReviewResultErrorUsesManifestTerminalState
(t *testing.T)
cmd/opencodereview/review_cmd_test.go:93
FunctionTestReviewRulesGuideListsEverySystemRulePattern
TestReviewRulesGuideListsEverySystemRulePattern keeps the review-rules guide's pattern table in step with the embedded mapping it documents. The tabl
internal/config/rules/rule_docs_table_test.go:131
FunctionTestReviewRulesGuideListsPatternsInMatchingOrder
TestReviewRulesGuideListsPatternsInMatchingOrder holds the guide to the claim it makes about itself. The table is introduced as listing every pattern
internal/config/rules/rule_docs_table_test.go:212
FunctionTestReviewRulesListedPatterns
(t *testing.T)
internal/config/rules/rule_docs_table_test.go:51
FunctionTestReviewedPaths
TestReviewedPaths pins the partition choice the CLI and the web viewer share. The nil-vs-empty distinction is asserted explicitly: reflect.DeepEqual(n
internal/session/compare_test.go:350
FunctionTestReviseLastAttempt
(t *testing.T)
internal/llm/retry_report_test.go:414
FunctionTestRollbackCfgActiveModel
(t *testing.T)
cmd/opencodereview/provider_tui_rollback_test.go:70
FunctionTestRollbackModelDelete
(t *testing.T)
cmd/opencodereview/provider_tui_rollback_test.go:85
FunctionTestRootCmd_Help
(t *testing.T)
cmd/opencodereview/smallfiles_test.go:129
FunctionTestRuleConfigSHA256
(t *testing.T)
internal/agent/manifest_hash_test.go:38
FunctionTestRuleConfigSHA256_NilResolverAndFilter
(t *testing.T)
internal/agent/manifest_hash_test.go:81
FunctionTestRuleGroupsJSONEmptyFiles
(t *testing.T)
cmd/opencodereview/delegate_exec_test.go:223
FunctionTestRuleGroupsMarkdown
(t *testing.T)
internal/delegate/format_test.go:11
FunctionTestRunBrowserCmd_ExitZero
(t *testing.T)
internal/viewer/browser_exec_test.go:131
FunctionTestRunBrowserCmd_LateFailureWarns
TestRunBrowserCmd_LateFailureWarns covers the watcher goroutine: an opener that outlives the wait window is reported as success, but if it then fails
internal/viewer/browser_exec_test.go:221
FunctionTestRunBrowserCmd_NonZeroExit
TestRunBrowserCmd_NonZeroExit is the regression test for openers that fork successfully and then fail: xdg-open exits non-zero when no handler is regi
internal/viewer/browser_exec_test.go:143
FunctionTestRunBrowserCmd_NonZeroExitIncludesStderr
TestRunBrowserCmd_NonZeroExitIncludesStderr checks that the opener's own diagnostic survives. Without it a failure reduces to "exit status 3", which d
internal/viewer/browser_exec_test.go:161
FunctionTestRunBrowserCmd_PreservesCallerStderr
TestRunBrowserCmd_PreservesCallerStderr makes sure the capture does not hijack a Stderr the caller already set.
internal/viewer/browser_exec_test.go:179
FunctionTestRunBrowserCmd_StartFailure
(t *testing.T)
internal/viewer/browser_exec_test.go:192
FunctionTestRunBrowserCmd_StillRunningIsSuccess
TestRunBrowserCmd_StillRunningIsSuccess covers the opener that becomes the browser and never exits: past the wait window it must be reported as succes
internal/viewer/browser_exec_test.go:201
FunctionTestRunCompression_EmptySummary
(t *testing.T)
internal/llmloop/runner_test.go:433
FunctionTestRunCompression_EmptyTemplate
(t *testing.T)
internal/llmloop/runner_test.go:319
← previousnext →5,501–5,600 of 7,169, ranked by callers