Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
7,169 in github.com/alibaba/open-code-review
⨍
Functions
7,169
◇
Types & classes
774
Function
TestResolveRuleEntries_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
Function
TestResolveRuleEntries_ProjectRelativeInsideAllowed
TestResolveRuleEntries_ProjectRelativeInsideAllowed covers the confined relative (non-symlink) path that stays inside the repo.
internal/config/rules/system_rules_test.go:1952
Function
TestResolveRuleEntries_RelativePath
(t *testing.T)
internal/config/rules/system_rules_test.go:1451
Function
TestResolveRuleEntries_SubdirectoryPath
(t *testing.T)
internal/config/rules/system_rules_test.go:1546
Function
TestResolveRuleEntries_SymlinkSafety
(t *testing.T)
internal/config/rules/system_rules_test.go:1486
Function
TestResolveRuleEntries_TooLarge
(t *testing.T)
internal/config/rules/system_rules_test.go:1430
Function
TestResolveRuleEntries_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
Function
TestResolveRuleEntries_TxtExtension
(t *testing.T)
internal/config/rules/system_rules_test.go:1514
Function
TestResolveUsageCacheCreationTokensPriority
(t *testing.T)
internal/llm/usage_resolver_test.go:108
Function
TestResolveUsageCacheReadPathPriority
(t *testing.T)
internal/llm/usage_resolver_test.go:88
Function
TestResolveUsageOpenAICompatibleCachedTokens
(t *testing.T)
internal/llm/usage_resolver_test.go:8
Function
TestResolveUsageResponsesAPIFieldNames
(t *testing.T)
internal/llm/usage_resolver_test.go:128
Function
TestResolveUsageWrappedAnthropicCompatibleCacheTokens
(t *testing.T)
internal/llm/usage_resolver_test.go:62
Function
TestResolveUsageWrappedCachedTokens
(t *testing.T)
internal/llm/usage_resolver_test.go:34
Function
TestResolveWorkingDir_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
Function
TestResolveWorkingDir_CurrentDir
(t *testing.T)
cmd/opencodereview/shared_test.go:147
Function
TestResolveWorkingDir_GitRepo
(t *testing.T)
cmd/opencodereview/shared_test.go:272
Function
TestResolveWorkingDir_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
Function
TestResolveWorkingDir_NonExistent
(t *testing.T)
cmd/opencodereview/shared_test.go:182
Function
TestResolveWorkingDir_RequireGitFails
(t *testing.T)
cmd/opencodereview/shared_test.go:174
Function
TestResolve_CaseInsensitive
(t *testing.T)
internal/config/rules/system_rules_test.go:291
Function
TestResolve_CustomRule_DefaultFallback
(t *testing.T)
internal/config/rules/system_rules_test.go:277
Function
TestResolve_CustomRule_FirstMatchWins
(t *testing.T)
internal/config/rules/system_rules_test.go:255
Function
TestResolve_DefaultRules
(t *testing.T)
internal/config/rules/system_rules_test.go:59
Function
TestResolve_FallbackToDefault
(t *testing.T)
internal/config/rules/system_rules_test.go:233
Function
TestResolve_GitHubWorkflows
(t *testing.T)
internal/config/rules/resolve_github_test.go:11
Function
TestResourceRouting
(t *testing.T)
acp/internal/adapter/resources_test.go:128
Function
TestResponseRequestID
(t *testing.T)
internal/llm/retry_observer_test.go:663
Function
TestResponsiveCSS_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
Function
TestResultRootMatchesCLIOperation
(t *testing.T)
acp/internal/adapter/workspace/root_test.go:14
Function
TestResult_CustomTab_Creating
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1516
Function
TestResult_CustomTab_Editing
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1531
Function
TestResult_CustomTab_OutOfBounds
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1570
Function
TestResult_CustomTab_Selected
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1552
Function
TestResult_ManualTab
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1580
Function
TestResult_ManualTab_MaskedToken
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1597
Function
TestResult_OfficialTab
--- result() tests ---
cmd/opencodereview/provider_tui_funcs_test.go:1498
Function
TestResult_OfficialTab_WithMaskedKey
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1506
Function
TestResumeComparisonEndpoints
(test *testing.T)
internal/session/code_access_test.go:12
Function
TestResumeIgnoresLegacyCodeAccessProfile
(test *testing.T)
internal/session/code_access_test.go:62
Function
TestResumeLineageReachesDiskBeforeFinalize
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
Function
TestResumeLineageRoundTripsThroughSessionFile
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
Function
TestResumeStateSessionStartKeepsRepoDirWhenCwdEmpty
(t *testing.T)
internal/session/persist_test.go:495
Function
TestResumeStateValidateOptionsRejectsMismatchedMode
(t *testing.T)
internal/session/persist_test.go:479
Function
TestResumedFromSession
TestResumedFromSession covers the nil and non-nil resume-state branches.
internal/scan/getters_more_test.go:78
Function
TestRetryAttemptChain_CancelledAttemptNotDuplicated
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:202
Function
TestRetryAttemptChain_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
Function
TestRetryCodesMiddleware_Nil
(t *testing.T)
internal/llm/client_test.go:2087
Function
TestRetryCodesMiddleware_NoHeaderForNonMatchingCode
(t *testing.T)
internal/llm/client_test.go:2118
Function
TestRetryCodesMiddleware_PassthroughError
(t *testing.T)
internal/llm/client_test.go:2138
Function
TestRetryCodesMiddleware_SetsHeader
(t *testing.T)
internal/llm/client_test.go:2098
Function
TestRetryCollectorConcurrentUse
(t *testing.T)
internal/llm/retry_report_test.go:868
Function
TestRetryReportHasNoUnexpectedTextFields
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
Function
TestRetryReportJSON_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
Function
TestRetryReportJSON_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
Function
TestRetryReport_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
Function
TestReusableItem_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
Function
TestReviewE2E_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
Function
TestReviewE2E_AllFilesFailTextPublishesReportOnce
(t *testing.T)
cmd/opencodereview/retry_report_e2e_test.go:205
Function
TestReviewE2E_CleanRunEmitsNoRetryReport
(t *testing.T)
cmd/opencodereview/retry_report_e2e_test.go:37
Function
TestReviewE2E_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
Function
TestReviewE2E_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
Function
TestReviewE2E_JSONForcedColorOnlyStylesProgress
(test *testing.T)
cmd/opencodereview/progress_stream_e2e_test.go:82
Function
TestReviewE2E_JSONHumanStreamsProgressToStderr
(t *testing.T)
cmd/opencodereview/progress_stream_e2e_test.go:35
Function
TestReviewE2E_RecoveredAndFailedReachesJSONExit
(t *testing.T)
cmd/opencodereview/retry_report_e2e_test.go:53
Function
TestReviewE2E_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
Function
TestReviewE2E_RetryReportReachesTextExit
(t *testing.T)
cmd/opencodereview/retry_report_e2e_test.go:134
Function
TestReviewExecutionEquivalence
(t *testing.T)
internal/reviewtask/equivalence_test.go:33
Function
TestReviewFromWithoutToUsesHEADRangeE2E
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
Function
TestReviewItemFingerprintIgnoresTrailingLineEndings
(t *testing.T)
internal/agent/agent_test.go:676
Function
TestReviewItemFingerprintStableAcrossPatchPosition
TestReviewItemFingerprintStableAcrossPatchPosition pins down the --resume guarantee end to end: the patch splitter leaves position-dependent trailing
internal/agent/agent_test.go:709
Function
TestReviewItemResumeRoundTrip
(t *testing.T)
internal/session/persist_test.go:420
Function
TestReviewLoopPreservesDiffAndComparisonReads
(t *testing.T)
cmd/opencodereview/code_access_test.go:104
Function
TestReviewModeFromOptions
(t *testing.T)
cmd/opencodereview/misc_helpers_test.go:13
Function
TestReviewModeString
(t *testing.T)
internal/agent/util_test.go:177
Function
TestReviewMode_RefValue
(t *testing.T)
internal/tool/filereader_test.go:34
Function
TestReviewOutputCommittedBeforeMCPShutdown
(t *testing.T)
cmd/opencodereview/review_output_order_test.go:15
Function
TestReviewRejectsNonRepositoryBeforeRunner
(t *testing.T)
acp/internal/adapter/locations_test.go:143
Function
TestReviewResultErrorUsesManifestTerminalState
(t *testing.T)
cmd/opencodereview/review_cmd_test.go:93
Function
TestReviewRulesGuideListsEverySystemRulePattern
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
Function
TestReviewRulesGuideListsPatternsInMatchingOrder
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
Function
TestReviewRulesListedPatterns
(t *testing.T)
internal/config/rules/rule_docs_table_test.go:51
Function
TestReviewedPaths
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
Function
TestReviseLastAttempt
(t *testing.T)
internal/llm/retry_report_test.go:414
Function
TestRollbackCfgActiveModel
(t *testing.T)
cmd/opencodereview/provider_tui_rollback_test.go:70
Function
TestRollbackModelDelete
(t *testing.T)
cmd/opencodereview/provider_tui_rollback_test.go:85
Function
TestRootCmd_Help
(t *testing.T)
cmd/opencodereview/smallfiles_test.go:129
Function
TestRuleConfigSHA256
(t *testing.T)
internal/agent/manifest_hash_test.go:38
Function
TestRuleConfigSHA256_NilResolverAndFilter
(t *testing.T)
internal/agent/manifest_hash_test.go:81
Function
TestRuleGroupsJSONEmptyFiles
(t *testing.T)
cmd/opencodereview/delegate_exec_test.go:223
Function
TestRuleGroupsMarkdown
(t *testing.T)
internal/delegate/format_test.go:11
Function
TestRunBrowserCmd_ExitZero
(t *testing.T)
internal/viewer/browser_exec_test.go:131
Function
TestRunBrowserCmd_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
Function
TestRunBrowserCmd_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
Function
TestRunBrowserCmd_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
Function
TestRunBrowserCmd_PreservesCallerStderr
TestRunBrowserCmd_PreservesCallerStderr makes sure the capture does not hijack a Stderr the caller already set.
internal/viewer/browser_exec_test.go:179
Function
TestRunBrowserCmd_StartFailure
(t *testing.T)
internal/viewer/browser_exec_test.go:192
Function
TestRunBrowserCmd_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
Function
TestRunCompression_EmptySummary
(t *testing.T)
internal/llmloop/runner_test.go:433
Function
TestRunCompression_EmptyTemplate
(t *testing.T)
internal/llmloop/runner_test.go:319
← previous
next →
5,501–5,600 of 7,169, ranked by callers