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
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:322
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:207
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:281
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:231
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
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:1847
Function
TestReadRuleFileSafe_Missing
(t *testing.T)
internal/config/rules/system_rules_test.go:1677
Function
TestReadRuleFileSafe_NormalFile
── readRuleFileSafe tests ──
internal/config/rules/system_rules_test.go:1634
Function
TestReadRuleFileSafe_TooLarge
(t *testing.T)
internal/config/rules/system_rules_test.go:1663
Function
TestReadRuleFileSafe_UnsupportedExt
(t *testing.T)
internal/config/rules/system_rules_test.go:1650
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
Function
TestReadWorkspaceFileForDiffRejectsParentSymlinkEscape
(t *testing.T)
internal/diff/workspace_file_test.go:88
Function
TestReadWorkspaceFileForDiffRejectsPathTraversal
(t *testing.T)
internal/diff/workspace_file_test.go:61
Function
TestReadWorkspaceFileForDiffReturnsSymlinkTarget
(t *testing.T)
internal/diff/workspace_file_test.go:108
Function
TestReadWorkspaceFileForDiffWithLimit
(t *testing.T)
internal/diff/workspace_file_test.go:14
Function
TestRealBinaryUnreadStdoutExits
(t *testing.T)
acp/cmd/ocr-acp/stdio_test.go:21
Function
TestRealEndpointToolCall
TestRealEndpointToolCall is opt-in because it calls a real, configured endpoint. The core regression never depends on it.
acp/internal/intent/llm/real_llm_test.go:17
Function
TestRealLatestCommitIntent
This optional semantic check sends only synthetic requests through the real parser prompt. It neither sends repository content nor starts an OCR revie
acp/internal/intent/llm/real_llm_test.go:48
Function
TestRealOCRBinaryScanMultiplePaths
(t *testing.T)
acp/internal/contract/real_cli_test.go:123
Function
TestRealOCRReviewShapeDecodes
(t *testing.T)
acp/internal/contract/real_cli_test.go:73
Function
TestRealOCRScanShapeDecodes
(t *testing.T)
acp/internal/contract/real_cli_test.go:107
Function
TestRecordAttemptAcceptsUnclassifiedSuccessStatus
The guard keys off the same boundary as classifyAttempt, so a 2xx never trips it: an unclassified 200 is the normal success path, and an unclassified
internal/llm/retry_report_test.go:313
Function
TestRecordAttemptDerivesTimings
Both durations are derived from the observed timestamps, so a caller cannot report a backoff it never measured. The first attempt has no predecessor a
internal/llm/retry_report_test.go:232
Function
TestRecordAttemptDropsRequestsWithoutIdentity
(t *testing.T)
internal/llm/retry_report_test.go:324
Function
TestRecordAttemptFloorsInvertedTimestamps
Timestamps from time.Now carry a monotonic reading and cannot invert, so this only guards hand-built times. It still has to hold: a negative duration
internal/llm/retry_report_test.go:264
Function
TestRecordAttemptNumbersAndDerivesOutcome
(t *testing.T)
internal/llm/retry_report_test.go:204
Function
TestRecordAttemptRejectsUnclassifiedErrorStatus
An observer that reports a non-2xx status without classifying it contradicts the strongest fact it had. The failure mode this closes is silence, not n
internal/llm/retry_report_test.go:287
Function
TestRecordFunctions_DisabledTelemetry
(t *testing.T)
internal/telemetry/metrics_test.go:14
Function
TestRecordFunctions_EnabledTelemetry
(t *testing.T)
internal/telemetry/metrics_test.go:35
Function
TestRecordLLMResult_Error
(t *testing.T)
internal/telemetry/span_test.go:167
Function
TestRecordLLMResult_NilSpan
(t *testing.T)
internal/telemetry/span_test.go:174
Function
TestRecordLLMResult_Success
(t *testing.T)
internal/telemetry/span_test.go:160
Function
TestRecordMetrics_ConcurrentFirstUse
The review fans out per-file goroutines (--concurrency, default 8) that record LLM and tool metrics, so the first use of the metric handles is concurr
internal/telemetry/metrics_test.go:71
Function
TestRecordReviewItem_EmptyFilePathUsesNewPath
TestRecordReviewItem_EmptyFilePathUsesNewPath covers the filePath == "" → filePath = newPath branch of each checkpoint recorder. Without persistence t
internal/session/list_more_test.go:75
Function
TestRecordReviewItem_NilReceiver
TestRecordReviewItem_NilReceiver covers the sh == nil guard on all three checkpoint recorders (no panic, no-op).
internal/session/list_more_test.go:65
Function
TestRecordToItem
TestRecordToItem covers the non-item type (returns false) and the empty-FilePath fallback to NewPath for a recognized item record.
internal/session/list_error_test.go:46
Function
TestRecordToolCall
(t *testing.T)
internal/llmloop/runner_test.go:109
Function
TestRecordToolResult_Error
(t *testing.T)
internal/telemetry/span_test.go:136
Function
TestRecordToolResult_NilSpan
(t *testing.T)
internal/telemetry/span_test.go:143
Function
TestRecordToolResult_Success
(t *testing.T)
internal/telemetry/span_test.go:129
Function
TestRecordUsage
(t *testing.T)
internal/llmloop/runner_test.go:149
Function
TestRecordWarning
(t *testing.T)
internal/llmloop/runner_test.go:91
Function
TestRecordingTelemetryIgnoresOTLPEnvironment
(t *testing.T)
internal/scan/trace_parent_test.go:76
Function
TestRecordingTelemetryIgnoresOTLPEnvironment
(t *testing.T)
internal/agent/trace_parent_test.go:87
Function
TestRedactURLDropsUserInfoAndQuery
(t *testing.T)
acp/internal/intent/llm/resolve_test.go:151
Function
TestRefreshCommitAfterCancellation
(t *testing.T)
internal/chatgptauth/recovery_test.go:24
Function
TestRefreshFailuresAndCancellation
(t *testing.T)
internal/chatgptauth/lifecycle_test.go:142
Function
TestRefreshModelSelectionAfterAdd
(t *testing.T)
cmd/opencodereview/provider_tui_rollback_test.go:211
Function
TestRefreshRecoveryAfterVerificationFailure
(t *testing.T)
internal/chatgptauth/refresh_recovery_test.go:17
Function
TestRefreshRejectsIncompleteRotation
(t *testing.T)
internal/chatgptauth/auth_test.go:312
Function
TestRefreshRotationAndConcurrency
(t *testing.T)
internal/chatgptauth/auth_test.go:281
Function
TestRegisterAll_AllowedFilter
(t *testing.T)
internal/mcp/provider_test.go:44
Function
TestRegisterAll_Basic
(t *testing.T)
internal/mcp/provider_test.go:27
← previous
next →
5,101–5,200 of 7,169, ranked by callers