Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
7,484 in github.com/alibaba/open-code-review
⨍
Functions
7,484
◇
Types & classes
809
Function
TestProviderTUI_ViewAPIKey_EnvSetWithSavedKey
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2106
Function
TestProviderTUI_ViewAPIKey_FreshHidesReplaceHint
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2039
Function
TestProviderTUI_ViewAPIKey_MaskedShowsReplaceHintAndLastFour
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:1942
Function
TestProviderTUI_ViewAPIKey_MinLenKeyShowsFingerprint
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2004
Function
TestProviderTUI_ViewAPIKey_NoCmdHintWhenUnset
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:3051
Function
TestProviderTUI_ViewAPIKey_ShortKeyOmitsFingerprint
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:1975
Function
TestProviderTUI_ViewAPIKey_ShowsAPIKeyCmdHint
A provider configured only by command renders a blank API-key field, so without this hint there is nothing on screen distinguishing "credential alread
cmd/opencodereview/provider_tui_test.go:3020
Function
TestProviderTUI_ViewAPIKey_ShowsFormError
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2446
Function
TestProvider_Enumerate_CaseVariantFileNameIsNotFoldedOnCaseSensitiveFS
TestProvider_Enumerate_CaseVariantFileNameIsNotFoldedOnCaseSensitiveFS is the same rule at file level: `src/KEEP.go` names no file where `src/keep.go`
internal/scan/provider_paths_test.go:348
Function
TestProvider_Enumerate_CaseVariantSelectorResolvesOnCaseInsensitiveFS
TestProvider_Enumerate_CaseVariantSelectorResolvesOnCaseInsensitiveFS is the Windows/macOS repair: `--path SRC` names `src/` because the filesystem re
internal/scan/provider_paths_test.go:291
Function
TestProvider_Enumerate_DotSlashPrefixSelectsSubdirectory
TestProvider_Enumerate_DotSlashPrefixSelectsSubdirectory pins the normalization order. filepath.ToSlash has to run before the "./" trim, or a selector
internal/scan/provider_paths_test.go:225
Function
TestProvider_Enumerate_EmptyCaseVariantDirectoryStaysEmpty
TestProvider_Enumerate_EmptyCaseVariantDirectoryStaysEmpty pins the follow-up from review: `src/docs/` exists as an empty directory while `src/DOCS/`
internal/scan/provider_paths_test.go:368
Function
TestProvider_Enumerate_ExactSpellingWinsOnCaseSensitiveFS
TestProvider_Enumerate_ExactSpellingWinsOnCaseSensitiveFS pins the rule where case is meaningful: `src` and `SRC` are two paths, the spelled path wins
internal/scan/provider_paths_test.go:320
Function
TestProvider_Enumerate_FullRepo
(t *testing.T)
internal/scan/provider_test.go:126
Function
TestProvider_Enumerate_NonGitDirectory
(t *testing.T)
internal/scan/provider_test.go:173
Function
TestProvider_Enumerate_NonRegularSkip
TestProvider_Enumerate_NonRegularSkip covers the !IsRegular branch: a symlink tracked by git is enumerated but skipped because it is not a regular fil
internal/scan/provider_more_test.go:41
Function
TestProvider_Enumerate_OversizeSkip
TestProvider_Enumerate_OversizeSkip covers the size-cap branch: a file larger than maxFileSizeBytes is skipped with a warning while smaller files rema
internal/scan/provider_more_test.go:20
Function
TestProvider_Enumerate_PathFilter
(t *testing.T)
internal/scan/provider_test.go:219
Function
TestProvider_Enumerate_PreservesWhitespaceInTrackedPaths
TestProvider_Enumerate_PreservesWhitespaceInTrackedPaths covers issue #1493. `git ls-files -z` exists so that a pathname needs no escaping: every byt
internal/scan/provider_paths_test.go:29
Function
TestProvider_Enumerate_ResolvedAliasSelectsTrackedSpelling
TestProvider_Enumerate_ResolvedAliasSelectsTrackedSpelling covers resolution through a symlink on a case-sensitive filesystem: `src` is a symlink to t
internal/scan/provider_paths_test.go:393
Function
TestProvider_Enumerate_RespectsContextCancellation
TestProvider_Enumerate_RespectsContextCancellation guards the per-iteration ctx.Err() check that was previously missing.
internal/scan/provider_test.go:201
Function
TestProvider_Enumerate_RootSelectorScansRepository
TestProvider_Enumerate_RootSelectorScansRepository pins the root selector. `git ls-files` prints repository-relative names such as `main.go`, never `
internal/scan/provider_paths_test.go:186
Function
TestProvider_Enumerate_RootSelectorWidensANarrowerOne
TestProvider_Enumerate_RootSelectorWidensANarrowerOne pins the union rule: a root selector covers the whole repository, so a subdirectory named beside
internal/scan/provider_paths_test.go:210
Function
TestProvider_Enumerate_SniffError
TestProvider_Enumerate_SniffError covers the binary-sniff error branch: a file that cannot be opened for sniffing is skipped with a warning.
internal/scan/provider_more_test.go:64
Function
TestProvider_Enumerate_StderrWarningIsNotParsedAsAPath
TestProvider_Enumerate_StderrWarningIsNotParsedAsAPath covers the second half of the same defect. gitLs took stdout only on its fallback branch and sa
internal/scan/provider_paths_test.go:71
Function
TestProvider_Enumerate_UnknownPathIsAnError
TestProvider_Enumerate_UnknownPathIsAnError pins the difference between an empty selection and a mistyped selector. `--path` names a path, not a searc
internal/scan/provider_paths_test.go:258
Function
TestProvider_Enumerate_WindowsBackslashSelector
TestProvider_Enumerate_WindowsBackslashSelector pins the Windows spelling. filepath.ToSlash only rewrites separators on Windows, and a backslash is a
internal/scan/provider_paths_test.go:240
Function
TestProvider_Execute_Integration
(t *testing.T)
internal/mcp/client_test.go:216
Function
TestProvider_ResolveSelector_RepositoryBoundary
TestProvider_ResolveSelector_RepositoryBoundary covers selectors that resolve to the repository root or outside it: no tracked entry can match the res
internal/scan/provider_paths_test.go:417
Function
TestProvider_Tool
(t *testing.T)
internal/mcp/provider_test.go:18
Function
TestProviders_AllProtocolsCanonical
TestProviders_AllProtocolsCanonical verifies every registry entry uses a canonical protocol constant — no stale "openai" / "anthropic" literals that w
internal/llm/providers_test.go:475
Function
TestPublicReportOmitsRawErrors
(test *testing.T)
internal/workflow/workflow_test.go:18
Function
TestQuiet
(t *testing.T)
internal/stdout/stdout_test.go:20
Function
TestQuietHandle_IdempotentRestore
(t *testing.T)
cmd/opencodereview/shared_test.go:138
Function
TestQuietHandle_NilReceiver
(t *testing.T)
cmd/opencodereview/shared_test.go:133
Function
TestQuoteKotlinString
(t *testing.T)
internal/llm/gen/kotlin_test.go:15
Function
TestRangeDiffDetectsRename
TestRangeDiffDetectsRename guards against issue #99: when a file is renamed on the target branch, `ocr review --from master --to BRANCH` must recogniz
internal/diff/git_test.go:710
Function
TestRangeDiffSurvivesExternalDiffTool
TestRangeDiffSurvivesExternalDiffTool covers the ModeRange call site (git diff <base> <to>), which likewise must pass --no-ext-diff so that a user's e
internal/diff/git_test.go:767
Function
TestRawCaptureDoesNotInflateObserverTiming
TestRawCaptureDoesNotInflateObserverTiming guards the middleware order: raw must sit outside the retry observer, so its full-body read and writer call
internal/llm/raw_test.go:944
Function
TestRawFileWriter_AppendsAcrossReopen
TestRawFileWriter_AppendsAcrossReopen pins the O_APPEND contract: reopening the same session ID must keep the previous records instead of truncating t
internal/session/raw_writer_test.go:122
Function
TestRawFileWriter_ConcurrentWrites
(t *testing.T)
internal/session/raw_writer_test.go:163
Function
TestRawFileWriter_EncodeFailureWarnsAndRecovers
TestRawFileWriter_EncodeFailureWarnsAndRecovers pins the no-silent-drop contract: an unencodable record (e.g. an invalid RawMessage from a future call
internal/session/raw_writer_test.go:320
Function
TestRawFileWriter_LandsPerRecordOnDisk
(t *testing.T)
internal/session/raw_writer_test.go:92
Function
TestRawFileWriter_OpenFailure
(t *testing.T)
internal/session/raw_writer_test.go:205
Function
TestRawFileWriter_RecoversFromTransientWriteFailure
TestRawFileWriter_RecoversFromTransientWriteFailure pins the recovery contract: one disk failure must drop only the one record in flight and warn once
internal/session/raw_writer_test.go:279
Function
TestRawFileWriter_StampsSessionIDAndTimestamp
(t *testing.T)
internal/session/raw_writer_test.go:55
Function
TestRawHolder_ConcurrentSetAndWrite
TestRawHolder_ConcurrentSetAndWrite exercises the holder's locking under concurrent writers and captures.
internal/llm/raw_test.go:894
Function
TestRawLoggingEnabled
(t *testing.T)
internal/llm/raw_test.go:52
Function
TestRawMiddleware_BodyReadErrorPropagates
(t *testing.T)
internal/llm/raw_test.go:561
Function
TestRawMiddleware_CapturesRawBodiesAndMeta
(t *testing.T)
internal/llm/raw_test.go:88
Function
TestRawMiddleware_CapturesResponseHeaders
(t *testing.T)
internal/llm/raw_test.go:283
Function
TestRawMiddleware_DurationCoversBodyRead
(t *testing.T)
internal/llm/raw_test.go:171
Function
TestRawMiddleware_EmptyBodies
TestRawMiddleware_EmptyBodies guards the edges: nil request body and nil response body must not panic and must yield empty captures.
internal/llm/raw_test.go:861
Function
TestRawMiddleware_JoinsRequestBodyReadErrorWithNextError
When next() fails for an independent reason (e.g. the context is cancelled before the replayed body is read), the record must keep the body-read root
internal/llm/raw_test.go:431
Function
TestRawMiddleware_MultiValueHeadersAreJoined
Repeated headers are legal on the wire; capture must keep every value in the RFC 9110 comma-list form instead of silently truncating to the first.
internal/llm/raw_test.go:261
Function
TestRawMiddleware_NoMetaOmitsIdentityAndFallsBackToBodyModel
(t *testing.T)
internal/llm/raw_test.go:603
Function
TestRawMiddleware_NoWriterIsPassthrough
(t *testing.T)
internal/llm/raw_test.go:672
Function
TestRawMiddleware_NonJSONRequestGoesToRequestBodyText
The SDK marshals every request body, so this path is unreachable today; if a future middleware mangles the bytes, the record must survive with them ve
internal/llm/raw_test.go:516
Function
TestRawMiddleware_NonJSONResponseGoesToResponseBodyText
(t *testing.T)
internal/llm/raw_test.go:484
Function
TestRawMiddleware_RecordsNon200StatusCode
HTTP-level failures are not transport errors — the SDK retries them and the body lands in the record as-is — so status_code must carry the signal.
internal/llm/raw_test.go:457
Function
TestRawMiddleware_RedactsAuthHeaders
(t *testing.T)
internal/llm/raw_test.go:223
Function
TestRawMiddleware_RequestBodyReadErrorReplayed
A request-body read failure must be replayed to the SDK exactly as it would surface without capture: a clean truncated body would turn the client-side
internal/llm/raw_test.go:392
Function
TestRawMiddleware_ResponseHeadersOmittedOnTransportError
A transport error has no response, so response_headers must be omitted from the JSON rather than written as an empty map.
internal/llm/raw_test.go:312
Function
TestRawMiddleware_TimestampIsAttemptStart
Timestamp must be the attempt start, so that [timestamp, timestamp + duration_ms] reconstructs the attempt interval. The TTFB sleep inside next() is w
internal/llm/raw_test.go:197
Function
TestRawMiddleware_TraceID
TestRawMiddleware_TraceID covers the run-level join key: a valid OTel span context on the request ctx is captured as trace_id, and without one the fie
internal/llm/raw_test.go:628
Function
TestRawMiddleware_TransportErrorRecordsErrorOnly
(t *testing.T)
internal/llm/raw_test.go:360
Function
TestRawSubDirIsSeparateFromSessions
TestRawSubDirIsSeparateFromSessions guards the isolation contract: raw captures must never land in the session checkpoint directory. UseTestSessions (
internal/session/raw_writer_test.go:229
Function
TestReLocateComment_CodeBlockStillUnresolvable
TestReLocateComment_CodeBlockStillUnresolvable covers the rollback branch: the model returned a well-formed snippet that still does not appear in the
internal/diff/relocation_test.go:224
Function
TestReLocateComment_LLMError
(t *testing.T)
internal/diff/relocation_test.go:156
Function
TestReLocateComment_LLMReturnsInvalidContent
(t *testing.T)
internal/diff/relocation_test.go:132
Function
TestReLocateComment_LLMReturnsValidCode
(t *testing.T)
internal/diff/relocation_test.go:103
Function
TestReLocateComment_NoMessages
The caller skips the session record and the request entirely when there are no messages, so ReLocateComment must not reach the client on that path.
internal/diff/relocation_test.go:254
Function
TestReLocation_Identity
TestReLocation_Identity pins the field that is easy to get wrong: FilePath is the comment's path, which is the file session the re-location record was
internal/reviewtask/retry_identity_test.go:275
Function
TestReLocation_NoRequestWithoutTemplate
TestReLocation_NoRequestWithoutTemplate covers the branch that skips both the session record and the request: with no prompt there is nothing to send,
internal/reviewtask/retry_identity_test.go:338
Function
TestReadDelegateExamples
(t *testing.T)
internal/delegate/instructions_test.go:147
Function
TestReadJSONLLinesDiscardsPartialDataOnNonEOFError
(t *testing.T)
internal/viewer/store_load_test.go:36
Function
TestReadJSONLLinesRetainedRecords
(t *testing.T)
internal/viewer/summary_allocation_test.go:14
Function
TestReadLines_Disk_AbsolutePathStaysUnderRepo
(t *testing.T)
internal/tool/file_read_test.go:211
Function
TestReadLines_Disk_AllowsParentSegmentWithinRepo
(t *testing.T)
internal/tool/file_read_test.go:194
Function
TestReadLines_Disk_AllowsSymlinkInsideRepo
(t *testing.T)
internal/tool/file_read_test.go:283
Function
TestReadLines_Disk_EmptyFile
(t *testing.T)
internal/tool/file_read_test.go:74
Function
TestReadLines_Disk_FullFile
(t *testing.T)
internal/tool/file_read_test.go:25
Function
TestReadLines_Disk_MissingFilePreservesReadError
(t *testing.T)
internal/tool/file_read_test.go:232
Function
TestReadLines_Disk_NoTrailingNewline
(t *testing.T)
internal/tool/file_read_test.go:132
Function
TestReadLines_Disk_RejectsParentTraversal
(t *testing.T)
internal/tool/file_read_test.go:170
Function
TestReadLines_Disk_RejectsSymlinkOutsideRepo
(t *testing.T)
internal/tool/file_read_test.go:259
Function
TestReadLines_Disk_StartBeyondEOF
(t *testing.T)
internal/tool/file_read_test.go:92
Function
TestReadLines_Disk_TrailingNewline
(t *testing.T)
internal/tool/file_read_test.go:110
Function
TestReadLines_Disk_Window
(t *testing.T)
internal/tool/file_read_test.go:50
Function
TestReadLines_GitShow_Window
(t *testing.T)
internal/tool/file_read_test.go:151
Function
TestReadRuleFileSafe_ConfineRejectsOutside
TestReadRuleFileSafe_ConfineRejectsOutside verifies the confinement check itself.
internal/config/rules/system_rules_test.go:1940
Function
TestReadRuleFileSafe_Missing
(t *testing.T)
internal/config/rules/system_rules_test.go:1770
Function
TestReadRuleFileSafe_NormalFile
── readRuleFileSafe tests ──
internal/config/rules/system_rules_test.go:1727
Function
TestReadRuleFileSafe_TooLarge
(t *testing.T)
internal/config/rules/system_rules_test.go:1756
Function
TestReadRuleFileSafe_UnsupportedExt
(t *testing.T)
internal/config/rules/system_rules_test.go:1743
Function
TestReadWorkspaceFileForDiffReadsInternalSymlink
(t *testing.T)
internal/diff/workspace_file_test.go:132
Function
TestReadWorkspaceFileForDiffReadsRegularFile
(t *testing.T)
internal/diff/workspace_file_test.go:42
Function
TestReadWorkspaceFileForDiffRejectsAbsolutePath
(t *testing.T)
internal/diff/workspace_file_test.go:29
Function
TestReadWorkspaceFileForDiffRejectsDirectory
(t *testing.T)
internal/diff/workspace_file_test.go:73
Function
TestReadWorkspaceFileForDiffRejectsNonexistentFile
(t *testing.T)
internal/diff/workspace_file_test.go:153
← previous
next →
5,301–5,400 of 7,484, ranked by callers